/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1048 - (show annotations)
Tue May 27 08:05:14 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 158451 byte(s)
small extension of the Menu API

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26