/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Contents of /branches/greater-ms3/thuban/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (show annotations)
Tue May 20 15:27:40 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 142161 byte(s)
updated ChangeLog

1 2003-05-20 Jonathan Coles <[email protected]>
2
3 This puts back Raster layer support. These layers support projections
4 through the GDAL library. Currently, the CVS version is being used.
5 There are no Debian packages available although this may change soon.
6 A GDAL driver was extended to support writing to memory rather to
7 files.
8
9 There is still some work that needs to be done, such as some error
10 handling when loading invalid images or when there is a problem
11 projecting the image. This putback simply checks in the majority
12 of the work.
13
14 * setup.py: Add gdalwarp library extension.
15
16 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
17 Defaults to False, but can be overridden by subclasses if they
18 support classification.
19 (RasterLayer): New. Defines a new layer that represents an
20 image.
21
22 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
23 tag handler.
24 (SessionLoader.start_layer): Encode the filename.
25 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
26 New. Supports reading a rasterlayer tag.
27
28 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
29
30 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
31 get a string in Latin1. If we get such as string convert it to
32 unicode first, otherwise leave if alone before encoding.
33 (SessionSaver.write_layer): Add support for writing both Layers
34 and RasterLayers.
35
36 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
37 The right argument may not be a string, it could also be a Column.
38
39 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
40 Make initial window size 600x400. Fixes RTBug #1872.
41
42 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
43 the dialog is constructed so that we can support layers that
44 do not have classifications.
45 (Classifier._OnTry): Only build a classification if the layer
46 supports one.
47
48 * Thuban/UI/legend.py: Change all checks that a layer is an
49 instance of Layer into checks against BaseLayer.
50 (LegendTree.__FillTreeLayer): Only add children to a branch if
51 the layer supports classification.
52
53 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
54 MainWindow.OpenSession): Don't proceed with an action if the
55 user chooses Cancel when they are asked to save changes.
56 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
57 user to select an image file. Create a new RasterLayer and add
58 it to the map.
59
60 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
61 for rendering RasterLayer layers.
62 (MapRenderer.draw_raster_layer): Actually method that calls
63 the GDALWarp python wrapper and constructs an image from the
64 data returned.
65
66 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
67 Choices symbols to match those used in the table query method.
68 Replace deprecated method calls on table with new method names.
69
70 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
71 how small the scale can get. This still needs more testing.
72
73 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
74 Provides a driver to output in .bmp format.
75
76 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
77 New. Provides IO routines which write to memory, rather than a file.
78
79 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
80 of the gdalwarp utility provided in GDAL. Added function calls
81 that can be accessed from python.
82
83 * Data/iceland_sample_raster.thuban: New. Sample file that uses
84 a raster layer.
85
86 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
87 layer image data.
88
89 * Doc/thuban.dtd: Added rasterlayer attribute definition.
90
91 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
92 tests associated with the raster layer code.
93
94 * test/test_transientdb.py
95 (TestTransientTable.test_auto_transient_table_query): Added a test
96 for using a Column object as the "right" parameter to a query.
97
98 2003-05-19 Frank Koormann <[email protected]>
99
100 * Thuban/version.py (get_changelog_date):
101 Catch exceptions if ChangeLog does not exist.
102
103 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
104
105 2003-05-19 Frank Koormann <[email protected]>
106
107 Extended version information for Thuban
108
109 * Thuban/version.py: New, version information for Thuban: Last
110 modification date and last ChangeLog entry date.
111
112 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
113 information: Display Thuban, wxPython and Python version.
114
115 2003-05-16 Bernhard Herzog <[email protected]>
116
117 * Thuban/Model/save.py: Remove some unused imports including the
118 __future__ import for nested_scopes as Thuban relies on Python 2.2
119 now.
120 (XMLWriter.encode): Remove the special case for a None argument.
121 In the saver encode is always called with a string argument.
122
123 2003-05-16 Bernhard Herzog <[email protected]>
124
125 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
126 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
127 of the bug was that e.g. float("1.2") would fail. Thuban now
128 requires 2.4.x.
129
130 2003-05-16 Frank Koormann <[email protected]>
131
132 Printing enhancement and WMF export (under Win32)
133
134 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
135 ScreenRenderer. Renders Map, Legend and Scalebar for export.
136 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
137 PrintRender.
138
139 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
140 to fullfil information needed for PrinterRenderer.
141 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
142 (MapCanvas.Print): Adapted to new MapPrintout.
143 (OutputTransform): General calculations to transform from canvas
144 coordinates to export/printing devices.
145
146 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
147 new method_command to call ExportMap, with platform dependency (only
148 __WXMSW__)
149
150 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
151 of scalebar drawing area as new parameters.
152
153 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
154
155 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
156 Update to extended scalebar.DrawScalebar header.
157
158 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
159
160 * test/test_scalebar.py: Made test executable as standalone.
161
162 2003-05-16 Bernhard Herzog <[email protected]>
163
164 * Thuban/Model/table.py (Table): Remove this compatibility alias
165 for DBFTable.
166
167 * test/test_table.py: Import DBFTable as Table because that alias
168 doesn't exist anymore.
169
170 * Thuban/UI/classgen.py: Remove some unused imports
171
172 2003-05-14 Jonathan Coles <[email protected]>
173
174 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
175 Fix docstring.
176 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
177 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
178 values of the supplied range to determine the beginning and end
179 bounds of the generated classes.
180
181 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
182 do not have a leading 0 (.5 is now accepted as well as 0.5).
183
184 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
185 call to ClassGenerator.GenUniformDistribution.
186
187 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
188 layout bug with the 'Projection' label.
189
190 * test/support.py (FloatTestCase): New. Needed for the Range tests.
191
192 * test/test_range.py: New. Imported from SciParam.
193
194 2003-05-12 Jonathan Coles <[email protected]>
195
196 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
197 to table.UniqueValues() with calls that retrieve all the values
198 from the table. This will need to be replaced by a method on table
199 which can simply return the list (perhaps more efficiently).
200
201 2003-05-12 Jonathan Coles <[email protected]>
202
203 The return value of ClassGenerator.CalculateQuantiles has changed.
204 Refer to the documentation for details.
205
206 * test/test_classgen.py: Modified Quantile tests to use the
207 new return values.
208
209 * Thuban/Model/classgen.py
210 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
211 use new return values from CalculateQuantiles to produce the correct
212 range bounds in the Classification.
213 (ClassGenerator.CalculateQuantiles): Add more comments describing
214 the return values and parameters. Make minor adjustments to improve
215 the legibility of the code. Fix problem with adjusted not being set
216 in most cases.
217
218 2003-05-12 Frank Koormann <[email protected]>
219
220 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
221 and latin1. Fixes #1851 finally.
222
223 2003-05-09 Jonathan Coles <[email protected]>
224
225 * test/test_classgen.py: New. Tests the Quantile algorithm.
226
227 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
228 Clean up debugging statement, add comments, fix a small bug in the
229 returned adjusted percentiles.
230
231 2003-05-09 Jonathan Coles <[email protected]>
232
233 Introduces Range class from SciParam into the ClassGroupRange class,
234 and such ranges can now be saved and loaded from disk.
235
236 Quantiles are now available in the Classification Generator.
237
238 Initial support for building Queries on a table. Doesn't do anything
239 but run some tests.
240
241 * Thuban/Model/classification.py: Explicit imports.
242 (ClassGroupRange): Use the Range class to store the underlying
243 range information. The interface remains the same, except for
244 GetRange(), and you can also supply a Range object as the min
245 parameter to SetRange or __init__.
246
247 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
248 string appropriately for use in Thuban. Fixes RTbug #1851.
249 (SessionLoader.end_projection): Handle the context of the
250 projection tag a bit better by looking at what objects are not
251 None. There was an assumption that a projection tag for a map
252 could occur before any layers.
253 (SessionLoader.start_clrange): Provide backward compatibility for
254 reading min/max values as well as the new range parameter.
255
256 * Thuban/Model/map.py: Explicit imports.
257
258 * Thuban/Model/resource.py: Import _.
259 (ProjFileSaver.write): write header using projfile.dtd.
260
261 * Thuban/Model/save.py: Explicit imports.
262 (XMLWriter.encode): New. Encode the given string from a format
263 used by Thuban into UTF-8. Fixes RTbug #1851.
264
265 * Thuban/UI/classgen.py: Explicit imports.
266 (ClassGenDialog.__init__): Clean up the code and add support
267 for Quantiles.
268 (ClassGenDialog.OnOK): Add support for Quantiles.
269 (GenQuantilesPanel): New. Input panel for Quantiles.
270 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
271 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
272
273 * Thuban/Model/classgen.py: New. Contains all the classes named above.
274
275 * Thuban/UI/classifier.py: Explicit imports.
276 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
277 ClassTable.SetValueAsCustom): Reworked to use new Range class.
278
279 * Thuban/UI/legend.py: Explicit imports.
280
281 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
282 a Table menu and associated method calls.
283 (MainWindow.choose_color): Removed. No longer needed.
284
285 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
286 should be disabled if no projection is selected in the available
287 list.
288
289 * Thuban/UI/renderer.py: Explicit imports.
290
291 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
292 with correctly selecting the rows and issuing the right events.
293 Be sure to call Skip() to allow the grid to do some of its own
294 handling which allows the rows to actually be selected.
295 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
296 selecting multiple shapes.
297 (LayerTableFrame): Support for building Queries.
298 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
299
300 * Thuban/UI/tree.py: Explicit imports.
301
302 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
303 table view can call it.
304
305 * test/test_classification.py: Explicit imports.
306 (TestClassification.test_ClassGroupRange): Fix test for new
307 Range class.
308
309 * Doc/thuban.dtd: Add range parameter for clrange.
310
311 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
312 object in ClassGroupRange, and also uesd for inputting ranges in
313 the classifer table and elsewhere.
314
315 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
316 yet.
317
318 2003-05-09 Frank Koormann <[email protected]>
319
320 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
321
322 2003-05-08 Frank Koormann <[email protected]>
323
324 Coding style updates
325
326 * test/test_scalebar.py: Replaced tab indentation by spaces.
327
328 * Thuban/UI/scalebar.py: Explicit imports.
329
330 2003-05-08 Frank Koormann <[email protected]>
331
332 * Thuban/UI/scalebar.py
333 (ScaleBar.DrawScalebar): Format string bug fixed.
334
335 2003-05-08 Frank Koormann <[email protected]>
336
337 Reorganization of scalebar component (no wx in Thuban/Model)
338
339 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
340 (deriveInterval):
341 Calculate scalebar interval and unit which fits in width for scale.
342 (roundInterval): Round float.
343
344 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
345
346 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
347
348 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
349
350 2003-05-08 Frank Koormann <[email protected]>
351
352 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
353 Initialize ScaleBar with canvas.map
354
355 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
356 round intervals to display smarter lengths
357 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
358 layer. If the maps has no projection applied grey the scalebar.
359
360 2003-05-07 Frank Koormann <[email protected]>
361
362 Basic Scalebar features added.
363
364 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
365
366 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
367 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
368 and the renderer.
369
370 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
371
372 * Thuban/UI/messages.py: SCALE_CHANGED added.
373
374 2003-05-07 Bernhard Herzog <[email protected]>
375
376 * Thuban/Model/session.py (Session.__init__): New instance
377 variable shapestores to hold a list of all open shapestore objects
378 (Session.ShapeStores): New. Accessor method for the shapestores
379 list.
380 (Session._add_shapestore, Session._clean_weak_store_refs): New.
381 Internal methods to maintain the shapestores list.
382 (Session.Tables): New. Return all tables open in the session.
383 (Session.OpenShapefile): Insert the new ShapeStore into the
384 shapestores list.
385
386 * test/test_session.py (TestSessionSimple.test_initial_state): Add
387 tests for ShapeStores and Tables
388 (TestSessionWithContent.test_shape_stores)
389 (TestSessionWithContent.test_tables): New. Test cases for
390 ShapeStores and Tables
391
392 2003-05-07 Bernhard Herzog <[email protected]>
393
394 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
395 Add comments about the optimizations used.
396 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
397 Implement the ReadValue table interface method.
398
399 * test/test_transientdb.py
400 (TestTransientTable.run_iceland_political_tests)
401 (TestTransientTable.test_transient_joined_table): Add tests for
402 ReadValue
403
404 2003-05-07 Frank Koormann <[email protected]>
405
406 * Resources/Bitmaps/fulllayerextent.xpm,
407 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
408 new icons.
409
410 2003-05-06 Bernhard Herzog <[email protected]>
411
412 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
413 New. Simply delegate to the transient table's version.
414
415 * test/test_transientdb.py
416 (TestTransientTable.test_auto_transient_table_query): New. Test
417 case for AutoTransientTable's SimpleQuery
418
419 2003-05-06 Bernhard Herzog <[email protected]>
420
421 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
422 Implement a simple query method for the query dialog
423 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
424 the row index or shapeid.
425 (TransientTable.create): Insert the right value of the row index
426 (TransientJoinedTable.create): Copy the row index of the left
427 table to the joined result table
428
429 * test/test_transientdb.py
430 (TestTransientTable.test_transient_table_read_twice): Fix
431 doc-string
432 (TestTransientTable.test_transient_table_query): New. Test for the
433 SimpleQuery method
434
435 2003-05-06 Bernhard Herzog <[email protected]>
436
437 Convert all table users to use the new table interface. This only
438 covers Thuban itself, not GREAT-ER or other applications built on
439 Thuban yet, so the compatibility interface stays in place for the
440 time being but it now issues DeprecationWarnings.
441
442 Finally, the new Table interface has a new method, HasColumn.
443
444 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
445 issue deprecation warnings when they're. The warnings refer to the
446 caller of the method.
447 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
448 for the deprecation warnings
449
450 * test/test_table.py: Ignore the deprecation warnings for the old
451 table in the tests in this module. The purpose of the tests is to
452 test the old interface, after all.
453
454 * test/test_transientdb.py
455 (TestTransientTable.run_iceland_political_tests): Use the
456 constants for the types. Add a test for HasColumn
457 (TestTransientTable.test_transient_joined_table): Adapt to new
458 table interface. Add a test for HasColumn
459 (TestTransientTable.test_transient_table_read_twice): Adapt to new
460 table interface
461
462 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
463 Adapt to new table interface
464
465 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
466 new table interface
467
468 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
469 (RecordTable.SetTable): Adapt to new table interface
470
471 * Thuban/UI/classifier.py (Classifier.__init__)
472 (Classifier.__init__): Adapt to new table interface
473
474 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
475 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
476 to new table interface
477
478 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
479 (AutoTransientTable.HasColumn): Implement the new table interface
480 method
481 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
482 (AutoTransientTable.UniqueValues): Adapt to new table interface
483
484 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
485 Adapt to new table interface
486
487 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
488 simplify opening shapefiles a bit easier.
489 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
490 (TestLayer.test_point_layer): Use the new helper method
491 (TestLayer.test_get_field_type): New. Test for the GetFieldType
492 method
493
494 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
495 the new table method
496
497 * test/test_memory_table.py (TestMemoryTable.test_has_column):
498 Test for the new table method HasColumn
499
500 2003-05-06 Jonathan Coles <[email protected]>
501
502 Addresses the "Selection Extent" wish of RTbug #1787.
503
504 * Resources/Bitmaps/fulllayerextent.xpm,
505 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
506 extent. These are just place holders for the real bitmaps.
507
508 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
509 calculate the bounding box once (the first time compute_bbox() is
510 called).
511 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
512 the bounding box for the shapes in lat/long coordinates.
513
514 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
515 option.
516 (MainWindow.has_selected_shapes): New. Returns true if there are
517 any selected shapes.
518 (MainWindow.FullSelectionExtent): New. Calls
519 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
520 (_has_selected_shapes): New. Returns true if there are any
521 selected shapes.
522
523 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
524 true if there are any selected shapes.
525
526 * Thuban/UI/view.py (MapCanvas): Added delegated method
527 HasSelectedShapes.
528 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
529 shapes on the canvas using the map projection (if any).
530
531 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
532 for Layer.ShapesBoundingBox().
533
534 2003-05-06 Bernhard Herzog <[email protected]>
535
536 * Resources/Projections/defaults.proj: Fix spelling of Mercator
537
538 2003-05-05 Jonathan Coles <[email protected]>
539
540 Addresses the "Full Layer Extent" wish of RTbug #1787.
541
542 * Resources/Projections/defaults.proj: Added UK National Grid.
543
544 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
545 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
546 when the user selects the menu option.
547
548 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
549 scales the given layer on the canvas using the map projection.
550
551 2003-05-05 Bernhard Herzog <[email protected]>
552
553 Convert the table implementations to a new table interface. All
554 tables use a common mixin class to provide backwards compatibility
555 until all table users have been updated.
556
557 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
558 provide backwards compatibility for table classes implementing the
559 new interface
560 (DBFTable, MemoryTable): Implement the new table interface. Use
561 OldTableInterfaceMixin as base for compatibility
562 (DBFColumn, MemoryColumn): New. Column description for DBFTable
563 and MemoryTable resp.
564
565 * test/test_dbf_table.py: New. Test cases for the DBFTable with
566 the new table interface.
567
568 * test/test_memory_table.py: New. Test cases for the MemoryTable
569 with the new table interface.
570
571 * test/test_table.py: Document the all tests in this file as only
572 for backwards compatibility. The equivalent tests for the new
573 interface are in test_memory_table.py and test_dbf_table.py
574 (MemoryTableTest.test_read): field_info should be returning tuples
575 with four items
576 (MemoryTableTest.test_write): Make doc-string a more precise.
577
578 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
579 table interface. Derive from from OldTableInterfaceMixin for
580 compatibility.
581 (TransientTableBase.create): New intance variable column_map to
582 map from names and indices to column objects
583 (TransientTable.create): Use the new table interface of the input
584 table
585 (AutoTransientTable): Convert to new table interface. Derive from
586 from OldTableInterfaceMixin for compatibility.
587 (AutoTransientTable.write_record): Removed. It's not implemented
588 yet and we still have to decide how to handle writing with the new
589 table and data framework.
590
591 * test/test_transientdb.py
592 (TestTransientTable.run_iceland_political_tests)
593 (TestTransientTable.test_transient_joined_table): Use the new
594 table interface
595
596 2003-05-05 Jonathan Coles <[email protected]>
597
598 This is namely a collection of UI updates to improve user interactivity.
599 Tabbing between controls now exists and you can use ESC to close dialog
600 boxes; ENTER will active the default button.
601
602 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
603 order that the controls are created so that tabbing works correctly.
604 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
605 wxDialog can handle the default button correctly.
606 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
607 same reasons as for OnOK.
608 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
609 when we ask the table for the maximum/minimum values of a field
610 which could take a very long time.
611
612 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
613 order that the controls are created so that tabbing works correctly.
614 (SelectPropertiesDialog.__init__): Rearrange the order that the
615 controls are created so that tabbing works correctly.
616
617 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
618 to derive from a wxDialog but behave like the original implementation
619 which was derived from a wxFrame. wxDialog provides useful key
620 handling functionality like ESC calling OnCancel and ENTER calling
621 OnOK which is lost with wxFrame.
622
623 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
624 new dialogs.
625
626 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
627 order that the controls are created so that tabbing works correctly.
628 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
629 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
630 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
631 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
632 can provide the "UK National Grid" as a default projection.
633 (UTMPanel.__init__): Rearrange the order that the controls are
634 created so that tabbing works correctly.
635
636 2003-05-05 Bernhard Herzog <[email protected]>
637
638 * extensions/thuban/wxproj.cpp: Fix some of the comments.
639 (project_point): If a map projection but no layer projection is
640 given, convert degrees to radians before applying the map
641 projection.
642
643 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
644 (TableGrid.allow_messages): New methods to make it possible to
645 inhibit message sending.
646 (TableGrid.issue): Only send the message if not inhibited.
647 (LayerTableGrid.select_shape): Use the new methods to make sure
648 that no ROW_SELECTED message is sent while we're updating the
649 selected rows to match the selected shapes.
650
651 2003-05-02 Jan-Oliver Wagner <[email protected]>
652
653 Implementation of MemoryTable.
654
655 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
656 implementation that operates on a list of tuples. All of the data
657 are kept in the memory.
658
659 * test/test_table.py (MemoryTableTest): New.
660
661 * test/test_transientdb.py (SimpleTable): Removed.
662 (TestTransientTable.test_transient_joined_table,
663 (TestTransientTable.test_transient_table_read_twice): Replaced
664 SimpleTable by MemoryTable.
665
666 2003-04-30 Jonathan Coles <[email protected]>
667
668 * Data/iceland_sample.thuban: Now contains correct projections
669 for each of the layers.
670
671 * Resources/Projections/defaults.proj: Geographic projection
672 contains unit conversion parameter.
673
674 2003-04-30 Jonathan Coles <[email protected]>
675
676 The most important part of this putback is the projection changes.
677 It should now be possible to specify the projection that a layer
678 is in and then specify a different projection for the map. The
679 projection dialog has an extra parameter for a geographic projection
680 which lets the user select if the input is in degrees or radians.
681
682 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
683 to say that the parameter is a tuple of unprojected
684 points (which is what the callers to this method were assuming).
685 Also, since the points are unprojected we need to projected them.
686
687 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
688 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
689 groups are selected, move the layer up/down. Fixes RTbug #1833.
690
691 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
692
693 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
694 parameter in call to SetClientData.
695 (GeoPanel): Add support for selecting the units that the
696 source data is in (Radians or Degrees).
697
698 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
699 the rendering loop by reducing the number of if's, removing the
700 unnecessary try/except block, and checking if the old group
701 is the same as the new one (which happens a lot if there is
702 no classification, or lots of shapes are in the same group).
703
704 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
705 around the redraw routine to try to catch problems that the user
706 may create by selecting invalid projections for the data set and
707 map. Clears the display if there are any problems and prints the
708 error.
709 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
710 rectangle.
711
712 * extensions/thuban/wxproj.cpp (project_point): First invert the
713 supplied point (which should be in projected coordinates) using
714 the layer's projection and then project the point using the
715 map's projection.
716 (project_points): Use project_point() to project each point.
717
718 2003-04-30 Jan-Oliver Wagner <[email protected]>
719
720 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
721 don't set the Classification to None if the classfication field
722 is None (ie only a DEFAULT).
723
724 2003-04-30 Bernhard Herzog <[email protected]>
725
726 * Thuban/UI/view.py: Fix some typos.
727
728 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
729 not pop up the dialog if the selection becomes empty (this could
730 happen if e.g. a new selection is opened while the identify tool
731 is active and dialog had been closed)
732
733 2003-04-30 Bernhard Herzog <[email protected]>
734
735 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
736 instance variable read_record_last_result
737 (TransientTableBase.read_record): Make sure reading the same
738 record twice works. The implementation uses the new instance
739 variable read_record_last_result
740
741 * test/test_transientdb.py
742 (TestTransientTable.test_transient_table_read_twice): New test
743 case for the above bug-fix.
744
745 2003-04-29 Jonathan Coles <[email protected]>
746
747 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
748
749 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
750
751 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
752 (ClassTable.SetValueAsCustom): Rename keyword argument in
753 ClassGroup* constructors to match argument name.
754
755 2003-04-29 Bernhard Herzog <[email protected]>
756
757 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
758 transient DB if it exists to make sure it doesn't leave a journal
759 file in the temp directory.
760
761 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
762 self.conn to None after closing the connection to make sure it's
763 not closed twice
764
765 2003-04-29 Jonathan Coles <[email protected]>
766
767 Add a visible parameter in the layer XML tag. The default value is
768 "true". If anything other than "false" is specified we also assume
769 "true". Addresses RTbug #1025.
770
771 * Doc/thuban.dtd: Add visible parameter to a layer.
772
773 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
774 of visible from 1 to True.
775 (Layer.__init__): Change default value of visible from 1 to True.
776
777 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
778 parameter.
779
780 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
781 parameter.
782
783 * test/test_load.py: Add new test data contents_test_visible.
784 (LoadSessionTest.setUp): save test data.
785 (LoadSessionTest.testLayerVisibility): Test if the visible flag
786 is loaded correctly.
787
788 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
789 for saving an invisible layer.
790
791 2003-04-29 Jonathan Coles <[email protected]>
792
793 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
794 legend dialog box and tell it to change its map to the one
795 supplied to SetMap(). Fixes RTbug #1770.
796
797 2003-04-29 Bernhard Herzog <[email protected]>
798
799 Next step of table implementation. Introduce a transient database
800 using SQLite that some of the data is copied to on demand. This
801 allows us to do joins and other operations that require an index
802 for good performance with reasonable efficiency. Thuban now needs
803 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
804 haven't tested that.
805
806 * Thuban/Model/transientdb.py: New. Transient database
807 implementation.
808
809 * test/test_transientdb.py: New. Tests for the transient DB
810 classes.
811
812 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
813 classes to help automatically remove temporary files and
814 directories.
815 (Session.__init__): New instance variables temp_dir for the
816 temporary directory and transient_db for the SQLite database
817 (Session.temp_directory): New. Create a temporary directory if not
818 yet done and return its name. Use AutoRemoveDir to have it
819 automatically deleted
820 (Session.TransientDB): Instantiate the transient database if not
821 done yet and return it.
822
823 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
824 AutoTransientTable so that data is copied to the transient DB on
825 demand.
826 (SimpleStore): New class that simply combines a table and a
827 shapefile
828
829 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
830 DBFTable and update its doc-string to reflect the fact that this
831 is only the table interface to a DBF file. Table is now an alias
832 for DBFTable for temporary backwards compatibility.
833
834 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
835 the last reference to the session goes away so that the temporary
836 files are removed properly.
837
838 * test/test_load.py (LoadSessionTest.tearDown): Remove the
839 reference to the session to make sure the temporary files are
840 removed.
841
842 2003-04-29 Bernhard Herzog <[email protected]>
843
844 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
845 the __parser instance variable into a normal local variable in
846 read. It's only used there and read will never be called more than
847 once. Plus it introduces a reference cycle that keeps can keep the
848 session object alive for a long time.
849
850 2003-04-29 Jonathan Coles <[email protected]>
851
852 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
853 Projection an immutable item. Fixes RTbug #1825.
854 (Projection.__init__): Initialize instance variables here.
855 (ProjFile.Replace): New. Replace the given projection object with
856 the new projection object. This solves the problem of needing the
857 mutator Projection.SetProjection() in the ProjFrame class and
858 allows a projection to change parameters without changing its
859 location in the file.
860
861 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
862 be of type wxSAVE and should verify overwriting a file.
863
864 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
865 ProjFile.Replace() method instead of the mutator
866 Projection.SetProjection(). Also requires that we reassign the
867 client data to the new projection.
868
869 * test/test_proj.py (TestProjection.test): Test GetName() and
870 GetAllParameters()
871 (TestProjFile.test): Remove tests for Set*() methods. Add tests
872 for Replace().
873
874 2003-04-25 Jonathan Coles <[email protected]>
875
876 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
877 to save the name of the projection.
878
879 * test/test_save.py (SaveSessionTest.testLayerProjection): New
880 test to verify layer projections are saved correctly.
881
882 2003-04-25 Jonathan Coles <[email protected]>
883
884 * Thuban/Model/proj.py (Projection.SetName): Set the name
885 to "Unknown" if name is None.
886 (Projection.SetAllParameters): New. Set the projection's
887 parameter list to the one supplied.
888 (Projection.SetProjection): New. Set the projection's
889 properties to those of the supplied Projection.
890
891 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
892 the dialog title to include the map's title.
893 (MainWindow.LayerProjection): Set the dialog title to include
894 the layer's title.
895
896 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
897 error dialogs into a single method call.
898 (ProjFrame.__VerifyButtons): Add more states to check.
899 (ProjFrame.__GetProjection): Return the current state of an
900 edited projection or None.
901 (ProjFrame.__FillAvailList): Remove checks for states that
902 shouldn't exist.
903 (ProjFrame._OnNew): Clear all selected items and supply
904 a projection panel if necessary.
905
906 * test/test_proj.py (TestProjFile.test): Add tests for
907 ProjFile.SetAllParameters, ProjFile.SetProjection,
908 ProjFile.SetName.
909
910 2003-04-25 Jonathan Coles <[email protected]>
911
912 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
913 takes an optional argument to select the current projection.
914 This does not guarantee that the item is visible due to
915 limited wxWindows functionality. Fixes RTBug #1821.
916
917 2003-04-25 Jonathan Coles <[email protected]>
918
919 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
920 the projection name and use it when constructing the Projection
921 object.
922
923 * Thuban/Model/proj.py (Projection.__init__): Change the default
924 value for 'name' to None and then test if name is equal to None
925 in the body of the constructor. This way the caller doesn't have to
926 know what the default value should be. Namely, useful in load.py
927 where we have to pick a default value if the 'name' parameter
928 doesn't exist in the XML file.
929
930 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
931 Tests a file where a layer has a projection.
932
933 2003-04-25 Jonathan Coles <[email protected]>
934
935 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
936 tree for projection information.
937
938 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
939 XMLReader.GetFileName.
940 (SessionLoader): Added support for loading projection tags that
941 appear inside a layer.
942
943 * Thuban/Model/proj.py (ProjFile): Document the class. Move
944 back to using a list because the order of the projections in
945 the file is important to maintain. Fixes RTbug #1817.
946
947 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
948 to ProjFile.GetFilename.
949
950 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
951 information.
952
953 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
954 ProjFrame._OnSaveAs. Removed old dead code from previous
955 implementation.
956 (ProjFrame._OnExport): Add support for exporting more than one
957 projection to a single file.
958 (ProjFrame.__FillAvailList): use string formatting (% operator)
959 to build strings that are (partly) translated. Fixes RTbug #1818.
960
961 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
962 class.
963
964 2003-04-24 Bernhard Herzog <[email protected]>
965
966 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
967
968 * po/fr.po: New. French translation by Daniel Calvelo Aros
969
970 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
971 empty strings.
972
973 2003-04-24 Jonathan Coles <[email protected]>
974
975 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
976 implement the interface that the ProjFrame dialog expects.
977
978 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
979 name of the projection to be changed.
980 (ProjFile): Use a dictionary instead of a list so that removing
981 projections is easier and we are sure about uniqueness.
982 (ProjFile.Remove): Remove the given projection object.
983
984 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
985 Return a list with only one projection file instead of searching for
986 any projection file. This simplifies many things if the user can
987 only have one system file and one user file.
988
989 * Thuban/UI/classgen.py: Change all references to
990 genCombo to genChoice.
991
992 * Thuban/UI/mainwindow.py: Add a Projection option under the
993 layer menu.
994 (MainWindow.LayerProjection): New. Open up a projection window
995 for a layer.
996
997 * Thuban/UI/projdialog.py: Large changes to how the dialog is
998 laid out. Use three panels instead of one. One for the list of
999 projections, one for the edit controls, and one for the buttons.
1000 Fixed resizing problems so that the dialog resizes correctly
1001 when the projection panel changes. Added import/export, save, and
1002 new buttons/functionality.
1003
1004 2003-04-24 Bernhard Herzog <[email protected]>
1005
1006 First step towards table management. Introduce a simple data
1007 abstraction so that we replace the data a layer uses more easily
1008 in the next step.
1009
1010 * Thuban/Model/data.py: New file with a simple data abstraction
1011 that bundles shapefile and dbffile into one object.
1012
1013 * Thuban/Model/session.py (Session.OpenShapefile): New method to
1014 open shapefiles and return a shape store object
1015
1016 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1017 object instead of a shapefile filename. This introduces a new
1018 instance variable store holding the datastore. For intermediate
1019 backwards compatibility keep the old instance variables.
1020 (open_shapefile): Removed. No longer needed with the shape store.
1021 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1022 get the shape store used by a layer.
1023 (Layer.Destroy): No need to explicitly destroy the shapefile or
1024 table anymore.
1025
1026 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1027 (MainWindow.AddLayer): Use the session's OpenShapefile method to
1028 open shapefiles
1029
1030 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1031 session's OpenShapefile method to open shapefiles
1032
1033 * test/test_classification.py
1034 (TestClassification.test_classification): Use the session's
1035 OpenShapefile method to open shapefiles and build the filename in
1036 a more platform independed way
1037
1038 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1039 Implement to have a session to use in the tests
1040 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1041 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1042 session's OpenShapefile method to open shapefiles
1043 (TestLayerLegend.setUp): Instantiate a session so that we can use
1044 it to open shapefiles.
1045 (TestLayerLegend.tearDown): Make sure that all references to
1046 layers and session are removed otherwise we may get a resource
1047 leak
1048
1049 * test/test_map.py (TestMapAddLayer.test_add_layer)
1050 (TestMapWithContents.setUp): Instantiate a session so that we can
1051 use it to open shapefiles.
1052 (TestMapWithContents.tearDown): Make sure that all references to
1053 layers, maps and sessions are removed otherwise we may get a
1054 resource leak
1055 ("__main__"): use support.run_tests() so that more info about
1056 uncollected garbage is printed
1057
1058 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1059 session's OpenShapefile method to open shapefiles
1060 ("__main__"): use support.run_tests() so that more info about
1061 uncollected garbage is printed
1062
1063 * test/test_selection.py (TestSelection.tearDown): Make sure that
1064 all references to the session and the selection are removed
1065 otherwise we may get a resource leak
1066 (TestSelection.get_layer): Instantiate a session so that we can
1067 use it to open shapefiles.
1068 ("__main__"): use support.run_tests() so that more info about
1069 uncollected garbage is printed
1070
1071 * test/test_session.py (TestSessionBase.tearDown)
1072 (TestSessionWithContent.tearDown): Make sure that all references
1073 to the session and layers are removed otherwise we may get a
1074 resource leak
1075 (TestSessionWithContent.setUp): Use the session's OpenShapefile
1076 method to open shapefiles
1077
1078 2003-04-24 Jonathan Coles <[email protected]>
1079
1080 * Thuban/Model/load.py (XMLReader.read): Should have been checking
1081 if the file_or_filename object had the 'read' attribute.
1082
1083 2003-04-23 Jonathan Coles <[email protected]>
1084
1085 * Thuban/Model/resource.py: Fixes RTbug #1813.
1086 (ReadProjFile): Add documentation about which exceptions are raised.
1087 Always pass the exceptions up to the caller.
1088 (GetProjFiles): If the directory can't be read return an empty list.
1089 If any of the proj files can't be read skip that file and go
1090 on to the next one.
1091
1092 * test/test_proj.py: Added test cases to handle nonexistent files,
1093 unreadable files, and files that don't parse correctly.
1094
1095 2003-04-23 Jonathan Coles <[email protected]>
1096
1097 Projection dialog. Allows the user to select from a list
1098 of projection templates and optionally edit them and save new ones.
1099
1100 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1101 (ProjPanel): Base class for projection specific panels.
1102 (TMPanel): Projection panel for Transverse Mercartor.
1103 (UTMPanel): Projection panel for Universal Transverse Mercartor.
1104 (LCCPanel): Projection panel for Lambert Conic Conformal.
1105 (GeoPanel): Projetion panel for Geographic Projection.
1106
1107 2003-04-23 Jonathan Coles <[email protected]>
1108
1109 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1110 promote symmetry. There now exists XMLReader and XMLWriter.
1111 (XMLReader.read): New. Call to read the given file descriptor or
1112 filename.
1113 (XMLReader.close): New. Make sure the file is closed.
1114 (XMLReader.GetFileName): New. Return just the file name that is being
1115 read from.
1116 (XMLReader.GetDirectory): New. Return just the directory of the file
1117 that is being read.
1118 (XMLReader.AddDispatchers): New. Take a dictionary which contains
1119 the names of functions to call as the XML tree is parsed.
1120 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1121 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1122 (SessionLoader): Removed class variables start_dispatcher and
1123 end_dispatcher since this functionality is now part of a class
1124 instance. Fixes RTbug #1808.
1125 (SessionLoader.__init__): Add dispatcher functions.
1126 (load_xmlfile): Code was moved into the XMLReader.read().
1127 (load_session): Use modified SessionLoader.
1128
1129 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1130 map's projection.
1131
1132 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1133 GetAllParameters.
1134 (Projection.GetParameter): Returns the value for the given parameter.
1135
1136 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1137 (GetProjFiles): Renamed from GetProjections. Now returns a list
1138 of ProjFile objects.
1139 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1140 a list of ProjFile objects whose files are not user defined.
1141 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1142 list of ProjFile objects whose files are user defined.
1143 (ProjFileReader): Extend new XMLReader.
1144
1145 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1146 promote symmetry.
1147
1148 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1149 control instead of a wxComboBox. wxChoice controls do not generate
1150 events as the uses highlights possible choices which fixes problems
1151 with resizing the dialog when the use selects an option.
1152
1153 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1154 control instead of a wxComboBox.
1155
1156 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1157 dialog.
1158
1159 * test/test_proj.py (TestProjection.test): New tests for GetParameter
1160 method.
1161
1162 2003-04-22 Bernhard Herzog <[email protected]>
1163
1164 * Thuban/UI/mainwindow.py: Remove some unused imports and global
1165 constants
1166
1167 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1168 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1169
1170 2003-04-17 Bernhard Herzog <[email protected]>
1171
1172 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1173 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1174 anymore.
1175 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1176 (Layer.ShapeType, Layer.Shape): No need to call
1177 self.open_shapefile since it's always called in __init__
1178
1179 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1180 In wxPython 2.4 there's no need to extend MainLoop anymore since
1181 wxPython itself makes sure OnExit is called.
1182
1183 2003-04-16 Jonathan Coles <[email protected]>
1184
1185 Initial putback of projection management code. Includes new
1186 classes to read and write projection files. The current load
1187 and save classes were abstracted a bit so they could be reused.
1188 The Projection class was extended to provide new methods and
1189 have a name.
1190
1191 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1192 general XML reading methods that were part of ProcessSession.
1193
1194 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1195 name.
1196 (ProjFile): New. Represents a file that contains projection
1197 information.
1198
1199 * Thuban/Model/resource.py: New. Contains general utilities
1200 for read and writing projection files.
1201
1202 * Thuban/Model/save.py (XMLSaver): New. Contains all the
1203 general XML writing methods that were part of SessionSaver.
1204 (SessionSaver): Renamed from Saver.
1205
1206 * test/test_proj.py: New test cases for the projection
1207 file read and write functions.
1208
1209 2003-04-16 Jonathan Coles <[email protected]>
1210
1211 * Thuban/Model/classification.py: Use repr() around values
1212 in the ClassGroup*.__repr__() methods so it is clearer when
1213 a value is a string and when it is a number.
1214
1215 * test/test_load.py: Rework the classification test to test
1216 that we can load old files.
1217 (testLabels): Test a file where the groups have labels.
1218
1219 2003-04-16 Bernhard Herzog <[email protected]>
1220
1221 Safer implementation of the performance enhancements of the
1222 low-level renderer:
1223
1224 * extensions/thuban/wxproj.cpp (extract_projection)
1225 (extract_pointer): Rename extract_projection to extract_pointer
1226 and redefine its purpose to return the pointer stored in a CObject
1227 returned by the object's cobject method. Update all callers.
1228 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1229 handling of these low-level parameters so that each s_draw_info
1230 instance is handled as a CObject at python level that also
1231 contains real references to the actual python objects which
1232 contain the values in the struct. Add free_draw_info as the
1233 destructor.
1234 (draw_polygon_shape): Add the py_draw_info parameter which must a
1235 cobject containing an s_draw_info pointer.
1236
1237 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1238 method to instantiat the low-level render parameter
1239 (MapRenderer.draw_shape_layer): Use the new method. Remove some
1240 commented out code.
1241 (MapRenderer.draw_polygon_shape): Make the first parameter not the
1242 layer but the low-level render parameter
1243 (ScreenRenderer.draw_shape_layer): Use the low-level render
1244 parameter.
1245
1246 2003-04-15 Jonathan Coles <[email protected]>
1247
1248 * Thuban/Model/classification.py: Implemented __repr__ for
1249 the ClassGroup* classes to make debugging a bit easier.
1250 (ClassGroup.SetLabel): Check that the string is an instance
1251 of StringTypes not StringType. Accounts for Unicode strings.
1252
1253 * Thuban/Model/color.py: Implemented __repr__ to make
1254 debugging a bit easier.
1255
1256 * Thuban/Model/save.py (Saver.write_classification): Need to
1257 save the group label.
1258
1259 * test/test_load.py (testClassification): New. Loads the
1260 iceland_sample_test.thuban file and checks if it was loaded
1261 correctly.
1262
1263 2003-04-15 Jonathan Coles <[email protected]>
1264
1265 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1266 to improve rendering performance by initializing the variables
1267 that are not change each time draw_polygon_shape() is called.
1268 The values are stored in a global struct draw_info.
1269 (draw_polygon_shape): Removed initialization code that is
1270 now in draw_polygon_init().
1271
1272 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1273 drawing initialization call to draw_polygon_init()
1274 (MapRenderer.draw_polygon_shape): Use new signature of
1275 draw_polygon_shape.
1276
1277 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1278 weirdness by setting the range to (1, maxint).
1279
1280 * Thuban/Model/classification.py (ClassGroupProperties): Make
1281 instance variables private and optimize comparison operator
1282 by first checking if the color references are the same.
1283 (ClassGroupSingleton): Make instance variables private.
1284 (ClassGroupRange): Make instance variables private.
1285
1286 * HOWTO-Release: Filled in missing steps for releasing packages.
1287
1288 2003-04-15 Bernhard Herzog <[email protected]>
1289
1290 First stab at internationalized messages:
1291
1292 * Thuban/__init__.py (_): Implement the translation function for
1293 real using the python gettext module.
1294
1295 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1296 translate empty strings.
1297
1298 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1299 Add a missing space to a warning message
1300
1301 * po/README: New. Notes about the management of the translation
1302 files.
1303
1304 * po/Makefile: New. Makefile to help manage the translation files.
1305
1306 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1307
1308 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1309 translations and support files in po/
1310
1311 * setup.py (data_files): Add the *.mo files to the data_files too
1312
1313 * README: Add note about the translations when building from CVS
1314
1315 2003-04-14 Jonathan Coles <[email protected]>
1316
1317 * Thuban/UI/dock.py: Fixes some window resizing problems most
1318 noticable under windows. Always assume the button bitmaps will
1319 be there. Code clean up.
1320 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1321 images for the dock/undock button to the same images.
1322 Work around for RTbug #1801.
1323
1324 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1325 be allowed to grow within the sizer. Fixes a bug under Windows
1326 where the toolbar wasn't being drawn.
1327
1328 2003-04-14 Frank Koormann <[email protected]>
1329
1330 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1331 Updated design to try to make the button functionality more
1332 transparent.
1333
1334 2003-04-14 Jonathan Coles <[email protected]>
1335
1336 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1337 finalize the intialization of the panel.
1338
1339 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1340 creation of the panel. Should be the last thing called in the
1341 initializer of a subclass.
1342
1343 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1344 set the current selections in the combo boxes. This is needed
1345 under Windows.
1346
1347 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1348 level panel to the dialog so that the background colors are
1349 consistent under Windows.
1350
1351 2003-04-11 Jonathan Coles <[email protected]>
1352
1353 * Thuban/UI/classgen.py: Change color ramps to start at white
1354 not black.
1355
1356 * Thuban/UI/legend.py: Enable/disable the legend buttons when
1357 the legend changes. Fixes RTbug #1793.
1358
1359 * test/test_classification.py: Added test for copying of
1360 classifications.
1361
1362 2003-04-11 Jonathan Coles <[email protected]>
1363
1364 * Thuban/UI/resource.py: New. Centralize the loading of resources
1365 such as bitmaps.
1366
1367 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1368 added images to the move buttons, added 'reverse' button.
1369 (CustomRampPanel.__init__): Added images to the move buttons.
1370 (GreyRamp): New. Generates a ramp from white to black.
1371 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1372
1373 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1374 ID_PROPERTY_*.
1375 (Classifier.__init__): Minor changes to the layout.
1376 (Classifier._OnTitleChanged): Listen for when the user edits the
1377 title and update the dialog's title and the layer's title.
1378
1379 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1380
1381 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1382 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1383 if the layer's title changes.
1384
1385 * Thuban/UI/mainwindow.py: Added new menu item and associated code
1386 to open a dialog to rename the map.
1387 (MainWindow): Use new resource class to import bitmaps.
1388
1389 2003-04-11 Jonathan Coles <[email protected]>
1390
1391 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1392 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1393 Resources/Bitmaps/group_use_none.xpm,
1394 Resources/Bitmaps/group_use_not.xpm,
1395 Resources/Bitmaps/hide_layer.xpm,
1396 Resources/Bitmaps/layer_properties.xpm,
1397 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1398 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1399 New.
1400
1401 2003-04-10 Jonathan Coles <[email protected]>
1402
1403 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1404 Should pass group to ClassGroup constructor.
1405
1406 2003-04-10 Jonathan Coles <[email protected]>
1407
1408 * Thuban/Model/classification.py: (ClassGroup): Move all the common
1409 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1410 here. Implement SetVisible(), IsVisible().
1411 (ClassGroup.__init__): Add group parameter which acts as a copy
1412 constructor.
1413
1414 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1415 "Visible" check boxes.
1416 (Classifier): Rename the buttons and refactor the code to match
1417 the new labels.
1418
1419 * Thuban/UI/legend.py: Classify button is now called "Properties".
1420 Refactored the code to change variable names.
1421 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1422
1423 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1424 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1425 renamed to MainWindow.LayerEditProperties.
1426 (MainWindow.ToggleLegend): Don't include map name in legend title.
1427 (MainWindow.SetMap): Added the map name to the window title.
1428 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1429 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1430 Functionality is found in the layer properties dialog.
1431
1432 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1433 draw visible groups.
1434
1435 2003-04-09 Jonathan Coles <[email protected]>
1436
1437 * Thuban/UI/classgen.py: Modifications to allow simple
1438 addition and selection of new color schemes.
1439 (MonochromaticRamp): New. Generates a ramp between two colors.
1440 (RedRamp): New. Generates a ramp of all red.
1441 (GreenRamp): New. Generates a ramp of all green.
1442 (BlueRamp): New. Generates a ramp of all blue.
1443
1444 2003-04-09 Jonathan Coles <[email protected]>
1445
1446 * Thuban/Model/classification.py (Classification.__deepcopy__):
1447 Need to copy over field and fieldType attributes.
1448
1449 * Thuban/Model/table.py (Table.field_range): New. Retrive the
1450 maximum and minimum values over the entire table for a given
1451 field.
1452 (Table.GetUniqueValues): New. Retrieve all the unique values
1453 in the table for a given field.
1454
1455 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1456 (GenUniquePanel): New. Controls to allow the user to select
1457 which unique field values they would like in the classification.
1458 (CustomRampPanel): Code that was in ClassGenDialog that allows
1459 the user to select the properties for a custom ramp.
1460 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1461
1462 * Thuban/UI/classifier.py: Removed a lot of debugging code.
1463 (Classifier._SetClassification): Callback method so that the
1464 class generator can set the classification in the grid.
1465 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1466 editing of a group properties class into a wxWindows control.
1467
1468 * Thuban/UI/dock.py: It was decided that if the user closes
1469 a dockable window the window should simply hide itself. That
1470 way if the user wants to show the dock again it appears in the
1471 same place as it was when it was closed.
1472 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1473 (DockableWindow._OnButtonClose): Hide the window instead of
1474 destroying it.
1475 (DockableWindow._OnClose): Hide the window instead of
1476 destroying it.
1477
1478 * Thuban/UI/legend.py (LegendTree): Use a private method to
1479 consistently set the font and style of the text. Fixes RTbug #1786.
1480
1481 * Thuban/UI/mainwindow.py: Import just the Classifier class.
1482
1483 2003-04-07 Bernhard Herzog <[email protected]>
1484
1485 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1486 to the map module
1487
1488 2003-04-07 Bernhard Herzog <[email protected]>
1489
1490 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1491 favor of ToggleSessionTree
1492 (MainWindow.ToggleSessionTree): New method to toggle visibility of
1493 the session tree.
1494 (MainWindow.SessionTreeShown): New method to return whether the
1495 session tree is currently shown.
1496 (MainWindow.ToggleLegend): New method to toggle visibility of the
1497 legend
1498 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1499 LegendShown
1500 (MainWindow.LegendShown): New method to return whether the legend
1501 is currently shown.
1502 (_method_command): Add checked parameter so we can define check
1503 menu items
1504 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1505 mainwindow methods.
1506 (show_session_tree, show_legend commands): Removed.
1507 (toggle_session_tree, toggle_legend commands): New commands to
1508 toggle the visibility of the dialogs
1509
1510 2003-04-07 Jonathan Coles <[email protected]>
1511
1512 * Thuban/UI/classgen.py: Fix Windows problem.
1513
1514 * Thuban/UI/dock.py: Fix Windows problem.
1515
1516 * Thuban/UI/mainwindow.py: Use False instead of false.
1517 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1518
1519 2003-04-07 Jonathan Coles <[email protected]>
1520
1521 Since we now say that the order of the groups in a classification
1522 matters, it makes sense to be able to manipulate that order. Most
1523 of the changes to Thuban/Model/classification.py are to that end.
1524
1525 * Thuban/Model/classification.py (Classification.AppendGroup,
1526 Classification.InsertGroup, Classification.ReplaceGroup,
1527 Classification.RemoveGroup, Classification.GetGroup): Do as the
1528 names imply.
1529 (Classification.FindGroup): This was called GetGroup, but GetGroup
1530 takes an index, while FindGroup takes a value.
1531 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1532 REFERENCE. Currently there is a cyclic reference between the layer
1533 and its classification. If the classification doesn't need to know
1534 its owning layer we can change this, since it may make sense to be
1535 able to use the same classification with different layers.
1536
1537 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1538
1539 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1540 not AddGroup()
1541
1542 * Thuban/UI/classifier.py: Now that we can depend on the order in
1543 a Classification and have methods to manipulate that order we don't
1544 need to use our own data structures in the grid. We can simply make
1545 the grid/table access the information they need from a copy of
1546 the classification object.
1547 (Classifier._OnCloseBtn): Event handler for when the user clicks
1548 'Close'. This is needed so if the user applies changes and then
1549 continues to change the table the user has the option of discarding
1550 the most recent changes and keeping what they applied.
1551
1552 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1553 into the same group.
1554
1555 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1556 with a really old version of proj, PJ_VERSION won't even be defined.
1557 If it isn't defined then just compile so that the function always
1558 returns Py_False.
1559
1560 * test/test_classification.py: Fix tests to use the renamed methods.
1561 Still need to write tests for the new methods.
1562
1563 2003-04-04 Jonathan Coles <[email protected]>
1564
1565 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1566 call to SetSelection out of the method and before the call
1567 to __SelectField in __init__. This prevents a recursion of events
1568 when _OnFieldSelect is triggered by the user.
1569
1570 2003-04-04 Jonathan Coles <[email protected]>
1571
1572 * Thuban/Model/classification.py: Rename Color.None to
1573 Color.Transparent.
1574 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1575 Don't bother copying the color, since Colors are immutable.
1576
1577 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1578 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1579 Thuban/UI/renderer.py, Thuban/UI/view.py:
1580 Rename Color.None to Color.Transparent.
1581
1582 * test/test_classification.py, test/test_load.py: Rename Color.None
1583 to Color.Transparent.
1584
1585 2003-04-04 Jonathan Coles <[email protected]>
1586
1587 * Thuban/Model/classification.py: Fix assert calls.
1588 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1589 Copy the color parameter rather than hold onto a reference.
1590
1591 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1592 the color object.
1593 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1594 are sure there exists only one refernce to Color.None in the system.
1595 This allows us to use 'is' rather than the comparision functions.
1596
1597 * Thuban/Model/save.py: Fix assert calls.
1598
1599 * Thuban/UI/classifier.py: Fix assert calls.
1600 (ClassGrid._OnCellDClick): Call up to the classifier to open the
1601 dialog to edit the groups properties.
1602 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1603 correctly if a cell is resized.
1604 (ClassTable.SetClassification): New. Changes the classification
1605 that is in the table.
1606 (ClassTable.__SetRow): Allow groups to be prepended.
1607 (Classifier): New code for opening the EditProperties and
1608 GenerateRanges dialogs.
1609 (SelectPropertiesDialog.__GetColor): Only set the color in the
1610 color dialog if the current color is not None.
1611
1612 * Thuban/UI/dock.py: Fix assert calls.
1613
1614 * Thuban/UI/legend.py: Fix assert calls.
1615
1616 * Thuban/UI/renderer.py: Fix assert calls.
1617
1618 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1619 classifications.
1620 (GenRangePanel): Panel specific to range generation.
1621 (GenSingletonPanel): Panel specific to singleton generation.
1622 (ClassGenerator): Class responsible for actually generating
1623 the classification from the data gathered in the dialog box.
1624 (PropertyRamp): Generates properties whose values range from
1625 a starting property to an ending property.
1626
1627 2003-04-03 Bernhard Herzog <[email protected]>
1628
1629 * test/support.py (print_garbage_information): New function that
1630 prints information about still connected messages and memory
1631 leaks.
1632 (run_suite): Removed.
1633 (run_tests): New function for use as a replacement of
1634 unittest.main in the test_* files. This one calls
1635 print_garbage_information at the end.
1636
1637 * test/runtests.py (main): Use support.print_garbage_information
1638
1639 * test/test_layer.py: Use support.run_tests instead of
1640 unittest.main so we get memory leak information
1641 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1642 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1643 (TestLayerLegend.test_visibility): Call the layer's Destroy method
1644 to fix a memory leak.
1645
1646 * test/test_classification.py: Use support.run_tests instead of
1647 unittest.main so we get memory leak information
1648 (TestClassification.test_classification): Call the layer's Destroy
1649 method to fix a memory leak.
1650
1651 2003-04-02 Bernhard Herzog <[email protected]>
1652
1653 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1654 Handle the reference counts of the return value and errors in
1655 PyArg_ParseTuple correctly.
1656
1657 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1658 sure the filename is absolute to avoid problems when saving the
1659 session again
1660
1661 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1662
1663 2003-04-01 Jonathan Coles <[email protected]>
1664
1665 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1666 that there actually are points in the returned list of points
1667 before trying to index into the list. The list may be empty if
1668 the shape is a Null Shape.
1669
1670 2003-04-01 Bernhard Herzog <[email protected]>
1671
1672 * test/test_map.py: Don't use from <module> import *
1673
1674 2003-04-01 Jonathan Coles <[email protected]>
1675
1676 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1677 LAYER_LEGEND_CHANGED
1678
1679 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1680 self.Destroy() to close the window after yesterday's changes.
1681
1682 * test/test_map.py, test/test_session.py: Fix messages that
1683 are sent from maps and layers.
1684
1685 2003-03-31 Jonathan Coles <[email protected]>
1686
1687 * Thuban/UI/classifier.py: Commented out some debugging statements.
1688 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1689 RTbug #1769.
1690
1691 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1692 position (although position doesn't work yet under GTK).
1693 (DockableWindow.Destroy): New. Called when the window must be
1694 closed. Namely needed when the DockFrame closes and must close
1695 its children.
1696 (DockFrame): Listen for EVT_CLOSE and destroy all children.
1697
1698 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1699 when then window is told to close.
1700 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1701 comment in source for more info.
1702
1703 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1704
1705 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1706 symmetry with other such methods.
1707 (MainWindow.ShowLegend): Show the legend docked by default.
1708
1709 2003-03-28 Jonathan Coles <[email protected]>
1710
1711 * Thuban/UI/classifier.py: Support for highlighting a specific
1712 group within the grid when the classification dialog is opened.
1713 Also contains a lot of debugging printouts which will later
1714 be removed.
1715
1716 * Thuban/UI/dock.py: Complete rework on the dock code so that
1717 that it is fairly removed from the rest of the Thuban application.
1718 It is easy to add new docks which the rest of the program having
1719 to be aware of them.
1720
1721 * Thuban/UI/legend.py: Modifications to support selecting a
1722 specific group in the classification dialog. Changed how layers
1723 are drawn when the layer is visible/invisible.
1724
1725 * Thuban/UI/mainwindow.py: Removed legend specific code and
1726 replaced it with calls to the new dock code.
1727
1728 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1729 to check if scale > 0. Trying to track down a divide by zero.
1730
1731 2003-03-26 Jonathan Coles <[email protected]>
1732
1733 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1734 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1735 now part of DockableWindow.
1736 (LegendPanel.DoOnSelChanged): Select the current layer in the
1737 map.
1738 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1739 with the selected layer and/or group.
1740
1741 2003-03-26 Jonathan Coles <[email protected]>
1742
1743 This putback contains the code for dockable windows. There is
1744 no support in wxWindows as of this date for windows that can
1745 attach themselves to other windows.
1746
1747 The current model contains a DockableWindow which has a parent
1748 window for when it is detached and a dock window that it puts
1749 its contents in when it is docked. The contents of a DockableWindow
1750 must be a DockPanel. DockPanel itself derives from wxPanel.
1751
1752 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1753 message, not a LAYER_LEGEND_CHANGED message.
1754
1755 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1756
1757 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1758 as one of the style properties for the fieldTypeText item to
1759 be sure that its size is correct when the text changes.
1760
1761 * Thuban/UI/dock.py: New. Classes for the DockPanel and
1762 DockableWindow.
1763
1764 * Thuban/UI/legend.py: Added some more buttons and made the
1765 LegendPanel a DockPanel.
1766
1767 * Thuban/UI/mainwindow.py: Added sash windows to the main window
1768 and supporting functions for manipulating the sashes.
1769 (MainWindow.ShowLegend): Create a DockableWindow with the
1770 LegendPanel as the contents.
1771
1772 * Thuban/UI/messages.py: Added DOCKABLE_* messages
1773
1774 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
1775 not LAYER_LEGEND_CHANGED, messages.
1776
1777 2003-03-25 Jonathan Coles <[email protected]>
1778
1779 * setup.py: Added custom script bdist_rpm_build_script so that
1780 when the rpm is built the path to wx-config is correct.
1781
1782 * setup.cfg: Added line saying to use the custom build script
1783
1784 2003-03-20 Jonathan Coles <[email protected]>
1785
1786 Initial implementation of the Legend.
1787
1788 * Thuban/UI/legend.py: New. Creates a window that shows the map's
1789 Legend information and allows the user to add/modify classifications
1790 and how the layers are drawn on the map.
1791
1792 * setup.py: New command 'build_docs' which currently uses
1793 happydoc to generate html documentation for Thuban.
1794
1795 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
1796 Returns a string which is appropriately describes the group.
1797
1798 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
1799 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
1800
1801 * Thuban/Model/map.py (Map): Rename messages and use new, more
1802 specific, messages.
1803
1804 * Thuban/Model/messages.py: New message to indicate that a layer's
1805 data has changed (LAYER_CHANGED). New map messages to indicate
1806 when layers have been added/removed/changed or if the stacking order
1807 of the layers has changed.
1808
1809 * Thuban/Model/session.py: Rename and use new messages.
1810
1811 * Thuban/UI/classifier.py: Remember if any changes have actually
1812 been applied so that if the dialog is cancelled without an application
1813 of changes we don't have to set a new classification.
1814 (ClassDataPreviewer): Pulled out the window specific code and put it
1815 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
1816 symbols on any DC.
1817
1818 * Thuban/UI/mainwindow.py: New code to open the legend.
1819
1820 * Thuban/UI/view.py: Use new message names.
1821
1822 2003-03-19 Jonathan Coles <[email protected]>
1823
1824 * Thuban/UI/main.py (verify_versions): New. Checks the versions
1825 of Python, wxPython, and some other libraries.
1826
1827 * extensions/thuban/wxproj.cpp (check_version): Checks the given
1828 version against what wxproj was compiled with.
1829 (check_version_gtk): If wxproj was compiled with gtk then check
1830 the given version against the version of the gtk library
1831 currently being used.
1832
1833 2003-03-14 Bernhard Herzog <[email protected]>
1834
1835 * test/test_command.py: Run the tests when the module is run as a
1836 script
1837
1838 2003-03-14 Bernhard Herzog <[email protected]>
1839
1840 Implement selection of multiple selected shapes in the same layer:
1841
1842 - Introduce a new class to hold the selection. This basically
1843 replaces the interactor which was nothing more than the
1844 selection anyway. A major difference is of course that the new
1845 selection class supports multiple selected shapes in one layer
1846
1847 - Move the object that represents the selection from the
1848 application to the canvas. The canvas is a better place than the
1849 application because the selection represents which shapes and
1850 layer of the map displayed by the canvas are selected and
1851 affects how the map is drawn.
1852
1853 - Make the selection and its messages publicly available through
1854 the mainwindow.
1855
1856 - The non-modal dialogs do not get a reference to the interactor
1857 anymore as they can simply refer to their parent, the
1858 mainwindow, for the what the interactor had to offer.
1859
1860 * Thuban/UI/selection.py: New module with a class to represent the
1861 selection.
1862
1863 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
1864 these unused messages
1865
1866 * Thuban/UI/application.py (ThubanApplication.OnInit)
1867 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
1868 interactor is gone now.
1869 (ThubanApplication.CreateMainWindow): There is no interactor
1870 anymore so we pass None as the interactor argument for now for
1871 compatibility.
1872
1873 * Thuban/UI/view.py (MapCanvas.delegated_messages)
1874 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
1875 Unsubscribe, delegate messages according to the delegated_messages
1876 class variable.
1877 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
1878 attributes from instance variables as described with the
1879 delegated_methods class variable.
1880 (MapCanvas.__init__): New instance variable selection holding the
1881 current selection
1882 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
1883 pass them on to the renderer
1884 (MapCanvas.SetMap): Clear the selection when a different map is
1885 selected.
1886 (MapCanvas.shape_selected): Simple force a complete redraw. The
1887 selection class now takes care of only issueing SHAPES_SELECTED
1888 messages when the set of selected shapes actually does change.
1889 (MapCanvas.SelectShapeAt): The selection is now managed in
1890 self.selection
1891
1892 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
1893 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
1894 Unsubscribe, delegate messages according to the delegated_messages
1895 class variable.
1896 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
1897 attributes from instance variables as described with the
1898 delegated_methods class variable.
1899 (MainWindow.__init__): The interactor as ivar is gone. The
1900 parameter is still there for compatibility. The selection messages
1901 now come from the canvas.
1902 (MainWindow.current_layer, MainWindow.has_selected_layer):
1903 Delegate to the the canvas.
1904 (MainWindow.LayerShowTable, MainWindow.Classify)
1905 (MainWindow.identify_view_on_demand): The dialogs don't need the
1906 interactor parameter anymore.
1907
1908 * Thuban/UI/tableview.py (TableFrame.__init__)
1909 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
1910 (LayerTableFrame.row_selected): The interactor is gone. It's job
1911 from the dialog's point of view is now done by the mainwindow,
1912 i.e. the parent. Subscribe to SHAPES_SELECTED instead
1913 of SELECTED_SHAPE
1914
1915 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
1916 is gone. It's job from the dialog's point of view is now done by
1917 the mainwindow, i.e. the parent.
1918
1919 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
1920 gone. It's job from the dialog's point of view is now done by the
1921 mainwindow, i.e. the parent.
1922
1923 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
1924 gone. It's job from the dialog's point of view is now done by the
1925 mainwindow, i.e. the parent.
1926 (SessionTreeCtrl.__init__): New parameter mainwindow which is
1927 stored as self.mainwindow. The mainwindow is need so that the tree
1928 can still subscribe to the selection messages.
1929 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
1930 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
1931 selection is now accessible through the mainwindow. Subscribe to
1932 SHAPES_SELECTED instead of SELECTED_SHAPE
1933
1934 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
1935 SHAPES_SELECTED message now.
1936 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
1937 so deal with multiple shapes
1938 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
1939 gone. It's job from the dialog's point of view is now done by the
1940 mainwindow, i.e. the parent.
1941
1942 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
1943 parameter is now a list of shape ids.
1944 (RecordTable.SetTable): The second parameter is now a list of
1945 indices.
1946
1947 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
1948 selected_shape parameter and ivar to selected_shapes. It's now a
1949 list of shape ids.
1950 (MapRenderer.draw_label_layer): Deal with multiple selected
1951 shapes. Rearrange the code a bit so that the setup and shape type
1952 distinctions are only executed once.
1953
1954 * test/test_selection.py: Test cases for the selection class
1955
1956 2003-03-11 Jonathan Coles <[email protected]>
1957
1958 * Thuban/Model/load.py: Temporary fix so that the xml reader
1959 doesn't cause Thuban to crash.
1960
1961 * Thuban/Model/layer.py: Handle the cyclic references between
1962 a layer and its classification better, and be sure to disconnect
1963 the classification from the layer when the layer is destroyed
1964 so that we don't maintain a cyclic reference that may not be
1965 garbage collected.
1966
1967 * Thuban/Model/classification.py: See comment for layer.py.
1968
1969 2003-03-12 Jan-Oliver Wagner <[email protected]>
1970
1971 * HOWTO-Release: New. Information on the steps for releasing
1972 a new version of Thuban.
1973
1974 2003-03-11 Jonathan Coles <[email protected]>
1975
1976 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
1977 Use True instead of true.
1978 (Classifier): Should have a single panel in which all the controls lie.
1979
1980 * Thuban/UI/proj4dialog.py: Add normal border.
1981
1982 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
1983
1984 * Thuban/UI/mainwindow.py: Use True instead of true.
1985
1986 * setup.py: Update some definitions to use wxWindows2.4 files
1987
1988 * Data/iceland_sample_class.thuban: Fixed file so that the
1989 field_type information is present.
1990
1991 2003-03-10 Jonathan Coles <[email protected]>
1992
1993 * Thuban/UI/classifier.py (Classifier.__init__): Make the
1994 field type label grow so that when the text changes the
1995 size is updated correctly. This may be a wxWindows bug.
1996
1997 2003-03-10 Jonathan Coles <[email protected]>
1998
1999 * Thuban/UI/application.py: Changed SESSION_CHANGED to
2000 SESSION_REPLACED.
2001
2002 * Thuban/UI/classifier.py: Wrap text with _().
2003 (ClassGrid.CreateTable): Set dimensions and size hints here,
2004 instead of in Reset, so we only set the size once.
2005
2006 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2007
2008 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2009 Call Close() instead of Shutdown().
2010
2011 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2012
2013 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2014 Go back to using OnClose() instead of Shutdown().
2015
2016 2003-03-10 Jonathan Coles <[email protected]>
2017
2018 * Thuban/UI/classifier.py (Classifier): SelectField() needed
2019 to know the old field index as well as the new one.
2020
2021 2003-03-10 Jonathan Coles <[email protected]>
2022
2023 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2024 to correctly set the table information and call this from
2025 __init__ and from _OnFieldSelect so that all the information
2026 is up to date when the dialog opens and when a field is changed.
2027
2028 2003-03-10 Jonathan Coles <[email protected]>
2029
2030 * Thuban/Model/classification.py (Classification): Don't use
2031 layer's message function directly, use the ClassChanged() method
2032 when then classification changes. SetField/SetFieldType/SetLayer
2033 must keep the information about field name and field type in
2034 sync when an owning layer is set or removed.
2035
2036 * Thuban/Model/layer.py: Added ClassChanged() so that the
2037 classification can tell the layer when its data has changed.
2038 (Layer.SetClassification): Accepts None as an arguement to
2039 remove the current classification and correctly handles
2040 adding a new classification.
2041
2042 * Thuban/Model/load.py: Comment out print statement
2043
2044 * test/test_classification.py, test/test_save.py: New and
2045 improved tests.
2046
2047 2003-03-07 Jonathan Coles <[email protected]>
2048
2049 * Thuban/Model/classification.py: Implemented __copy__ and
2050 __deepcopy__ for ClassGroup* and ClassGroupProperites so
2051 they can easily be copied by the classifier dialog.
2052 (ClassGroupProperites.__init__): The default line color should
2053 have been Color.Black.
2054
2055 * Thuban/UI/classifier.py: Setting and Getting table values now
2056 uses a consistent set of functions.
2057 (Classifier): Now non-modal. Has field type label which changes
2058 as the field changes. Keep track of buttons in a list so that
2059 we can enable/disable the buttons when the None field is selected.
2060 (SelectPropertiesDialog): Add buttons to make the colors transparent.
2061
2062 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2063 does what OnClose did, but can be called by the application to
2064 close a window. Needed when a session changes, and we have to
2065 close the classifier windows.
2066
2067 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2068 Shuts down open dialogs. Used when a new session is created
2069 or a session is opened.
2070 (MainWindow.SaveSession): Should only call application.SaveSession()
2071 if we don't call SaveSessionAs first.
2072 (MainWindow.Classify): Allow different classifier dialogs for
2073 different layers.
2074
2075 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2076 the parent class handle it. Add Shutdown() to unsubscibe from
2077 event notification and call the parent Shutdown(). This was
2078 necessary so the application can close the tree window.
2079
2080 2003-03-06 Jonathan Coles <[email protected]>
2081
2082 * Thuban/Model/classification.py: Minor documentation changes,
2083 Addition of __eq__ and __ne__ methods.
2084 (Classification.SetLayer): prevent recursion between this method
2085 and Layer.SetClassification().
2086
2087 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2088
2089 * Thuban/Model/layer.py (SetClassification): prevent recursion
2090 between this method and Classification.SetLayer().
2091
2092 * test/test_classification.py, test/test_load.py,
2093 test/test_session.py: Fixed and added tests for the classification
2094 classes.
2095
2096 2003-03-06 Bernhard Herzog <[email protected]>
2097
2098 * Thuban/UI/classifier.py (ClassGrid.__init__)
2099 (ClassGrid.CreateTable): Move the SetSelectionMode call to
2100 CreateTable because otherwise it triggers an assertion in
2101 wxPython/wxGTK 2.4.
2102
2103 2003-03-05 Jonathan Coles <[email protected]>
2104
2105 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2106
2107 * Thuban/Model/load.py: import FIELDTYPE constants from table.
2108
2109 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2110
2111 * Thuban/Model/table.py: Put FIELDTYPE constants back.
2112
2113 2003-03-05 Jonathan Coles <[email protected]>
2114
2115 * Thuban/UI/classifier.py: Added class documentation.
2116 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2117 Store just the groups in the table and generate the other
2118 column information when it is requested. Add "None" field
2119 to pull-down to select no classification.
2120
2121 * Thuban/common.py: Moved FIELDTYPE constants from table.py
2122 (Str2Num): Only catch ValueError exceptions.
2123
2124 * Thuban/Model/classification.py: Class documentation. Renaming
2125 of methods with Stroke to Line. Groups are stored in a single
2126 list with the default as the first element. Groups are searched
2127 in the order they appear in the list.
2128
2129 * Thuban/Model/color.py: Documentation.
2130
2131 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2132 the kind of data represented by a field.
2133
2134 * Thuban/Model/load.py (ProcessSession): Use proper string
2135 conversion function; fixes RTbug #1713.
2136
2137 * Thuban/Model/save.py (Saver): Store field type information.
2138
2139 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2140 (Table): Add field_info_by_name() to retrieve field information
2141 by specifying the field name, not the number.
2142
2143 * Thuban/UI/mainwindow.py: Function name changes.
2144
2145 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2146 get the layer classification once. Don't try to classify
2147 values when the field is None: just use the default properties.
2148
2149 * Thuban/UI/view.py: Function name changes.
2150
2151 * Doc/thuban.dtd: Add field_type attribute to a classification.
2152
2153 2003-03-04 Bernhard Herzog <[email protected]>
2154
2155 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2156 the fill and stroke layer attributes optional with suitable
2157 default values. Add the stroke_width layer attribute. Use correct
2158 syntax for empty elements. Make the attribute list for labels
2159 refer to the label element.
2160
2161 2003-03-04 Bernhard Herzog <[email protected]>
2162
2163 * setup.py (thuban_build_py.build): Add a comment about distutils in
2164 Python 2.3 containing some of the functionality we implement in
2165 setup.py ourselves.
2166
2167 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2168 before the selection mode. Doing it the other way round triggers
2169 an assertion in wxWindows.
2170
2171 * Thuban/Model/save.py (escape): Fix typo in doc-string
2172
2173 * Thuban/Model/classification.py: Remove unnecessary wxPython
2174 import
2175
2176 2003-03-04 Jonathan Coles <[email protected]>
2177
2178 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2179 Parameter 'value' should default to None.
2180
2181 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2182 the class attribute __classification is now private.
2183
2184 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2185 Classifier to ClassGrid. Added support for removing selected rows,
2186 which including code for keeping track of when cells are selected,
2187 and deselected.
2188 (ClassTable): Support for added/removing rows. Fixed a problem
2189 with __ParseInput whereby it would not allow strings (only numbers)
2190 to be entered.
2191 (Classifier): Added button and supporting code for removing
2192 selected rows.
2193
2194 2003-02-27 Jonathan Coles <[email protected]>
2195
2196 * Thuban/common.py: Moved color conversion functions into
2197 Thuban/UI/common.py.
2198 (Str2Num): Now converts the float (not the string) to a long/int
2199 so that an exception isn't thrown.
2200
2201 * Thuban/UI/common.py: Common functions used in several UI modules
2202
2203 * Thuban/Model/classification.py: Changed the class hierarchy
2204 so that a Classification consists of Groups which return
2205 Properties when a value matches a Group.
2206
2207 * Thuban/Model/layer.py: Fixed name resolution problem.
2208
2209 * Thuban/Model/load.py: Use new Classification and Group functions.
2210
2211 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2212 failure.
2213 (Saver.write_classification): Use new Classification and Group
2214 functions.
2215
2216 * Thuban/UI/classifier.py: Changes to use new Classification and Group
2217 functions. Fix to create a tuple with a single value instead of
2218 simply returning the value.
2219
2220 * Thuban/UI/renderer.py: Use new Classification and Group functions.
2221 Use common.py functions.
2222
2223 * Thuban/UI/tree.py: Use common.py functions.
2224
2225 * test/test_classification.py: Use new Classification and Group
2226 classes.
2227
2228 2003-02-24 Jonathan Coles <[email protected]>
2229
2230 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2231 functions from Thuban color objects to wxWindow colour objects.
2232
2233 * Thuban/Model/classification.py (Classification): Renamed
2234 GetProperties() to GetClassData(). Used the new iterator
2235 in TreeInfo().
2236 (ClassIterator): Iterator implementation to iterate over the
2237 ClassData objects in a classification object.
2238
2239 * Thuban/Model/save.py (Saver.write_classificaton): Uses
2240 the new iterator to save the classification information.
2241
2242 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2243 for changing the stroke and fill colors and previewing the
2244 changes.
2245
2246 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2247 MainWindow.SaveSessionAs): Text string changes so the dialogs
2248 have more meaningful titles.
2249
2250 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2251 Classification method name from GetProperties to GetClassData.
2252
2253 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2254 instead of accessing now non-existent class variables.
2255
2256 2003-02-24 Bernhard Herzog <[email protected]>
2257
2258 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2259 unneeded Shape() call. Rendering is substantially faster without
2260 it and it avoids some problems with broken shape files.
2261
2262 2003-02-20 Frank Koormann <[email protected]>
2263
2264 Force minimal size of identify and label dialogs. The autosizing
2265 looked too ugly.
2266
2267 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2268 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2269 Set size of listctrl.
2270 * Thuban/UI/identifyview.py (IdentifyView.__init__):
2271 Set size of dialog.
2272
2273 2003-02-19 Jonathan Coles <[email protected]>
2274
2275 * test/test_classification.py, test/test_layer.py,
2276 test/test_load.py, test/test_map.py, test/test_session.py:
2277 Updated the tests to use the new functions that are in the
2278 respective classes.
2279
2280 * Thuban/Model/classification.py (Classification):
2281 Uses the new ClassData* classes. Modification messages are
2282 passed up to the parent layer (if it exists).
2283 (ClassData): New class to encapsulate the common data in each
2284 classification property.
2285 (ClassDataDefault): Represents the Default class. data.
2286 (ClassDataPoint): Represents a single class. data point
2287 (ClassDataRange): Represents a class. range
2288 (ClassDataMap): Represents a class. map (unused).
2289
2290 * Thuban/Model/color.py: Added Color.None to represent something
2291 with no color. Color.Black represents the color black.
2292 (NoColor): Helper class derived from Color to represent something
2293 with no color.
2294
2295 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2296 stroke_width attributes. Made the 'classification' attribute private.
2297 New methods for setting/getting the classification.
2298
2299 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2300 to get the classifcation and use the new ClassData* classes to
2301 hold the classification data. Use Str2Num to convert numbers
2302 properly.
2303
2304 * Thuban/Model/save.py (Saver): Use new Color and Classification
2305 methods
2306
2307 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2308 custom grid.
2309 (ClassTable): Support for editing Values and Labels and for
2310 changing what type (point or range) of data is stored in each
2311 property based on how the user enters the data.
2312 (Classifier): Support for saving the new classifications and
2313 launching the dialog to edit a property.
2314 (SelectPropertiesDialog): New class for editing the visual
2315 properties of a classification (stroke color, width, and fill color)
2316 (ClassPreviewer): Took the Draw method from ClassRenderer and
2317 made most of it into this new class. Intend to use this class in
2318 the SelectPropertiesDialog for previewing changes.
2319
2320 * Thuban/UI/renderer.py: Use new Color and Classification methods.
2321
2322 * Thuban/UI/tree.py: Formatting changes.
2323
2324 * Doc/thuban.dtd: Add 'label' element
2325
2326 * Thuban/common.py: New. Contains common routines used throughout
2327 the code.
2328 (Str2Num): Takes a string and converts it to the "best" type of
2329 number.
2330
2331 2003-02-14 Bernhard Herzog <[email protected]>
2332
2333 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2334 dragging flag is always set to 0 even when the tool implementation
2335 raises an exception
2336
2337 2003-02-11 Bernhard Herzog <[email protected]>
2338
2339 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2340 method to create a splash screen.
2341 (ThubanApplication.ShowMainWindow): New. Show the main window.
2342 Needed so the splash screen can display the mainwindow
2343 (ThubanApplication.OnInit): Call the
2344 new splash_screen method to determine whether the application
2345 should display a splash screen. If it displays a splash screen do
2346 not immediately show the main window.
2347
2348 2003-02-11 Jonathan Coles <[email protected]>
2349
2350 * Thuban/Model/classification.py: Added import line to fix
2351 feature conflicts between running on python2.2 and python2.1.
2352
2353 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2354 onto the clinfo parameter, so removed the deepcopy().
2355
2356 2003-02-10 Jonathan Coles <[email protected]>
2357
2358 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2359 Added element_open variable to track opening and closing of tags
2360 so that tags that don't span more than one line are closed with
2361 /> instead of </tag_name>. Use the GetDefault*() methods of
2362 the Classification class.
2363
2364 * Thuban/Model/classification.py (Classificaton): Added set and
2365 get methods for the default data. The class also takes a layer
2366 reference so that modification messages can be sent. Fixed the
2367 methods to use the new ClassData class.
2368 (ClassData): New class to encapsulate the classification data
2369
2370 * Thuban/Model/layer.py (Layer): Remove the
2371 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2372 SetDefault*() methods on the layer's classification object.
2373 (Layer.__init__): Use the new SetDefault*() methods in the
2374 Classification class.
2375
2376 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2377 object instead of a dictionary.
2378
2379 * Thuban/UI/classifier.py (ClassRenderer): New class to
2380 draw the classifications in the dialog box's table.
2381 (Classifier): Modified to use the ClassRenderer class.
2382
2383 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2384 methods of the Classification class.
2385
2386 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2387 of the ClassData class.
2388
2389 * test/test_classification.py, test/test_layer.py,
2390 test/test_map.py, test/test_session.py: Fix the tests to work
2391 with the above code changes.
2392
2393 2003-02-03 Jonathan Coles <[email protected]>
2394
2395 * Thuban/Model/classification.py (Classification): Added getNull()
2396 to return the NullData reference
2397
2398 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2399 Layer.SetStrokeWidth): Modified these functions to change the
2400 null data in the classification rather than keep these values
2401 directly in the Layer class. Menu options to change these values
2402 work again.
2403
2404 2003-01-28 Jonathan Coles <[email protected]>
2405
2406 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2407 Fixed crashing problem on some systems. Dialog box shows
2408 classification data.
2409
2410 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2411 Colors in the tree view.
2412
2413 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2414 the tree info for classifications. Commented out unnecessary lines.
2415
2416 * Thuban/Model/classification.py (Classification.TreeInfo): New
2417 function to add information about the classification into the
2418 tree view.
2419
2420 2003-01-27 Jan-Oliver Wagner <[email protected]>
2421
2422 * Thuban/__init__.py (_): New.
2423
2424 * Thuban/Model/classification.py, Thuban/Model/extension.py,
2425 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2426 Thuban/Model/session.py, Thuban/UI/application.py,
2427 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2428 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2429 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2430 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2431 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2432
2433 2003-01-27 Jonathan Coles <[email protected]>
2434
2435 * Thuban/Model/layer.py: Classification initialization calls.
2436
2437 * Thuban/Model/classification.py: Created class to encapsulate
2438 a layer classification. Supports specific data points and
2439 ranges.
2440
2441 * Thuban/Model/load.py: Added support for loading classification
2442 information.
2443
2444 * Thuban/Model/save.py: Added support for saving classification
2445 information.
2446
2447 * Thuban/UI/classifier.py: Initial class for a dialog box for
2448 specifying classification information.
2449
2450 * Thuban/UI/mainwindows.py: Support for opening the classifier
2451 dialog.
2452
2453 * Thuban/UI/renderer.py: Support for drawing a layer with the
2454 classification information.
2455
2456 * Data/iceland_sample_class.thuban: iceland_sample with
2457 classification data.
2458
2459 * test/test_classification: Tests for the Classification class.
2460
2461 2002-12-09 Bernhard Herzog <[email protected]>
2462
2463 * test/test_command.py: New. Tests for the command classes.
2464
2465 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2466 (Command.IsTool): New method to distinguish between command
2467 switching tools and other commands.
2468
2469 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2470 the tool to avoid direct assignments to instance variables
2471 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2472 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2473 change the tool
2474
2475 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2476 active tool's command turns insensitive, disable the tool.
2477 (_tool_command): Use the new ToolCommand class
2478
2479 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2480 SelectTool method to change the tool
2481 (iconfile): Use the ToolCommand class
2482
2483 2002-12-03 Bernhard Herzog <[email protected]>
2484
2485 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2486 the case of selected items that are not children of Layers or Maps
2487 properly. Previously this bug would trigger an assertion in
2488 wxWindows.
2489
2490 2002-11-06 Frank Koormann <[email protected]>
2491
2492 * Thuban/UI/mainwindow.py: Altered the order of tools in the
2493 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2494 Full Extent).
2495
2496 2002-10-23 Bernhard Herzog <[email protected]>
2497
2498 * setup.py (setup call): version now 0.1.3
2499
2500 * MANIFEST.in: Add the files in test/
2501
2502 * test/README: Add note about tests requiring the iceland data
2503
2504 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2505 copyright notice.
2506
2507 2002-10-18 Bernhard Herzog <[email protected]>
2508
2509 * test/test_map.py
2510 (TestMapWithContents.test_projected_bounding_box): Use an explicit
2511 epsilon.
2512
2513 * test/support.py (FloatComparisonMixin.assertFloatEqual)
2514 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2515 message if the assertion fails and don't return the return value
2516 of self.assert_. In assertFloatSeqEqual the return meant that not
2517 all items of the sequence were compared.
2518
2519 2002-09-20 Bernhard Herzog <[email protected]>
2520
2521 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2522
2523 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2524
2525 * test/test_map.py (TestMapWithContents.test_tree_info): Create
2526 the string with the bounding box on the fly because of platform
2527 differences in the way %g is handled.
2528
2529 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2530 DBFfile too because Thuban layers can't yet cope missing DBF
2531 files.
2532
2533 2002-09-20 Bernhard Herzog <[email protected]>
2534
2535 * test/test_menu.py: Use initthuban instead of
2536 add_thuban_dir_to_path to initialize Thuban.
2537
2538 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2539 Mixin class for float comparisons
2540 (SubscriberMixin): New. Mixin class to test messages sent through
2541 the Connector class
2542
2543 * test/README: Fix a typo and add the -v flag to the command for
2544 individual tests
2545
2546 * test/test_session.py: New. Test cases for Thuban.Model.session
2547
2548 * test/test_proj.py: New. Test cases for Thuban.Model.proj
2549
2550 * test/test_map.py: New. Test cases for Thuban.Model.map
2551
2552 * test/test_layer.py: New. Test cases for Thuban.Model.layer
2553
2554 * test/test_label.py: New. Test cases for Thuban.Model.label
2555
2556 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2557
2558 * test/test_color.py: New. Test cases for Thuban.Model.color
2559
2560 * test/test_base.py: New. Test cases for Thuban.Model.base
2561
2562 2002-09-13 Bernhard Herzog <[email protected]>
2563
2564 * Thuban/Model/session.py (Session.forwarded_channels): Forward
2565 the CHANGED channel too.
2566
2567 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2568 CHANGED channel too.
2569 (Map.__init__): Call the Modifiable constructor as well.
2570
2571 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2572 event if the modified flag changes.
2573 (Modifiable.changed): Tweak the doc-string.
2574
2575 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2576 (MainWindow.set_position_text): Put the code that puts the text
2577 with the mouse position into the status bar into the new method
2578 set_position_text so that it can overwritten in derived classes.
2579
2580 2002-09-12 Bernhard Herzog <[email protected]>
2581
2582 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2583 message box on the main window.
2584
2585 2002-09-11 Bernhard Herzog <[email protected]>
2586
2587 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2588 the 'E' because it's less likely to interfere with other menu
2589 entries.
2590 (MainWindow.build_menu): remove an incorrect comment.
2591
2592 2002-09-10 Bernhard Herzog <[email protected]>
2593
2594 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2595 (_tool_command): Add sensitive parameter
2596 (_has_visible_map): Sensitivity callback to tools and other
2597 commands that require a visible map. Use it in map_zoom_in_tool,
2598 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2599 and map_full_extent
2600
2601 2002-09-06 Bernhard Herzog <[email protected]>
2602
2603 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2604 VIEW_POSITION
2605
2606 2002-09-04 Frank Koormann <[email protected]>
2607
2608 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2609
2610 2002-09-02 Bernhard Herzog <[email protected]>
2611
2612 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2613 wxWindows already and our implementation doesn't work correctly
2614 with wxGTK 2.3:
2615 (MapCanvas.__init__): Remove the instance variable
2616 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2617 be drawin
2618 (MapCanvas.OnIdle): Removed.
2619
2620 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2621 a parameter to determine the size of the rectangle.
2622 (MapCanvas.find_shape_at): Create the box around the point on a
2623 layer by layer basis and make the size depend on the shape type.
2624 This solves a problem with the selection of point shapes at the
2625 border of the layer's bounding box
2626
2627 2002-08-30 Bernhard Herzog <[email protected]>
2628
2629 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2630 for the sensitivity of remove layer.
2631 (_can_remove_layer): New. Sensitivity callback for remove layer
2632 (Command layer_remove): Use _can_remove_layer
2633
2634 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2635 determine whether a given layer can be deleted.
2636
2637 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2638 (MapCanvas.do_redraw): Get rid of the unused update_region
2639 instance variable
2640
2641 * Thuban/UI/view.py: Add/update some doc-strings.
2642
2643 * test/: new subdirectory with a bunch of unit tests.
2644
2645 * test/README, test/test_table.py, test/test_save.py,
2646 test/test_menu.py, test/test_load.py: Initial set of tests and
2647 brief instructions on how to run them
2648
2649 2002-08-29 Bernhard Herzog <[email protected]>
2650
2651 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2652 arcs with multiple parts.
2653
2654 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2655 Handle degenrate rectangles.
2656
2657 * Thuban/Model/table.py: Make writing records work correctly:
2658 (Table.__init__): Keep track of whether the DBF is open for
2659 writing
2660 (Table.write_record): Open the DBF file for writing when necessary
2661
2662 2002-08-27 Bernhard Herzog <[email protected]>
2663
2664 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2665 dbf files only for reading by default. Use a new writable dbf
2666 object for writing.
2667
2668 2002-08-26 Bernhard Herzog <[email protected]>
2669
2670 * Thuban/UI/mainwindow.py: Refactor the context creation:
2671 (MainWindow.Context): New method to return a context
2672 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2673 new method
2674
2675 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2676 layer table specific code from TableGrid into LayerTableGrid
2677 (TableFrame, LayerTableFrame): Split the layer table specific code
2678 from TableFrame into LayerTableFrame
2679 (LayerTableGrid.select_shape): Remove a debug print
2680
2681 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2682 LayerTableFrame
2683
2684 2002-08-23 Bernhard Herzog <[email protected]>
2685
2686 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2687 absolute filename.
2688
2689 2002-08-22 Bernhard Herzog <[email protected]>
2690
2691 * Thuban/Model/table.py (Table.write_record): New method to write
2692 records.
2693 (Table.__init__): Open the DBF file for writing too.
2694
2695 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2696 into the underlying table.
2697
2698 * extensions/shapelib/shapefil.h (DBFCommit),
2699 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2700 commit any changes made to the DBF file.
2701
2702 * Thuban/UI/mainwindow.py (make_check_current_tool)
2703 (_tool_command): Put the code that generates the "checked"
2704 callback into a separate function so that we can reuse it
2705 elsewhere
2706
2707 * Thuban/Model/save.py (Saver): New class to handle serializing a
2708 session into an XML file. The main reason to introduce a class is
2709 that applications built on Thuban can derive from it so that they
2710 can save additional information in a session file.
2711 (save_session): Delegate almost all the work to the Saver class.
2712 Rename the filename argument to file because it may be a file like
2713 object now.
2714
2715 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2716 code. Remove the little test code which would be executed when the
2717 module is run as a script which didn't work anymore since it can't
2718 import the other Thuban modules.
2719 (ProcessSession, load_session): Refactor the ProcessSession to
2720 have one method for each element start and end tag so that derived
2721 classes can easily override the processing of individual tags.
2722 Also, always parse with namespaces enabled because applications
2723 built on top of Thuban will likely use namespaces if they extend
2724 the session file format.
2725
2726 2002-08-21 Bernhard Herzog <[email protected]>
2727
2728 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2729 because thubaninit_contents will do it for us.
2730
2731 2002-08-16 Jan-Oliver Wagner <[email protected]>
2732
2733 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2734 tree window already open
2735
2736 2002-08-15 Bernhard Herzog <[email protected]>
2737
2738 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2739 with self.
2740
2741 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2742 when we have actually captured it.
2743
2744 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2745 shapefile and destroy the table.
2746
2747 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2748
2749 2002-08-14 Bernhard Herzog <[email protected]>
2750
2751 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2752 instance variable columns
2753 (RecordTable.GetTypeName): row and col may be negative in some
2754 cases.
2755
2756 * setup.py (InstallLocal.initialize_options)
2757 (InstallLocal.finalize_options, InstallLocal.user_options): New
2758 option create-init-file to build a thubaninit.py when running
2759 install_local
2760 (InstallLocal.run): Create the thubaninit.py module when requested
2761 (thubaninit_contents): Split the template into several parts and
2762 create a new function thubaninit_contents that creates the
2763 contents of a thubaninit module.
2764 (ThubanInstall.run): Use the new function to create the thubaninit
2765 module.
2766
2767 2002-07-30 Bernhard Herzog <[email protected]>
2768
2769 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
2770 cleanup.
2771 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
2772
2773 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
2774 direct base class' Destroy method.
2775
2776 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
2777 layers.
2778 (Map.Destroy): Destroy the label_layer as well and call the
2779 inherited Desatroymethod first so that no more messages are
2780 issued.
2781 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
2782 message if the stacking order actually has changed. Add
2783 doc-strings.
2784 (Map.BoundingBox): Correct the doc-string.
2785 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
2786 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
2787
2788 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
2789 all labels.
2790
2791 2002-07-29 Bernhard Herzog <[email protected]>
2792
2793 * Thuban/Model/map.py (Map.subscribe_layer_channels)
2794 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
2795 to a layer's channels into separate methods.
2796 (Map.RemoveLayer, Map.AddLayer): Call the new methods
2797 (Map.Destroy): Unsubscribe from a layer's channels before
2798 destroying it.
2799
2800 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
2801 selected_layer parameter to searched_layer which is the layer to
2802 search in.
2803 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
2804 search to that layer. Return the selected layer and shape.
2805
2806 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
2807 typo
2808
2809 2002-07-24 Bernhard Herzog <[email protected]>
2810
2811 * Thuban/UI/application.py (ThubanApplication.create_session):
2812 Extend the doc string.
2813 (ThubanApplication.subscribe_session)
2814 (ThubanApplication.unsubscribe_session): New methods to
2815 subscribe/unsubscribe to/from session channels.
2816 (ThubanApplication.SetSession): Call the new methods here.
2817 (ThubanApplication.maps_changed, ThubanApplication.set_map):
2818 Renamed set_map to maps_changed. Its now a subscriber for
2819 MAPS_CHANGED.
2820
2821 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
2822 x-coordinate in case of simple clicks
2823
2824 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
2825 don't pass it as a parameter
2826
2827 * Thuban/Model/session.py (Session.RemoveMap): New
2828
2829 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
2830 window size into a parameter.
2831
2832 2002-07-23 Bernhard Herzog <[email protected]>
2833
2834 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
2835 just commands.
2836
2837 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
2838 parameter list a bit to allow setting the window title and the
2839 initial message in the status bar. Update the callers.
2840
2841 * Thuban/UI/application.py (ThubanApplication.OnInit)
2842 (ThubanApplication.CreateMainWindow): Put the mainwindow
2843 instantiation into a separate method so that it can be overridden
2844 by a subclass.
2845
2846 2002-07-19 Bernhard Herzog <[email protected]>
2847
2848 * Thuban/Model/session.py: Issue a CHANGED message every time
2849 another changed message is issued to make it easier to get
2850 notified of changes.
2851 (Session): Update the doc string
2852 (Session.forward): Issue changed-events as CHANGED as well.
2853 (Session.changed): Overwrite the inherited version to issue
2854 CHANGED events as well.
2855
2856 * Thuban/UI/tree.py: We can now simply subscribe to the session's
2857 CHANGED channel to be informed of changes.
2858 (SessionTreeCtrl.session_channels): Not needed any longer.
2859 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
2860 Only have to (un)subscribe CHANGED
2861
2862 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
2863
2864 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
2865 for the wxPython locale bug to __init__.py so that it's
2866 automatically executed by anybody using UI code from Thuban.
2867
2868 2002-07-18 Bernhard Herzog <[email protected]>
2869
2870 * Thuban/UI/main.py (main): app no longer needs to be global
2871
2872 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
2873 as parameter and store it in an instance variable
2874 (MainWindow.invoke_command, MainWindow.update_command_ui)
2875 (MainWindow.save_modified_session, MainWindow.NewSession)
2876 (MainWindow.OpenSession, MainWindow.SaveSession)
2877 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
2878 application object.
2879
2880 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
2881 the main window with self.
2882
2883 * Thuban/UI/context.py: New module with the context class
2884
2885 * Thuban/UI/command.py (Command): Update doc string.
2886
2887 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
2888 MainWindow.update_command_ui): Pass an instance of the context
2889 class to the command's methods
2890 (check_current_tool, call_method): Handle the new context
2891 implementation
2892
2893 * Examples/simple_extensions/simple_tool.py (simple_tool,
2894 check_simple_tool): Handle the new context implementation
2895
2896 * Examples/simple_extensions/simple_command.py (simple_command):
2897 Handle the new context implementation. Update the comments about
2898 the context.
2899
2900 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
2901 doc-string
2902 (ThubanApplication.Session): New method to return the session
2903 object
2904
2905 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
2906 interactor's selected_layer may not be a layer of the current
2907 session when the tree is updated while a new session is being set.
2908
2909 2002-07-17 Bernhard Herzog <[email protected]>
2910
2911 * Thuban/UI/tree.py (color_string): Removed. No longer used.
2912 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
2913 update_tree into update_tree and add_items. The tree now uses a
2914 more generic way to display the contents of the tree.
2915 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
2916
2917 * Thuban/Model/layer.py (Layer.TreeInfo),
2918 Thuban/Model/extension.py (Extension.TreeInfo),
2919 Thuban/Model/map.py (Map.TreeInfo),
2920 Thuban/Model/session.py (Session.TreeInfo):
2921 Add TreeInfo methods to implement the new tree view update scheme
2922
2923 2002-07-16 Bernhard Herzog <[email protected]>
2924
2925 * Thuban/UI/application.py: Don't use "import from" for the
2926 MainWindow. It can't always be resolved.
2927 (ThubanApplication.OnInit): change reference to MainWindow
2928 accordingly.
2929
2930 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
2931 completely
2932
2933 2002-07-10 Bernhard Herzog <[email protected]>
2934
2935 * setup.py (create_init_module): New configurable variable whose
2936 default depends on the platform we're running on.
2937 (ThubanInstall.initialize_options): Initialize
2938 self.create_init_module from the global create_init_module
2939 (ThubanInstall.user_options): indictate that the options
2940 create-init-module and init-module-dir have arguments.
2941
2942 * setup.py: In the setup call change the version number to include
2943 cvs.
2944
2945 * MANIFEST.in: Add the files in Examples
2946
2947 2002-07-09 Bernhard Herzog <[email protected]>
2948
2949 * setup.py: In the setup call, use the thuban homepage as the
2950 value of the url parameter.
2951
2952 * Examples: New subdirectory for examples.
2953
2954 * Examples/simple_extensions/simple_tool.xpm,
2955 Examples/simple_extensions/simple_tool.py,
2956 Examples/simple_extensions/simple_command.py,
2957 Examples/simple_extensions/README: Simple examples showing how to
2958 add new commands and tools.
2959
2960 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
2961 bdist_rpm that we also have an install script.
2962 (bdist_inno): Add 2002 to the copyright notice.
2963
2964 * setup.py: Create a file in python's site-packages directory to
2965 make installation of Thuban as a library easier.
2966 (ThubanInstall.user_options): Add two new options,
2967 create-init-module and init-module-dir
2968 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
2969 filenames for installation in the default directories.
2970 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
2971 the inherited methods to capture some filenames before they're
2972 transformed too much by distutils.
2973 (ThubanInstall.run): Create the init module if requested.
2974 (ThubanInstall.thuban_init_filename): New method to return the
2975 full name of the init module.
2976 (ThubanInstall.get_outputs): Append the filename of the init
2977 module.
2978
2979 2002-07-08 Bernhard Herzog <[email protected]>
2980
2981 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
2982 handle the prefix properly which means that the default for the
2983 installation prefix should be /usr for RPMs and /usr/local when
2984 doing a normal source install.
2985 (bdist_rpm_install_script): Script to override the default install
2986 commands in the specfile generated by the bdist_rpm command.
2987 (thuban_bdist_rpm.user_options): Add a prefix option
2988 (thuban_bdist_rpm.initialize_options): Init the prefix option.
2989 Create the script files for the spec files as empty files here
2990 (thuban_bdist_rpm._make_spec_file): Override the inherited method
2991 to fill the script files with content.
2992
2993 * Thuban/Model/save.py (relative_filename): Wrapper around
2994 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
2995 argument. save_session now automatically uses this version,
2996 solving a problem when saving to a relative filename.
2997
2998 * setup.py: In the setup call, make sure that the library
2999 directories are under $prefix/lib not directly under $prefix.
3000
3001 2002-06-20 Jan-Oliver Wagner <[email protected]>
3002
3003 * Thuban/Model/extension.py: new module to handle extension objects.
3004 * Thuban/Model/messages.py: new messages for extensions.
3005 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
3006 Session.AddExtension): new for handling extensions.
3007 Also some other minor changes to round up extension handling.
3008 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
3009 of Extension titles and title and names of its objects.
3010
3011 2002-05-29 Bernhard Herzog <[email protected]>
3012
3013 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
3014 the events for a command.
3015 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
3016 Call bind_command_events to bind the events. add_toolbar_command
3017 can now bind events too so that it's possible to have commands
3018 that are only available through the toolbar.
3019 (MainWindow.init_ids): New instance variable events_bound to keep
3020 track of for which commands events have been bound.
3021
3022 2002-05-28 Bernhard Herzog <[email protected]>
3023
3024 * Thuban/UI/menu.py: New module to build and manage menus.
3025
3026 * Thuban/UI/mainwindow.py: Remove some unused imports.
3027 (MainWindow.__init__, main_menu): move the definition of the main
3028 menu from __init__ to the Menu instance main_menu.
3029 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
3030 build the menu bar and sub-menus from a menu description.
3031
3032 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
3033 startup file
3034 (ThubanApplication.read_startup_files): New method to run
3035 ~/.thuban/thubanstart.py
3036
3037 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
3038 Move the toolbar definition to the Menu instance main_toolbar.
3039 (MainWindow.build_toolbar): New method to build the toolbar
3040 similar to the build_menu methods
3041
3042 2002-05-23 Bernhard Herzog <[email protected]>
3043
3044 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
3045 layer_outline_color. Fix it in the definition of the command too.
3046
3047 * Thuban/UI/command.py (Command): Fix typo in doc string
3048
3049 2002-05-22 Bernhard Herzog <[email protected]>
3050
3051 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
3052 in the docstring
3053
3054 2002-05-15 Bernhard Herzog <[email protected]>
3055
3056 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
3057 when the shapefile is empty.
3058 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
3059 now return None for empty shapefiles. Update doc-strings.
3060
3061 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
3062 the layer's bbox being None.
3063
3064 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
3065 layer's bbox being None.
3066
3067 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
3068 necessary.
3069 (MapCanvas.__init__): New instance variables, last_selected_layer
3070 and last_selected_shape to determine how the selection has
3071 changed.
3072
3073 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
3074 AutoSizeColumns because it will cause a traversal of the entire
3075 table which for large .dbf files will take a very long time.
3076
3077 2002-05-14 Bernhard Herzog <[email protected]>
3078
3079 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
3080 maximum depth for the tree than shapelib does by default.
3081
3082 2002-05-10 Bernhard Herzog <[email protected]>
3083
3084 * setup.py (py_modules): The shptree modules doesn't have a
3085 wrapper, so don't include it in the py_modules
3086
3087 2002-05-08 Bernhard Herzog <[email protected]>
3088
3089 * extensions/shapelib/shptree.c (compare_ints): Make arguments
3090 const void * as in the qsort prototype
3091 (SHPTreeFindLikelyShapes): Remove some unused variables.
3092
3093 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
3094 maintains to redraw the window during a drag.
3095 (MapCanvas.unprojected_rect_around_point): New method to determine
3096 a small region around a point for hit-testing.
3097 (MapCanvas.find_shape_at): Only test the shapes in a small region
3098 around the point.
3099
3100 * setup.py: Increment the version to 0.1.2
3101
3102 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
3103 debug print and set session to None after unsubscribing
3104
3105 2002-05-07 Bernhard Herzog <[email protected]>
3106
3107 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
3108 the file to have a .thuban extension.
3109
3110 * Thuban/UI/tree.py (session_channels): New class constant with
3111 all the session channels to subscribe to to update the tree
3112 (SessionTreeCtrl.session_changed): Remember the session so that we
3113 can unsubscribe properly. Use the new class constant to
3114 unsubscribe from the old session and subscribe to the new one.
3115 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
3116 subscriptions of the SessionTreeCtrl.
3117 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
3118
3119 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
3120 Session Tree" command to the file menu.
3121
3122 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
3123 as update_region to the renderer.
3124
3125 * Thuban/UI/renderer.py
3126 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
3127 update box is now directly a tuple, not a wxRect anymore.
3128
3129 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
3130 prints.
3131
3132 2002-05-07 Bernhard Herzog <[email protected]>
3133
3134 * setup.py: Add the shptree extension module. See
3135 extensions/pyshapelib/ChangeLog for more details.
3136
3137 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
3138 extensions/shapelib/dbfopen.c: Really update to the versions of
3139 shapelib 1.2.9. For some reason it wasn't really done on
3140 2002-04-11.
3141
3142 * extensions/shapelib/shptree.c: Modified version of shptree.c of
3143 shapelib 1.2.9. The only real difference is the use of qsort
3144 instead of a bubble sort implementation
3145
3146 * Thuban/Model/layer.py (Layer.__init__): New instance variable
3147 shapetree to hold the shapelib quadtree for the shapefile
3148 (Layer.open_shapefile): Create the quad tree.
3149 (Layer.ShapesInRegion): New method to return the ids of shapes in
3150 a given region using the quad tree.
3151
3152 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
3153 comment
3154 (draw_polygon_shape): Accept both arcs and polygons.
3155 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
3156 the api.
3157
3158 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
3159 return the shape ids to be rendered in a given layer.
3160 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
3161 ids. Use draw_polygon_shape to draw arc shapes as well.
3162 (ScreenRenderer.RenderMap): New parameter for the rectangle that
3163 has to be updated
3164 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
3165 calling it's ShapesInRegion method.
3166
3167 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3168 update_region for the update region.
3169 (MapCanvas.OnPaint): Maintain the update region
3170 (MapCanvas.do_redraw): Pass the bounding box of the update_region
3171 to the renderer when drawing the bitmap. Reset the update_region.
3172
3173 2002-05-03 Bernhard Herzog <[email protected]>
3174
3175 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
3176 MainWindow.OpenSession): Change the file extension of the session
3177 files to .thuban
3178
3179 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
3180 Move the map channels to be forwarded by the session into the
3181 class constant with forwarded_channels. Also add
3182 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
3183 forwarded_channels
3184
3185 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
3186 typo and some rewording).
3187
3188 2002-05-02 Bernhard Herzog <[email protected]>
3189
3190 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
3191 around to speed up most redraws:
3192 (MapCanvas.__init__): New instance variable bitmap which holds the
3193 bitmap
3194 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
3195 self.bitmap to draw.
3196 (MapCanvas.full_redraw): New method to force a full redraw
3197 including the bitmap
3198 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
3199 make sure the bitmap is redrawn.
3200 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
3201 MapCanvas.shape_selected): Call full_redraw instead of readraw to
3202 make sure the bitmap is redrawn.
3203 (MapCanvas.OnSize): New method to handle size events so that the
3204 bitmap can be redrawn.
3205
3206 2002-04-29 Bernhard Herzog <[email protected]>
3207
3208 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3209 canvas' VIEW_POSITION event
3210 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
3211 Update the text in the status-bar accordingly.
3212
3213 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
3214 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
3215 called.
3216 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
3217 current_position
3218 (MapCanvas.set_current_position): New method to set
3219 current_position. Issue a VIEW_POSITION event
3220 (MapCanvas.CurrentPosition): New public method to return the value
3221 of current_position. Should be called when the VIEW_POSITION event
3222 is processed.
3223 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
3224 Update the position.
3225 (MapCanvas.OnLeaveWindow): Set the position to None.
3226
3227 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3228 position in the statusbar
3229
3230 2002-04-26 Frank Koormann <[email protected]>
3231
3232 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3233
3234 2002-04-24 Frank Koormann <[email protected]>
3235
3236 * Resources/Bitmaps/identify.xpm: shadow added
3237
3238 * Resources/Bitmaps/fullextent.xpm: new
3239
3240 2002-04-22 Jan-Oliver Wagner <[email protected]>
3241
3242 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3243 box
3244
3245 2002-04-21 Jan-Oliver Wagner <[email protected]>
3246
3247 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3248
3249 * Thuban/UI/tree.py (update_tree): added added map extent
3250
3251 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3252 icon; added map_full_extend as tool
3253
3254 2002-04-19 Jan-Oliver Wagner <[email protected]>
3255
3256 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3257 saving _new_ sessions
3258
3259 * Thuban/Model/session.py (create_empty_session): new session
3260 don't have a filename (set to None)
3261
3262 * Thuban/UI/tree.py (update_tree): added filename and modified flag
3263
3264 * Thuban/Model/load.py (ProcessSession): convert projection
3265 parameters from unicode to regular string
3266
3267 * Data/iceland_sample.session: Added UTM Zone 26 projection.
3268
3269 2002-04-11 Bernhard Herzog <[email protected]>
3270
3271 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
3272 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
3273 1.2.9
3274
3275 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
3276 the pyshapelib directoy into the list of include dirs, so that
3277 pyshapelib_api.h can be found.
3278
3279 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
3280 holds the pyshapelib C-API
3281 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
3282 pyshapelib_api to access the shapelib functions.
3283 (initwxproj): Import the c_api from the shapelib module and
3284 initialize pyshapelib_api.
3285
3286 2002-04-04 Bernhard Herzog <[email protected]>
3287
3288 * setup.py (thuban_bdist_rpm.initialize_options): Use
3289 initialize_options to create the scripts for the rpm.
3290
3291 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
3292
3293 2002-04-03 Bernhard Herzog <[email protected]>
3294
3295 * setup.py: Increment version to 0.1.1
3296
3297 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
3298 Layer" and "Remove Layer" commands from the layer menu to the map
3299 menu
3300
3301 2002-02-15 Bernhard Herzog <[email protected]>
3302
3303 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
3304 argument (python <= 1.5.2 erroneously accepted multiuple
3305 arguments)
3306
3307 2002-02-04 Bernhard Herzog <[email protected]>
3308
3309 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
3310 RecordGrid in the identifyview.
3311 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
3312 IdentifyListCtrl. The grid allows editing of the values.
3313
3314 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
3315 implementing a grid for a single row of a thuban table.
3316
3317 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
3318 layers by default. Easier to use than the previous default of only
3319 searching through the select layer which meant that if no layer
3320 was selected, you couldn't select a shape.
3321
3322 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
3323
3324 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
3325 stroke_width attribute
3326
3327 * Thuban/Model/save.py (save_session): Write the new stroke_width
3328 attribute
3329
3330 * Thuban/Model/load.py (ProcessSession.startElement): Read the
3331 stroke_width attribute
3332
3333 * Thuban/Model/layer.py (Layer.__init__): New parameter and
3334 instance variable stroke_width
3335 (Layer.SetStrokeWidth): Set the stroke_width.
3336
3337 2002-02-01 Bernhard Herzog <[email protected]>
3338
3339 * extensions/thuban/wxproj.cpp (project_points): Fix two
3340 off-by-one errors in the last loop that joins the various parts
3341 together.
3342
3343 2002-01-14 Bernhard Herzog <[email protected]>
3344
3345 * setup.py (data_dist.make_distribution): Fix some typos
3346
3347 2001-09-18 Bernhard Herzog <[email protected]>
3348
3349 * README: Slight tweaking in preparation for the 0.1 release
3350
3351 * setup.cfg: Add section for sdist to create both tgz and zip
3352 archives
3353
3354 * setup.py: increase version number to 0.1
3355 (data_dist): New command class for data distribution
3356
3357 2001-09-14 Bernhard Herzog <[email protected]>
3358
3359 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3360 Handle the case of no layer (i.e. layer is None) properly.
3361
3362 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3363 Set the initial selection of the combo boxes to reflect the
3364 projection we're starting with in a way that works on windows,
3365 too.
3366
3367 * Thuban/Lib/connector.py (Connector.print_connections): Print the
3368 puiblisher's ids in hex to make it easier to compare them to the
3369 standard repr of python methods
3370
3371 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
3372 messages
3373
3374 2001-09-13 Bernhard Herzog <[email protected]>
3375
3376 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
3377 deselect the layer if no layer is selected
3378
3379 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
3380 idle time when there actually is something to draw. If there's
3381 nothing to draw simply clear the window
3382 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
3383 (MapCanvas.SetMap): force a redraw in all cases because
3384 FitMapToWindow doesn't always do it.
3385 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
3386 specify the point to move into the center of the window
3387 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
3388 dragged, zoon in/out by a factor of 2
3389 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
3390 index, i.e. reversed drawing order) so that objects appearing to
3391 be in from of others are selected first. This is probably mostly
3392 relevant for point shapes where the symbols used may overlap
3393
3394 * Thuban/Model/session.py (create_empty_session): Unset the
3395 modified bit before returning it
3396
3397 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
3398 create_empty_session session to create the new, empty session.
3399
3400 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
3401 the tool bitmaps.
3402 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
3403 the code that asks whether the session should be saved into the
3404 new method save_modified_session.
3405 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
3406 method to save modified session here too.
3407
3408 2001-09-11 Bernhard Herzog <[email protected]>
3409
3410 * setup.py (InnoIconItem): fix typo
3411
3412 (thuban_bdist_inno.run):
3413 (bdist_inno.run): Move the decision not to create symlinks on
3414 non-nt platforms to thuban_bdist_inno and do it unconditinally
3415 since we never want to create the symlinks here
3416
3417 2001-09-10 Bernhard Herzog <[email protected]>
3418
3419 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
3420 identify view immediately
3421
3422 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
3423 and SelectableRecordListCtrl that implement the code shared by the
3424 identify view and the label dialog
3425
3426 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
3427 new class RecordListCtrl
3428
3429 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
3430 return value of GetValue is None instead of using it as a boolean
3431 directly so that Zero numbers are handled properly.
3432 (LabelListCtrl): Derive from the new class
3433 SelectableRecordListCtrl
3434
3435 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
3436 (Proj4Dialog.dialogLayout): Make the window resizable and set the
3437 size of the text control explicitly to make the sizers work on
3438 both Windows and X.
3439
3440 2001-09-07 Bernhard Herzog <[email protected]>
3441
3442 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
3443 that can limit the search to the currently selected layer.
3444 (MapCanvas.SelectShapeAt): Make sure that the currently selected
3445 layer stays selected even when no shape is found
3446 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
3447 height do nothing (avoids zero division errors)
3448
3449 2001-09-06 Bernhard Herzog <[email protected]>
3450
3451 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
3452 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
3453 convenient :-)
3454 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
3455 a new instvar layer_to_item to map layers to tree items
3456 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
3457 to match the current selection in the interactor
3458
3459 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
3460 (Interactor.HasSelectedLayer): New methods to query the current
3461 selection
3462
3463 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
3464 (MainWindow.has_selected_layer): Simply call the appropriate
3465 interactor method
3466
3467 * Thuban/UI/mainwindow.py (MainWindow.__init__):
3468 (MainWindow.LayerShowTable):
3469 (MainWindow.identify_view_on_demand): Store the interactor in an
3470 instvar and use that reference instead of going through main.app
3471
3472 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3473 * Thuban/UI/application.py (ThubanApplication.OnInit):
3474 * Thuban/UI/main.py (main): Create the session tree view in main
3475 with the new mainwindow method ShowSessionTree and not directly
3476 the application's OnInit method
3477
3478 * Thuban/UI/tree.py (myTreeCtrlPanel):
3479 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
3480 TreeCtrl isntead of a panel. This affects most method since we now
3481 refer to self instead of self.tree
3482 (SessionTreeView): New class implementing a non-modal dialog
3483 showing the session tree.
3484
3485 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
3486 layer to the tableview dialog.
3487
3488 * Thuban/UI/tableview.py: Add some doc-strings
3489 (TableGrid):
3490 (TableGrid.OnRangeSelect):
3491 (TableGrid.OnSelectCell):
3492 (TableFrame.__init__):
3493 (TableFrame.row_selected):
3494 Selecting rows in the grid view now updates the selected shapes
3495 through the TableFrame. To achieve this we derive TableGrid from
3496 Publisher and introduce the message type ROW_SELECTED which the
3497 TableFrame subscribes to and which is issued by OnRangeSelect and
3498 OnSelectCell
3499
3500 (DataTable.SelectRow): Removed because it's no longer needed in
3501 the row/shape selection scheme
3502
3503 * Thuban/UI/dialogs.py: New file implementing common classes for
3504 dialogs
3505
3506 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
3507 the SELECTED_SHAPE message anymore. This is now handled by the
3508 parent.
3509 (TableGrid.select_shape): Only update the selection if the shape
3510 is not None.
3511 (TableFrame): Inherit from the new NonModalDialog class.
3512 (TableFrame.__init__, TableFrame.select_shape): Handle the
3513 SELECT_SHAPE message.
3514 (TableFrame.OnClose): Extend the inherited method to unsubscribe
3515 SELECT_SHAPE
3516
3517 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
3518 (MainWindow.add_dialog):
3519 (MainWindow.dialog_open):
3520 (MainWindow.remove_dialog):
3521 (MainWindow.get_open_dialog): New methods to maintain a dictionary
3522 of opened non-modal dialogs.
3523
3524 (MainWindow.__init__): Initialize the new non-modal dictionary
3525 management code
3526 (MainWindow.LayerShowTable): maintain separate dialogs for each
3527 table using the non-modal dialog management code to only open a
3528 view once for each table.
3529
3530 (MainWindow.IdentifyTool):
3531 (MainWindow.__init__):
3532 (MainWindow.identify_view_on_demand): Don't open the identify view
3533 in IdentifyTool anymore. This will be done automatically by the
3534 new method identify_view_on_demand which handles the
3535 SELECTED_SHAPE message so that the identify view will be opened on
3536 demand
3537
3538 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
3539 the interactor argument. The SELECTED_SHAPE message is now handled
3540 by the parent.
3541 (IdentifyView.__init__): Add the interactor argument so that we
3542 can handle the SELECTED_SHAPE message here
3543 (IdentifyView.selected_shape): New method to handle the
3544 SELECTED_SHAPE messages
3545
3546 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
3547 NonModalDialog class
3548 (IdentifyView.OnClose): Extend the inherited version to
3549 unsubscribe SELECT_SHAPE
3550
3551 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
3552
3553 2001-09-05 Bernhard Herzog <[email protected]>
3554
3555 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3556
3557 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3558 interactor to pass through to the MapCanvas
3559
3560 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3561 argument to the MainWindow constructor to get rid of the ugly hack
3562 that made main.app available early just so that the mapcanvas
3563 could access the interactor object.
3564
3565 2001-09-04 Bernhard Herzog <[email protected]>
3566
3567 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
3568 that runs a modal message box
3569 (MainWindow.OnClose): Use the new method
3570 (MainWindow.RemoveLayer): Just do nothing in case no layer is
3571 selected. The command should be grayed out anyway, so there's no
3572 need to pop up a message box.
3573 (MainWindow.AddLayer): Pop up a message box with an error message
3574 if the shape file can't be opened
3575
3576 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
3577 immediately. This will cause an exception in case the file can't
3578 be opened and we can display an appropriate message.
3579
3580 * MANIFEST.in: Add extensions/pyprojection/LICENSE
3581
3582 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
3583 specific bdist_rpm command.
3584
3585 * Thuban/UI/main.py: Catch ImportError exceptions when importing
3586 the locale module because it may not be available on some
3587 installations.
3588
3589 * extensions/pyprojection/LICENSE: Copy of the license text in
3590 Projection.i. Having it in a separate file makes it easier to
3591 refer to license text in e.g. RPMs
3592
3593 2001-09-03 Bernhard Herzog <[email protected]>
3594
3595 * setup.py: use wx-config instead of wxgtk-config because it's
3596 more generic
3597
3598 * setup.py (ThubanInstall.get_outputs): Add the symlink in
3599 <prefix>/bin to the outputs
3600 (ThubanInstall.link_file): New method to link files. We need this
3601 because the standard copy_files refuses to link non-existing
3602 files.
3603 (ThubanInstall.run): Remove the leading install root from the
3604 script filename if an install root was specified and use the new
3605 link_file method
3606
3607 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3608 the window when the first layer is added to the map.
3609
3610 * setup.py (ThubanInstall.run): Honor the build root (self.root)
3611 when linking thuban.py to <prefix>/bin
3612
3613 2001-08-31 Bernhard Herzog <[email protected]>
3614
3615 * setup.py: In the setup call, the install parameters shouldn't
3616 have trailing slashes because distutils on non-posix platforms
3617 doesn't like that. The same applies to other directories like
3618 "Resources/Bitmaps"
3619
3620 In the configuration section for nt, move the wxWindows directory
3621 optins into the part clearly marked as editable.
3622
3623 (InstallLocal.initialize_options):
3624 (InstallLocal.user_options): remove the currently unused debug
3625 flag
3626 (thuban_build_py.find_all_modules): Add this method so that it
3627 works for our case of having packages and modules in one
3628 distribution as well.
3629 (ThubanInstall.initialize_options):
3630 (ThubanInstall.finalize_options):
3631 (ThubanInstall.user_options):
3632 (ThubanInstall.boolean_options): Add new options, do-symlink and
3633 extra files. Since these are the first ThubanInstall specific
3634 options, override user_options and boolean_options
3635 (ThubanInstall.run): Honor the new do-symlink and extra-files
3636 options.
3637 (ThubanInstall.get_outputs): Add to override the base-class's
3638 version and add the extra-files to the outputs
3639 (bdist_inno): New class for windows distributions with Inno Setup
3640 (InnoIconItem): Helper class for bdist_inno
3641 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3642 this together with the appropriate parameters, to the setup call.
3643
3644 * setup.cfg (bdist_inno): added new section for the inno setup
3645 installer
3646
3647 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
3648 changing_selection to avoid recursive selection events when
3649 modifying the selection in response to a selection event.
3650 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
3651 changing the tree's selection.
3652 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
3653 we're not being called indirectly from normalize_selection.
3654
3655 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
3656 event.Check only if the command is actuall checkable.
3657 (MainWindow.__init__): Call the toolbar's Realize method to make
3658 sure that the items are actually shown
3659
3660 2001-08-28 Bernhard Herzog <[email protected]>
3661
3662 * setup.py: Fix some doc strings
3663
3664 * ChangeLog: started
3665

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26