1 |
|
2003-04-29 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
4 |
|
legend dialog box and tell it to change its map to the one |
5 |
|
supplied to SetMap(). Fixes RTbug #1770. |
6 |
|
|
7 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
8 |
|
|
9 |
|
Next step of table implementation. Introduce a transient database |
10 |
|
using SQLite that some of the data is copied to on demand. This |
11 |
|
allows us to do joins and other operations that require an index |
12 |
|
for good performance with reasonable efficiency. Thuban now needs |
13 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
14 |
|
haven't tested that. |
15 |
|
|
16 |
|
* Thuban/Model/transientdb.py: New. Transient database |
17 |
|
implementation. |
18 |
|
|
19 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
20 |
|
classes. |
21 |
|
|
22 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
23 |
|
classes to help automatically remove temporary files and |
24 |
|
directories. |
25 |
|
(Session.__init__): New instance variables temp_dir for the |
26 |
|
temporary directory and transient_db for the SQLite database |
27 |
|
(Session.temp_directory): New. Create a temporary directory if not |
28 |
|
yet done and return its name. Use AutoRemoveDir to have it |
29 |
|
automatically deleted |
30 |
|
(Session.TransientDB): Instantiate the transient database if not |
31 |
|
done yet and return it. |
32 |
|
|
33 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
34 |
|
AutoTransientTable so that data is copied to the transient DB on |
35 |
|
demand. |
36 |
|
(SimpleStore): New class that simply combines a table and a |
37 |
|
shapefile |
38 |
|
|
39 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
40 |
|
DBFTable and update its doc-string to reflect the fact that this |
41 |
|
is only the table interface to a DBF file. Table is now an alias |
42 |
|
for DBFTable for temporary backwards compatibility. |
43 |
|
|
44 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
45 |
|
the last reference to the session goes away so that the temporary |
46 |
|
files are removed properly. |
47 |
|
|
48 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
49 |
|
reference to the session to make sure the temporary files are |
50 |
|
removed. |
51 |
|
|
52 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
53 |
|
|
54 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
55 |
|
the __parser instance variable into a normal local variable in |
56 |
|
read. It's only used there and read will never be called more than |
57 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
58 |
|
session object alive for a long time. |
59 |
|
|
60 |
|
2003-04-29 Jonathan Coles <[email protected]> |
61 |
|
|
62 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
63 |
|
Projection an immutable item. Fixes RTbug #1825. |
64 |
|
(Projection.__init__): Initialize instance variables here. |
65 |
|
(ProjFile.Replace): New. Replace the given projection object with |
66 |
|
the new projection object. This solves the problem of needing the |
67 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
68 |
|
allows a projection to change parameters without changing its |
69 |
|
location in the file. |
70 |
|
|
71 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
72 |
|
be of type wxSAVE and should verify overwriting a file. |
73 |
|
|
74 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
75 |
|
ProjFile.Replace() method instead of the mutator |
76 |
|
Projection.SetProjection(). Also requires that we reassign the |
77 |
|
client data to the new projection. |
78 |
|
|
79 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
80 |
|
GetAllParameters() |
81 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
82 |
|
for Replace(). |
83 |
|
|
84 |
|
2003-04-25 Jonathan Coles <[email protected]> |
85 |
|
|
86 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
87 |
|
to save the name of the projection. |
88 |
|
|
89 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
90 |
|
test to verify layer projections are saved correctly. |
91 |
|
|
92 |
|
2003-04-25 Jonathan Coles <[email protected]> |
93 |
|
|
94 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
95 |
|
to "Unknown" if name is None. |
96 |
|
(Projection.SetAllParameters): New. Set the projection's |
97 |
|
parameter list to the one supplied. |
98 |
|
(Projection.SetProjection): New. Set the projection's |
99 |
|
properties to those of the supplied Projection. |
100 |
|
|
101 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
102 |
|
the dialog title to include the map's title. |
103 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
104 |
|
the layer's title. |
105 |
|
|
106 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
107 |
|
error dialogs into a single method call. |
108 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
109 |
|
(ProjFrame.__GetProjection): Return the current state of an |
110 |
|
edited projection or None. |
111 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
112 |
|
shouldn't exist. |
113 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
114 |
|
a projection panel if necessary. |
115 |
|
|
116 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
117 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
118 |
|
ProjFile.SetName. |
119 |
|
|
120 |
|
2003-04-25 Jonathan Coles <[email protected]> |
121 |
|
|
122 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
123 |
|
takes an optional argument to select the current projection. |
124 |
|
This does not guarantee that the item is visible due to |
125 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
126 |
|
|
127 |
|
2003-04-25 Jonathan Coles <[email protected]> |
128 |
|
|
129 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
130 |
|
the projection name and use it when constructing the Projection |
131 |
|
object. |
132 |
|
|
133 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
134 |
|
value for 'name' to None and then test if name is equal to None |
135 |
|
in the body of the constructor. This way the caller doesn't have to |
136 |
|
know what the default value should be. Namely, useful in load.py |
137 |
|
where we have to pick a default value if the 'name' parameter |
138 |
|
doesn't exist in the XML file. |
139 |
|
|
140 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
141 |
|
Tests a file where a layer has a projection. |
142 |
|
|
143 |
|
2003-04-25 Jonathan Coles <[email protected]> |
144 |
|
|
145 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
146 |
|
tree for projection information. |
147 |
|
|
148 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
149 |
|
XMLReader.GetFileName. |
150 |
|
(SessionLoader): Added support for loading projection tags that |
151 |
|
appear inside a layer. |
152 |
|
|
153 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
154 |
|
back to using a list because the order of the projections in |
155 |
|
the file is important to maintain. Fixes RTbug #1817. |
156 |
|
|
157 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
158 |
|
to ProjFile.GetFilename. |
159 |
|
|
160 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
161 |
|
information. |
162 |
|
|
163 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
164 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
165 |
|
implementation. |
166 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
167 |
|
projection to a single file. |
168 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
169 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
170 |
|
|
171 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
172 |
|
class. |
173 |
|
|
174 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
175 |
|
|
176 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
177 |
|
|
178 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
179 |
|
|
180 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
181 |
|
empty strings. |
182 |
|
|
183 |
|
2003-04-24 Jonathan Coles <[email protected]> |
184 |
|
|
185 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
186 |
|
implement the interface that the ProjFrame dialog expects. |
187 |
|
|
188 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
189 |
|
name of the projection to be changed. |
190 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
191 |
|
projections is easier and we are sure about uniqueness. |
192 |
|
(ProjFile.Remove): Remove the given projection object. |
193 |
|
|
194 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
195 |
|
Return a list with only one projection file instead of searching for |
196 |
|
any projection file. This simplifies many things if the user can |
197 |
|
only have one system file and one user file. |
198 |
|
|
199 |
|
* Thuban/UI/classgen.py: Change all references to |
200 |
|
genCombo to genChoice. |
201 |
|
|
202 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
203 |
|
layer menu. |
204 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
205 |
|
for a layer. |
206 |
|
|
207 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
208 |
|
laid out. Use three panels instead of one. One for the list of |
209 |
|
projections, one for the edit controls, and one for the buttons. |
210 |
|
Fixed resizing problems so that the dialog resizes correctly |
211 |
|
when the projection panel changes. Added import/export, save, and |
212 |
|
new buttons/functionality. |
213 |
|
|
214 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
215 |
|
|
216 |
|
First step towards table management. Introduce a simple data |
217 |
|
abstraction so that we replace the data a layer uses more easily |
218 |
|
in the next step. |
219 |
|
|
220 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
221 |
|
that bundles shapefile and dbffile into one object. |
222 |
|
|
223 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
224 |
|
open shapefiles and return a shape store object |
225 |
|
|
226 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
227 |
|
object instead of a shapefile filename. This introduces a new |
228 |
|
instance variable store holding the datastore. For intermediate |
229 |
|
backwards compatibility keep the old instance variables. |
230 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
231 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
232 |
|
get the shape store used by a layer. |
233 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
234 |
|
table anymore. |
235 |
|
|
236 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
237 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
238 |
|
open shapefiles |
239 |
|
|
240 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
241 |
|
session's OpenShapefile method to open shapefiles |
242 |
|
|
243 |
|
* test/test_classification.py |
244 |
|
(TestClassification.test_classification): Use the session's |
245 |
|
OpenShapefile method to open shapefiles and build the filename in |
246 |
|
a more platform independed way |
247 |
|
|
248 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
249 |
|
Implement to have a session to use in the tests |
250 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
251 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
252 |
|
session's OpenShapefile method to open shapefiles |
253 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
254 |
|
it to open shapefiles. |
255 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
256 |
|
layers and session are removed otherwise we may get a resource |
257 |
|
leak |
258 |
|
|
259 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
260 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
261 |
|
use it to open shapefiles. |
262 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
263 |
|
layers, maps and sessions are removed otherwise we may get a |
264 |
|
resource leak |
265 |
|
("__main__"): use support.run_tests() so that more info about |
266 |
|
uncollected garbage is printed |
267 |
|
|
268 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
269 |
|
session's OpenShapefile method to open shapefiles |
270 |
|
("__main__"): use support.run_tests() so that more info about |
271 |
|
uncollected garbage is printed |
272 |
|
|
273 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
274 |
|
all references to the session and the selection are removed |
275 |
|
otherwise we may get a resource leak |
276 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
277 |
|
use it to open shapefiles. |
278 |
|
("__main__"): use support.run_tests() so that more info about |
279 |
|
uncollected garbage is printed |
280 |
|
|
281 |
|
* test/test_session.py (TestSessionBase.tearDown) |
282 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
283 |
|
to the session and layers are removed otherwise we may get a |
284 |
|
resource leak |
285 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
286 |
|
method to open shapefiles |
287 |
|
|
288 |
|
2003-04-24 Jonathan Coles <[email protected]> |
289 |
|
|
290 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
291 |
|
if the file_or_filename object had the 'read' attribute. |
292 |
|
|
293 |
|
2003-04-23 Jonathan Coles <[email protected]> |
294 |
|
|
295 |
|
* Thuban/Model/resource.py: Fixes RTbug #1813. |
296 |
|
(ReadProjFile): Add documentation about which exceptions are raised. |
297 |
|
Always pass the exceptions up to the caller. |
298 |
|
(GetProjFiles): If the directory can't be read return an empty list. |
299 |
|
If any of the proj files can't be read skip that file and go |
300 |
|
on to the next one. |
301 |
|
|
302 |
|
* test/test_proj.py: Added test cases to handle nonexistent files, |
303 |
|
unreadable files, and files that don't parse correctly. |
304 |
|
|
305 |
|
2003-04-23 Jonathan Coles <[email protected]> |
306 |
|
|
307 |
|
Projection dialog. Allows the user to select from a list |
308 |
|
of projection templates and optionally edit them and save new ones. |
309 |
|
|
310 |
|
* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog. |
311 |
|
(ProjPanel): Base class for projection specific panels. |
312 |
|
(TMPanel): Projection panel for Transverse Mercartor. |
313 |
|
(UTMPanel): Projection panel for Universal Transverse Mercartor. |
314 |
|
(LCCPanel): Projection panel for Lambert Conic Conformal. |
315 |
|
(GeoPanel): Projetion panel for Geographic Projection. |
316 |
|
|
317 |
|
2003-04-23 Jonathan Coles <[email protected]> |
318 |
|
|
319 |
|
* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to |
320 |
|
promote symmetry. There now exists XMLReader and XMLWriter. |
321 |
|
(XMLReader.read): New. Call to read the given file descriptor or |
322 |
|
filename. |
323 |
|
(XMLReader.close): New. Make sure the file is closed. |
324 |
|
(XMLReader.GetFileName): New. Return just the file name that is being |
325 |
|
read from. |
326 |
|
(XMLReader.GetDirectory): New. Return just the directory of the file |
327 |
|
that is being read. |
328 |
|
(XMLReader.AddDispatchers): New. Take a dictionary which contains |
329 |
|
the names of functions to call as the XML tree is parsed. |
330 |
|
(XMLReader.startElementNS): Updated to use new dispatcher dictionary. |
331 |
|
(XMLReader.endElementNS): Updated to use new dispatcher dictionary. |
332 |
|
(SessionLoader): Removed class variables start_dispatcher and |
333 |
|
end_dispatcher since this functionality is now part of a class |
334 |
|
instance. Fixes RTbug #1808. |
335 |
|
(SessionLoader.__init__): Add dispatcher functions. |
336 |
|
(load_xmlfile): Code was moved into the XMLReader.read(). |
337 |
|
(load_session): Use modified SessionLoader. |
338 |
|
|
339 |
|
* Thuban/Model/map.py (Map.GetProjection): New. Returns the |
340 |
|
map's projection. |
341 |
|
|
342 |
|
* Thuban/Model/proj.py (Projection.GetParameters): Renamed to |
343 |
|
GetAllParameters. |
344 |
|
(Projection.GetParameter): Returns the value for the given parameter. |
345 |
|
|
346 |
|
* Thuban/Model/resource.py: Use XMLReader and XMLWriter. |
347 |
|
(GetProjFiles): Renamed from GetProjections. Now returns a list |
348 |
|
of ProjFile objects. |
349 |
|
(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns |
350 |
|
a list of ProjFile objects whose files are not user defined. |
351 |
|
(GetUserProjFiles): Renamed from GetUserProjections. Returns a |
352 |
|
list of ProjFile objects whose files are user defined. |
353 |
|
(ProjFileReader): Extend new XMLReader. |
354 |
|
|
355 |
|
* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to |
356 |
|
promote symmetry. |
357 |
|
|
358 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice |
359 |
|
control instead of a wxComboBox. wxChoice controls do not generate |
360 |
|
events as the uses highlights possible choices which fixes problems |
361 |
|
with resizing the dialog when the use selects an option. |
362 |
|
|
363 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice |
364 |
|
control instead of a wxComboBox. |
365 |
|
|
366 |
|
* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection |
367 |
|
dialog. |
368 |
|
|
369 |
|
* test/test_proj.py (TestProjection.test): New tests for GetParameter |
370 |
|
method. |
371 |
|
|
372 |
|
2003-04-22 Bernhard Herzog <[email protected]> |
373 |
|
|
374 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports and global |
375 |
|
constants |
376 |
|
|
377 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
378 |
|
(IdentifyGridCtrl.selected_shape): Use table, not shapetable. |
379 |
|
|
380 |
|
2003-04-17 Bernhard Herzog <[email protected]> |
381 |
|
|
382 |
|
* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED. |
383 |
|
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used |
384 |
|
anymore. |
385 |
|
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes) |
386 |
|
(Layer.ShapeType, Layer.Shape): No need to call |
387 |
|
self.open_shapefile since it's always called in __init__ |
388 |
|
|
389 |
|
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
390 |
|
In wxPython 2.4 there's no need to extend MainLoop anymore since |
391 |
|
wxPython itself makes sure OnExit is called. |
392 |
|
|
393 |
|
2003-04-16 Jonathan Coles <[email protected]> |
394 |
|
|
395 |
|
Initial putback of projection management code. Includes new |
396 |
|
classes to read and write projection files. The current load |
397 |
|
and save classes were abstracted a bit so they could be reused. |
398 |
|
The Projection class was extended to provide new methods and |
399 |
|
have a name. |
400 |
|
|
401 |
|
* Thuban/Model/load.py (XMLProcessor): New. Contains all the |
402 |
|
general XML reading methods that were part of ProcessSession. |
403 |
|
|
404 |
|
* Thuban/Model/proj.py (Projection.__init__): Accepts an optional |
405 |
|
name. |
406 |
|
(ProjFile): New. Represents a file that contains projection |
407 |
|
information. |
408 |
|
|
409 |
|
* Thuban/Model/resource.py: New. Contains general utilities |
410 |
|
for read and writing projection files. |
411 |
|
|
412 |
|
* Thuban/Model/save.py (XMLSaver): New. Contains all the |
413 |
|
general XML writing methods that were part of SessionSaver. |
414 |
|
(SessionSaver): Renamed from Saver. |
415 |
|
|
416 |
|
* test/test_proj.py: New test cases for the projection |
417 |
|
file read and write functions. |
418 |
|
|
419 |
|
2003-04-16 Jonathan Coles <[email protected]> |
420 |
|
|
421 |
|
* Thuban/Model/classification.py: Use repr() around values |
422 |
|
in the ClassGroup*.__repr__() methods so it is clearer when |
423 |
|
a value is a string and when it is a number. |
424 |
|
|
425 |
|
* test/test_load.py: Rework the classification test to test |
426 |
|
that we can load old files. |
427 |
|
(testLabels): Test a file where the groups have labels. |
428 |
|
|
429 |
|
2003-04-16 Bernhard Herzog <[email protected]> |
430 |
|
|
431 |
|
Safer implementation of the performance enhancements of the |
432 |
|
low-level renderer: |
433 |
|
|
434 |
|
* extensions/thuban/wxproj.cpp (extract_projection) |
435 |
|
(extract_pointer): Rename extract_projection to extract_pointer |
436 |
|
and redefine its purpose to return the pointer stored in a CObject |
437 |
|
returned by the object's cobject method. Update all callers. |
438 |
|
(s_draw_info, free_draw_info, draw_polygon_init): Implement the |
439 |
|
handling of these low-level parameters so that each s_draw_info |
440 |
|
instance is handled as a CObject at python level that also |
441 |
|
contains real references to the actual python objects which |
442 |
|
contain the values in the struct. Add free_draw_info as the |
443 |
|
destructor. |
444 |
|
(draw_polygon_shape): Add the py_draw_info parameter which must a |
445 |
|
cobject containing an s_draw_info pointer. |
446 |
|
|
447 |
|
* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New |
448 |
|
method to instantiat the low-level render parameter |
449 |
|
(MapRenderer.draw_shape_layer): Use the new method. Remove some |
450 |
|
commented out code. |
451 |
|
(MapRenderer.draw_polygon_shape): Make the first parameter not the |
452 |
|
layer but the low-level render parameter |
453 |
|
(ScreenRenderer.draw_shape_layer): Use the low-level render |
454 |
|
parameter. |
455 |
|
|
456 |
|
2003-04-15 Jonathan Coles <[email protected]> |
457 |
|
|
458 |
|
* Thuban/Model/classification.py: Implemented __repr__ for |
459 |
|
the ClassGroup* classes to make debugging a bit easier. |
460 |
|
(ClassGroup.SetLabel): Check that the string is an instance |
461 |
|
of StringTypes not StringType. Accounts for Unicode strings. |
462 |
|
|
463 |
|
* Thuban/Model/color.py: Implemented __repr__ to make |
464 |
|
debugging a bit easier. |
465 |
|
|
466 |
|
* Thuban/Model/save.py (Saver.write_classification): Need to |
467 |
|
save the group label. |
468 |
|
|
469 |
|
* test/test_load.py (testClassification): New. Loads the |
470 |
|
iceland_sample_test.thuban file and checks if it was loaded |
471 |
|
correctly. |
472 |
|
|
473 |
|
2003-04-15 Jonathan Coles <[email protected]> |
474 |
|
|
475 |
|
* extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used |
476 |
|
to improve rendering performance by initializing the variables |
477 |
|
that are not change each time draw_polygon_shape() is called. |
478 |
|
The values are stored in a global struct draw_info. |
479 |
|
(draw_polygon_shape): Removed initialization code that is |
480 |
|
now in draw_polygon_init(). |
481 |
|
|
482 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make |
483 |
|
drawing initialization call to draw_polygon_init() |
484 |
|
(MapRenderer.draw_polygon_shape): Use new signature of |
485 |
|
draw_polygon_shape. |
486 |
|
|
487 |
|
* Thuban/UI/classgen.py (GenUniformPanel): Fix spin control |
488 |
|
weirdness by setting the range to (1, maxint). |
489 |
|
|
490 |
|
* Thuban/Model/classification.py (ClassGroupProperties): Make |
491 |
|
instance variables private and optimize comparison operator |
492 |
|
by first checking if the color references are the same. |
493 |
|
(ClassGroupSingleton): Make instance variables private. |
494 |
|
(ClassGroupRange): Make instance variables private. |
495 |
|
|
496 |
|
* HOWTO-Release: Filled in missing steps for releasing packages. |
497 |
|
|
498 |
|
2003-04-15 Bernhard Herzog <[email protected]> |
499 |
|
|
500 |
|
First stab at internationalized messages: |
501 |
|
|
502 |
|
* Thuban/__init__.py (_): Implement the translation function for |
503 |
|
real using the python gettext module. |
504 |
|
|
505 |
|
* Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't |
506 |
|
translate empty strings. |
507 |
|
|
508 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
509 |
|
Add a missing space to a warning message |
510 |
|
|
511 |
|
* po/README: New. Notes about the management of the translation |
512 |
|
files. |
513 |
|
|
514 |
|
* po/Makefile: New. Makefile to help manage the translation files. |
515 |
|
|
516 |
|
* po/es.po: New. Spanish translation by Daniel Calvelo Aros |
517 |
|
|
518 |
|
* MANIFEST.in: Include the *.mo files in Resources/Locale and the |
519 |
|
translations and support files in po/ |
520 |
|
|
521 |
|
* setup.py (data_files): Add the *.mo files to the data_files too |
522 |
|
|
523 |
|
* README: Add note about the translations when building from CVS |
524 |
|
|
525 |
|
2003-04-14 Jonathan Coles <[email protected]> |
526 |
|
|
527 |
|
* Thuban/UI/dock.py: Fixes some window resizing problems most |
528 |
|
noticable under windows. Always assume the button bitmaps will |
529 |
|
be there. Code clean up. |
530 |
|
(DockabelWindow.Dock, DockableWindow.UnDock): Force all the |
531 |
|
images for the dock/undock button to the same images. |
532 |
|
Work around for RTbug #1801. |
533 |
|
|
534 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should |
535 |
|
be allowed to grow within the sizer. Fixes a bug under Windows |
536 |
|
where the toolbar wasn't being drawn. |
537 |
|
|
538 |
|
2003-04-14 Frank Koormann <[email protected]> |
539 |
|
|
540 |
|
* Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm: |
541 |
|
Updated design to try to make the button functionality more |
542 |
|
transparent. |
543 |
|
|
544 |
|
2003-04-14 Jonathan Coles <[email protected]> |
545 |
|
|
546 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to |
547 |
|
finalize the intialization of the panel. |
548 |
|
|
549 |
|
* Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the |
550 |
|
creation of the panel. Should be the last thing called in the |
551 |
|
initializer of a subclass. |
552 |
|
|
553 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively |
554 |
|
set the current selections in the combo boxes. This is needed |
555 |
|
under Windows. |
556 |
|
|
557 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Add a top |
558 |
|
level panel to the dialog so that the background colors are |
559 |
|
consistent under Windows. |
560 |
|
|
561 |
|
2003-04-11 Jonathan Coles <[email protected]> |
562 |
|
|
563 |
|
* Thuban/UI/classgen.py: Change color ramps to start at white |
564 |
|
not black. |
565 |
|
|
566 |
|
* Thuban/UI/legend.py: Enable/disable the legend buttons when |
567 |
|
the legend changes. Fixes RTbug #1793. |
568 |
|
|
569 |
|
* test/test_classification.py: Added test for copying of |
570 |
|
classifications. |
571 |
|
|
572 |
|
2003-04-11 Jonathan Coles <[email protected]> |
573 |
|
|
574 |
|
* Thuban/UI/resource.py: New. Centralize the loading of resources |
575 |
|
such as bitmaps. |
576 |
|
|
577 |
|
* Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons, |
578 |
|
added images to the move buttons, added 'reverse' button. |
579 |
|
(CustomRampPanel.__init__): Added images to the move buttons. |
580 |
|
(GreyRamp): New. Generates a ramp from white to black. |
581 |
|
(HotToColdRamp): New. Generates a ramp from cold to hot colors. |
582 |
|
|
583 |
|
* Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to |
584 |
|
ID_PROPERTY_*. |
585 |
|
(Classifier.__init__): Minor changes to the layout. |
586 |
|
(Classifier._OnTitleChanged): Listen for when the user edits the |
587 |
|
title and update the dialog's title and the layer's title. |
588 |
|
|
589 |
|
* Thuban/UI/dock.py: Use new bitmaps for the control buttons. |
590 |
|
|
591 |
|
* Thuban/UI/legend.py: Use new bitmaps for the control buttons. |
592 |
|
(LegendTree._OnMsgLayerTitleChanged): Change the displayed title |
593 |
|
if the layer's title changes. |
594 |
|
|
595 |
|
* Thuban/UI/mainwindow.py: Added new menu item and associated code |
596 |
|
to open a dialog to rename the map. |
597 |
|
(MainWindow): Use new resource class to import bitmaps. |
598 |
|
|
599 |
|
2003-04-11 Jonathan Coles <[email protected]> |
600 |
|
|
601 |
|
* Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm, |
602 |
|
Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm, |
603 |
|
Resources/Bitmaps/group_use_none.xpm, |
604 |
|
Resources/Bitmaps/group_use_not.xpm, |
605 |
|
Resources/Bitmaps/hide_layer.xpm, |
606 |
|
Resources/Bitmaps/layer_properties.xpm, |
607 |
|
Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm, |
608 |
|
Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm: |
609 |
|
New. |
610 |
|
|
611 |
|
2003-04-10 Jonathan Coles <[email protected]> |
612 |
|
|
613 |
|
* Thuban/Model/classification.py: (ClassGroupRange.__init__): |
614 |
|
Should pass group to ClassGroup constructor. |
615 |
|
|
616 |
|
2003-04-10 Jonathan Coles <[email protected]> |
617 |
|
|
618 |
|
* Thuban/Model/classification.py: (ClassGroup): Move all the common |
619 |
|
methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__) |
620 |
|
here. Implement SetVisible(), IsVisible(). |
621 |
|
(ClassGroup.__init__): Add group parameter which acts as a copy |
622 |
|
constructor. |
623 |
|
|
624 |
|
* Thuban/UI/classifier.py (ClassTable): Add a new column for the |
625 |
|
"Visible" check boxes. |
626 |
|
(Classifier): Rename the buttons and refactor the code to match |
627 |
|
the new labels. |
628 |
|
|
629 |
|
* Thuban/UI/legend.py: Classify button is now called "Properties". |
630 |
|
Refactored the code to change variable names. |
631 |
|
(LegendTree.__FillTreeLayer): Only list a group if it is visible. |
632 |
|
|
633 |
|
* Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to |
634 |
|
MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties |
635 |
|
renamed to MainWindow.LayerEditProperties. |
636 |
|
(MainWindow.ToggleLegend): Don't include map name in legend title. |
637 |
|
(MainWindow.SetMap): Added the map name to the window title. |
638 |
|
(MainWindow.LayerFillColor, MainWindow.LayerTransparentFill, |
639 |
|
MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed. |
640 |
|
Functionality is found in the layer properties dialog. |
641 |
|
|
642 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only |
643 |
|
draw visible groups. |
644 |
|
|
645 |
|
2003-04-09 Jonathan Coles <[email protected]> |
646 |
|
|
647 |
|
* Thuban/UI/classgen.py: Modifications to allow simple |
648 |
|
addition and selection of new color schemes. |
649 |
|
(MonochromaticRamp): New. Generates a ramp between two colors. |
650 |
|
(RedRamp): New. Generates a ramp of all red. |
651 |
|
(GreenRamp): New. Generates a ramp of all green. |
652 |
|
(BlueRamp): New. Generates a ramp of all blue. |
653 |
|
|
654 |
|
2003-04-09 Jonathan Coles <[email protected]> |
655 |
|
|
656 |
|
* Thuban/Model/classification.py (Classification.__deepcopy__): |
657 |
|
Need to copy over field and fieldType attributes. |
658 |
|
|
659 |
|
* Thuban/Model/table.py (Table.field_range): New. Retrive the |
660 |
|
maximum and minimum values over the entire table for a given |
661 |
|
field. |
662 |
|
(Table.GetUniqueValues): New. Retrieve all the unique values |
663 |
|
in the table for a given field. |
664 |
|
|
665 |
|
* Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel. |
666 |
|
(GenUniquePanel): New. Controls to allow the user to select |
667 |
|
which unique field values they would like in the classification. |
668 |
|
(CustomRampPanel): Code that was in ClassGenDialog that allows |
669 |
|
the user to select the properties for a custom ramp. |
670 |
|
(ClassGenerator.GenUniformDistribution): Was called GenerateRanges. |
671 |
|
|
672 |
|
* Thuban/UI/classifier.py: Removed a lot of debugging code. |
673 |
|
(Classifier._SetClassification): Callback method so that the |
674 |
|
class generator can set the classification in the grid. |
675 |
|
(ClassGroupPropertiesCtrl): New. Encapsulates the drawing and |
676 |
|
editing of a group properties class into a wxWindows control. |
677 |
|
|
678 |
|
* Thuban/UI/dock.py: It was decided that if the user closes |
679 |
|
a dockable window the window should simply hide itself. That |
680 |
|
way if the user wants to show the dock again it appears in the |
681 |
|
same place as it was when it was closed. |
682 |
|
(DockableWindow.Destroy): Call renamed method OnDockDestroy(). |
683 |
|
(DockableWindow._OnButtonClose): Hide the window instead of |
684 |
|
destroying it. |
685 |
|
(DockableWindow._OnClose): Hide the window instead of |
686 |
|
destroying it. |
687 |
|
|
688 |
|
* Thuban/UI/legend.py (LegendTree): Use a private method to |
689 |
|
consistently set the font and style of the text. Fixes RTbug #1786. |
690 |
|
|
691 |
|
* Thuban/UI/mainwindow.py: Import just the Classifier class. |
692 |
|
|
693 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
694 |
|
|
695 |
|
* Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item |
696 |
|
to the map module |
697 |
|
|
698 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
699 |
|
|
700 |
|
* Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in |
701 |
|
favor of ToggleSessionTree |
702 |
|
(MainWindow.ToggleSessionTree): New method to toggle visibility of |
703 |
|
the session tree. |
704 |
|
(MainWindow.SessionTreeShown): New method to return whether the |
705 |
|
session tree is currently shown. |
706 |
|
(MainWindow.ToggleLegend): New method to toggle visibility of the |
707 |
|
legend |
708 |
|
(MainWindow.ShowLegend): Implement in terms of ToggleLegend and |
709 |
|
LegendShown |
710 |
|
(MainWindow.LegendShown): New method to return whether the legend |
711 |
|
is currently shown. |
712 |
|
(_method_command): Add checked parameter so we can define check |
713 |
|
menu items |
714 |
|
(_has_tree_window_shown, _has_legend_shown): Use the appropriate |
715 |
|
mainwindow methods. |
716 |
|
(show_session_tree, show_legend commands): Removed. |
717 |
|
(toggle_session_tree, toggle_legend commands): New commands to |
718 |
|
toggle the visibility of the dialogs |
719 |
|
|
720 |
|
2003-04-07 Jonathan Coles <[email protected]> |
721 |
|
|
722 |
|
* Thuban/UI/classgen.py: Fix Windows problem. |
723 |
|
|
724 |
|
* Thuban/UI/dock.py: Fix Windows problem. |
725 |
|
|
726 |
|
* Thuban/UI/mainwindow.py: Use False instead of false. |
727 |
|
(MainWindow.ShowLegend): Remove unnecessary switch parameter. |
728 |
|
|
729 |
|
2003-04-07 Jonathan Coles <[email protected]> |
730 |
|
|
731 |
|
Since we now say that the order of the groups in a classification |
732 |
|
matters, it makes sense to be able to manipulate that order. Most |
733 |
|
of the changes to Thuban/Model/classification.py are to that end. |
734 |
|
|
735 |
|
* Thuban/Model/classification.py (Classification.AppendGroup, |
736 |
|
Classification.InsertGroup, Classification.ReplaceGroup, |
737 |
|
Classification.RemoveGroup, Classification.GetGroup): Do as the |
738 |
|
names imply. |
739 |
|
(Classification.FindGroup): This was called GetGroup, but GetGroup |
740 |
|
takes an index, while FindGroup takes a value. |
741 |
|
(Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER |
742 |
|
REFERENCE. Currently there is a cyclic reference between the layer |
743 |
|
and its classification. If the classification doesn't need to know |
744 |
|
its owning layer we can change this, since it may make sense to be |
745 |
|
able to use the same classification with different layers. |
746 |
|
|
747 |
|
* Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup() |
748 |
|
|
749 |
|
* Thuban/UI/classgen.py: Use Classification.AppendGroup(), |
750 |
|
not AddGroup() |
751 |
|
|
752 |
|
* Thuban/UI/classifier.py: Now that we can depend on the order in |
753 |
|
a Classification and have methods to manipulate that order we don't |
754 |
|
need to use our own data structures in the grid. We can simply make |
755 |
|
the grid/table access the information they need from a copy of |
756 |
|
the classification object. |
757 |
|
(Classifier._OnCloseBtn): Event handler for when the user clicks |
758 |
|
'Close'. This is needed so if the user applies changes and then |
759 |
|
continues to change the table the user has the option of discarding |
760 |
|
the most recent changes and keeping what they applied. |
761 |
|
|
762 |
|
* Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree" |
763 |
|
into the same group. |
764 |
|
|
765 |
|
* extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled |
766 |
|
with a really old version of proj, PJ_VERSION won't even be defined. |
767 |
|
If it isn't defined then just compile so that the function always |
768 |
|
returns Py_False. |
769 |
|
|
770 |
|
* test/test_classification.py: Fix tests to use the renamed methods. |
771 |
|
Still need to write tests for the new methods. |
772 |
|
|
773 |
|
2003-04-04 Jonathan Coles <[email protected]> |
774 |
|
|
775 |
|
* Thuban/UI/classifier.py (Classifier.__SelectField): Move the |
776 |
|
call to SetSelection out of the method and before the call |
777 |
|
to __SelectField in __init__. This prevents a recursion of events |
778 |
|
when _OnFieldSelect is triggered by the user. |
779 |
|
|
780 |
|
2003-04-04 Jonathan Coles <[email protected]> |
781 |
|
|
782 |
|
* Thuban/Model/classification.py: Rename Color.None to |
783 |
|
Color.Transparent. |
784 |
|
(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill): |
785 |
|
Don't bother copying the color, since Colors are immutable. |
786 |
|
|
787 |
|
* Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py, |
788 |
|
Thuban/UI/classifier.py, Thuban/UI/mainwindow.py, |
789 |
|
Thuban/UI/renderer.py, Thuban/UI/view.py: |
790 |
|
Rename Color.None to Color.Transparent. |
791 |
|
|
792 |
|
* test/test_classification.py, test/test_load.py: Rename Color.None |
793 |
|
to Color.Transparent. |
794 |
|
|
795 |
|
2003-04-04 Jonathan Coles <[email protected]> |
796 |
|
|
797 |
|
* Thuban/Model/classification.py: Fix assert calls. |
798 |
|
(ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill): |
799 |
|
Copy the color parameter rather than hold onto a reference. |
800 |
|
|
801 |
|
* Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy |
802 |
|
the color object. |
803 |
|
(NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we |
804 |
|
are sure there exists only one refernce to Color.None in the system. |
805 |
|
This allows us to use 'is' rather than the comparision functions. |
806 |
|
|
807 |
|
* Thuban/Model/save.py: Fix assert calls. |
808 |
|
|
809 |
|
* Thuban/UI/classifier.py: Fix assert calls. |
810 |
|
(ClassGrid._OnCellDClick): Call up to the classifier to open the |
811 |
|
dialog to edit the groups properties. |
812 |
|
(ClassGrid._OnCellResize): Make sure that the scollbars are drawn |
813 |
|
correctly if a cell is resized. |
814 |
|
(ClassTable.SetClassification): New. Changes the classification |
815 |
|
that is in the table. |
816 |
|
(ClassTable.__SetRow): Allow groups to be prepended. |
817 |
|
(Classifier): New code for opening the EditProperties and |
818 |
|
GenerateRanges dialogs. |
819 |
|
(SelectPropertiesDialog.__GetColor): Only set the color in the |
820 |
|
color dialog if the current color is not None. |
821 |
|
|
822 |
|
* Thuban/UI/dock.py: Fix assert calls. |
823 |
|
|
824 |
|
* Thuban/UI/legend.py: Fix assert calls. |
825 |
|
|
826 |
|
* Thuban/UI/renderer.py: Fix assert calls. |
827 |
|
|
828 |
|
* Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating |
829 |
|
classifications. |
830 |
|
(GenRangePanel): Panel specific to range generation. |
831 |
|
(GenSingletonPanel): Panel specific to singleton generation. |
832 |
|
(ClassGenerator): Class responsible for actually generating |
833 |
|
the classification from the data gathered in the dialog box. |
834 |
|
(PropertyRamp): Generates properties whose values range from |
835 |
|
a starting property to an ending property. |
836 |
|
|
837 |
|
2003-04-03 Bernhard Herzog <[email protected]> |
838 |
|
|
839 |
|
* test/support.py (print_garbage_information): New function that |
840 |
|
prints information about still connected messages and memory |
841 |
|
leaks. |
842 |
|
(run_suite): Removed. |
843 |
|
(run_tests): New function for use as a replacement of |
844 |
|
unittest.main in the test_* files. This one calls |
845 |
|
print_garbage_information at the end. |
846 |
|
|
847 |
|
* test/runtests.py (main): Use support.print_garbage_information |
848 |
|
|
849 |
|
* test/test_layer.py: Use support.run_tests instead of |
850 |
|
unittest.main so we get memory leak information |
851 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
852 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer) |
853 |
|
(TestLayerLegend.test_visibility): Call the layer's Destroy method |
854 |
|
to fix a memory leak. |
855 |
|
|
856 |
|
* test/test_classification.py: Use support.run_tests instead of |
857 |
|
unittest.main so we get memory leak information |
858 |
|
(TestClassification.test_classification): Call the layer's Destroy |
859 |
|
method to fix a memory leak. |
860 |
|
|
861 |
|
2003-04-02 Bernhard Herzog <[email protected]> |
862 |
|
|
863 |
|
* extensions/thuban/wxproj.cpp (check_version, check_version_gtk): |
864 |
|
Handle the reference counts of the return value and errors in |
865 |
|
PyArg_ParseTuple correctly. |
866 |
|
|
867 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Make |
868 |
|
sure the filename is absolute to avoid problems when saving the |
869 |
|
session again |
870 |
|
|
871 |
|
* Thuban/Model/table.py: Remove unnecessary import. Fix a typo. |
872 |
|
|
873 |
|
2003-04-01 Jonathan Coles <[email protected]> |
874 |
|
|
875 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check |
876 |
|
that there actually are points in the returned list of points |
877 |
|
before trying to index into the list. The list may be empty if |
878 |
|
the shape is a Null Shape. |
879 |
|
|
880 |
|
2003-04-01 Bernhard Herzog <[email protected]> |
881 |
|
|
882 |
|
* test/test_map.py: Don't use from <module> import * |
883 |
|
|
884 |
|
2003-04-01 Jonathan Coles <[email protected]> |
885 |
|
|
886 |
|
* Thuban/Model/session.py: Use LAYER_CHANGED instead of |
887 |
|
LAYER_LEGEND_CHANGED |
888 |
|
|
889 |
|
* Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call |
890 |
|
self.Destroy() to close the window after yesterday's changes. |
891 |
|
|
892 |
|
* test/test_map.py, test/test_session.py: Fix messages that |
893 |
|
are sent from maps and layers. |
894 |
|
|
895 |
|
2003-03-31 Jonathan Coles <[email protected]> |
896 |
|
|
897 |
|
* Thuban/UI/classifier.py: Commented out some debugging statements. |
898 |
|
(ClassDataPreviewer.Draw): Draw rectangles for polygon layers per |
899 |
|
RTbug #1769. |
900 |
|
|
901 |
|
* Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and |
902 |
|
position (although position doesn't work yet under GTK). |
903 |
|
(DockableWindow.Destroy): New. Called when the window must be |
904 |
|
closed. Namely needed when the DockFrame closes and must close |
905 |
|
its children. |
906 |
|
(DockFrame): Listen for EVT_CLOSE and destroy all children. |
907 |
|
|
908 |
|
* Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up |
909 |
|
when then window is told to close. |
910 |
|
(LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See |
911 |
|
comment in source for more info. |
912 |
|
|
913 |
|
* Thuban/UI/main.py: Show the legend by default when Thuban starts. |
914 |
|
|
915 |
|
* Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for |
916 |
|
symmetry with other such methods. |
917 |
|
(MainWindow.ShowLegend): Show the legend docked by default. |
918 |
|
|
919 |
|
2003-03-28 Jonathan Coles <[email protected]> |
920 |
|
|
921 |
|
* Thuban/UI/classifier.py: Support for highlighting a specific |
922 |
|
group within the grid when the classification dialog is opened. |
923 |
|
Also contains a lot of debugging printouts which will later |
924 |
|
be removed. |
925 |
|
|
926 |
|
* Thuban/UI/dock.py: Complete rework on the dock code so that |
927 |
|
that it is fairly removed from the rest of the Thuban application. |
928 |
|
It is easy to add new docks which the rest of the program having |
929 |
|
to be aware of them. |
930 |
|
|
931 |
|
* Thuban/UI/legend.py: Modifications to support selecting a |
932 |
|
specific group in the classification dialog. Changed how layers |
933 |
|
are drawn when the layer is visible/invisible. |
934 |
|
|
935 |
|
* Thuban/UI/mainwindow.py: Removed legend specific code and |
936 |
|
replaced it with calls to the new dock code. |
937 |
|
|
938 |
|
* Thuban/UI/renderer.py (MapRenderer.__init__): Added assert |
939 |
|
to check if scale > 0. Trying to track down a divide by zero. |
940 |
|
|
941 |
|
2003-03-26 Jonathan Coles <[email protected]> |
942 |
|
|
943 |
|
* Thuban/UI/legend.py: Removed unnecessary LegendDialog class. |
944 |
|
(LegendPanel): Removed _OnDock()/_OnUnDock() methods which are |
945 |
|
now part of DockableWindow. |
946 |
|
(LegendPanel.DoOnSelChanged): Select the current layer in the |
947 |
|
map. |
948 |
|
(LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged() |
949 |
|
with the selected layer and/or group. |
950 |
|
|
951 |
|
2003-03-26 Jonathan Coles <[email protected]> |
952 |
|
|
953 |
|
This putback contains the code for dockable windows. There is |
954 |
|
no support in wxWindows as of this date for windows that can |
955 |
|
attach themselves to other windows. |
956 |
|
|
957 |
|
The current model contains a DockableWindow which has a parent |
958 |
|
window for when it is detached and a dock window that it puts |
959 |
|
its contents in when it is docked. The contents of a DockableWindow |
960 |
|
must be a DockPanel. DockPanel itself derives from wxPanel. |
961 |
|
|
962 |
|
* Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED |
963 |
|
message, not a LAYER_LEGEND_CHANGED message. |
964 |
|
|
965 |
|
* Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages. |
966 |
|
|
967 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE |
968 |
|
as one of the style properties for the fieldTypeText item to |
969 |
|
be sure that its size is correct when the text changes. |
970 |
|
|
971 |
|
* Thuban/UI/dock.py: New. Classes for the DockPanel and |
972 |
|
DockableWindow. |
973 |
|
|
974 |
|
* Thuban/UI/legend.py: Added some more buttons and made the |
975 |
|
LegendPanel a DockPanel. |
976 |
|
|
977 |
|
* Thuban/UI/mainwindow.py: Added sash windows to the main window |
978 |
|
and supporting functions for manipulating the sashes. |
979 |
|
(MainWindow.ShowLegend): Create a DockableWindow with the |
980 |
|
LegendPanel as the contents. |
981 |
|
|
982 |
|
* Thuban/UI/messages.py: Added DOCKABLE_* messages |
983 |
|
|
984 |
|
* Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED, |
985 |
|
not LAYER_LEGEND_CHANGED, messages. |
986 |
|
|
987 |
|
2003-03-25 Jonathan Coles <[email protected]> |
988 |
|
|
989 |
|
* setup.py: Added custom script bdist_rpm_build_script so that |
990 |
|
when the rpm is built the path to wx-config is correct. |
991 |
|
|
992 |
|
* setup.cfg: Added line saying to use the custom build script |
993 |
|
|
994 |
|
2003-03-20 Jonathan Coles <[email protected]> |
995 |
|
|
996 |
|
Initial implementation of the Legend. |
997 |
|
|
998 |
|
* Thuban/UI/legend.py: New. Creates a window that shows the map's |
999 |
|
Legend information and allows the user to add/modify classifications |
1000 |
|
and how the layers are drawn on the map. |
1001 |
|
|
1002 |
|
* setup.py: New command 'build_docs' which currently uses |
1003 |
|
happydoc to generate html documentation for Thuban. |
1004 |
|
|
1005 |
|
* Thuban/Model/classification.py (ClassGroup.GetDisplayText): New. |
1006 |
|
Returns a string which is appropriately describes the group. |
1007 |
|
|
1008 |
|
* Thuban/Model/layer.py (Layer.SetClassification): Generate a |
1009 |
|
LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event. |
1010 |
|
|
1011 |
|
* Thuban/Model/map.py (Map): Rename messages and use new, more |
1012 |
|
specific, messages. |
1013 |
|
|
1014 |
|
* Thuban/Model/messages.py: New message to indicate that a layer's |
1015 |
|
data has changed (LAYER_CHANGED). New map messages to indicate |
1016 |
|
when layers have been added/removed/changed or if the stacking order |
1017 |
|
of the layers has changed. |
1018 |
|
|
1019 |
|
* Thuban/Model/session.py: Rename and use new messages. |
1020 |
|
|
1021 |
|
* Thuban/UI/classifier.py: Remember if any changes have actually |
1022 |
|
been applied so that if the dialog is cancelled without an application |
1023 |
|
of changes we don't have to set a new classification. |
1024 |
|
(ClassDataPreviewer): Pulled out the window specific code and put it |
1025 |
|
ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw |
1026 |
|
symbols on any DC. |
1027 |
|
|
1028 |
|
* Thuban/UI/mainwindow.py: New code to open the legend. |
1029 |
|
|
1030 |
|
* Thuban/UI/view.py: Use new message names. |
1031 |
|
|
1032 |
|
2003-03-19 Jonathan Coles <[email protected]> |
1033 |
|
|
1034 |
|
* Thuban/UI/main.py (verify_versions): New. Checks the versions |
1035 |
|
of Python, wxPython, and some other libraries. |
1036 |
|
|
1037 |
|
* extensions/thuban/wxproj.cpp (check_version): Checks the given |
1038 |
|
version against what wxproj was compiled with. |
1039 |
|
(check_version_gtk): If wxproj was compiled with gtk then check |
1040 |
|
the given version against the version of the gtk library |
1041 |
|
currently being used. |
1042 |
|
|
1043 |
|
2003-03-14 Bernhard Herzog <[email protected]> |
1044 |
|
|
1045 |
|
* test/test_command.py: Run the tests when the module is run as a |
1046 |
|
script |
1047 |
|
|
1048 |
|
2003-03-14 Bernhard Herzog <[email protected]> |
1049 |
|
|
1050 |
|
Implement selection of multiple selected shapes in the same layer: |
1051 |
|
|
1052 |
|
- Introduce a new class to hold the selection. This basically |
1053 |
|
replaces the interactor which was nothing more than the |
1054 |
|
selection anyway. A major difference is of course that the new |
1055 |
|
selection class supports multiple selected shapes in one layer |
1056 |
|
|
1057 |
|
- Move the object that represents the selection from the |
1058 |
|
application to the canvas. The canvas is a better place than the |
1059 |
|
application because the selection represents which shapes and |
1060 |
|
layer of the map displayed by the canvas are selected and |
1061 |
|
affects how the map is drawn. |
1062 |
|
|
1063 |
|
- Make the selection and its messages publicly available through |
1064 |
|
the mainwindow. |
1065 |
|
|
1066 |
|
- The non-modal dialogs do not get a reference to the interactor |
1067 |
|
anymore as they can simply refer to their parent, the |
1068 |
|
mainwindow, for the what the interactor had to offer. |
1069 |
|
|
1070 |
|
* Thuban/UI/selection.py: New module with a class to represent the |
1071 |
|
selection. |
1072 |
|
|
1073 |
|
* Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove |
1074 |
|
these unused messages |
1075 |
|
|
1076 |
|
* Thuban/UI/application.py (ThubanApplication.OnInit) |
1077 |
|
(ThubanApplication.OnExit, ThubanApplication.SetSession): The |
1078 |
|
interactor is gone now. |
1079 |
|
(ThubanApplication.CreateMainWindow): There is no interactor |
1080 |
|
anymore so we pass None as the interactor argument for now for |
1081 |
|
compatibility. |
1082 |
|
|
1083 |
|
* Thuban/UI/view.py (MapCanvas.delegated_messages) |
1084 |
|
(MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and |
1085 |
|
Unsubscribe, delegate messages according to the delegated_messages |
1086 |
|
class variable. |
1087 |
|
(MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some |
1088 |
|
attributes from instance variables as described with the |
1089 |
|
delegated_methods class variable. |
1090 |
|
(MapCanvas.__init__): New instance variable selection holding the |
1091 |
|
current selection |
1092 |
|
(MapCanvas.do_redraw): Deal with multiple selected shapes. Simply |
1093 |
|
pass them on to the renderer |
1094 |
|
(MapCanvas.SetMap): Clear the selection when a different map is |
1095 |
|
selected. |
1096 |
|
(MapCanvas.shape_selected): Simple force a complete redraw. The |
1097 |
|
selection class now takes care of only issueing SHAPES_SELECTED |
1098 |
|
messages when the set of selected shapes actually does change. |
1099 |
|
(MapCanvas.SelectShapeAt): The selection is now managed in |
1100 |
|
self.selection |
1101 |
|
|
1102 |
|
* Thuban/UI/mainwindow.py (MainWindow.delegated_messages) |
1103 |
|
(MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and |
1104 |
|
Unsubscribe, delegate messages according to the delegated_messages |
1105 |
|
class variable. |
1106 |
|
(MainWindow.delegated_methods, MainWindow.__getattr__): Get some |
1107 |
|
attributes from instance variables as described with the |
1108 |
|
delegated_methods class variable. |
1109 |
|
(MainWindow.__init__): The interactor as ivar is gone. The |
1110 |
|
parameter is still there for compatibility. The selection messages |
1111 |
|
now come from the canvas. |
1112 |
|
(MainWindow.current_layer, MainWindow.has_selected_layer): |
1113 |
|
Delegate to the the canvas. |
1114 |
|
(MainWindow.LayerShowTable, MainWindow.Classify) |
1115 |
|
(MainWindow.identify_view_on_demand): The dialogs don't need the |
1116 |
|
interactor parameter anymore. |
1117 |
|
|
1118 |
|
* Thuban/UI/tableview.py (TableFrame.__init__) |
1119 |
|
(LayerTableFrame.__init__, LayerTableFrame.OnClose) |
1120 |
|
(LayerTableFrame.row_selected): The interactor is gone. It's job |
1121 |
|
from the dialog's point of view is now done by the mainwindow, |
1122 |
|
i.e. the parent. Subscribe to SHAPES_SELECTED instead |
1123 |
|
of SELECTED_SHAPE |
1124 |
|
|
1125 |
|
* Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor |
1126 |
|
is gone. It's job from the dialog's point of view is now done by |
1127 |
|
the mainwindow, i.e. the parent. |
1128 |
|
|
1129 |
|
* Thuban/UI/classifier.py (Classifier.__init__): The interactor is |
1130 |
|
gone. It's job from the dialog's point of view is now done by the |
1131 |
|
mainwindow, i.e. the parent. |
1132 |
|
|
1133 |
|
* Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is |
1134 |
|
gone. It's job from the dialog's point of view is now done by the |
1135 |
|
mainwindow, i.e. the parent. |
1136 |
|
(SessionTreeCtrl.__init__): New parameter mainwindow which is |
1137 |
|
stored as self.mainwindow. The mainwindow is need so that the tree |
1138 |
|
can still subscribe to the selection messages. |
1139 |
|
(SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all) |
1140 |
|
(SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The |
1141 |
|
selection is now accessible through the mainwindow. Subscribe to |
1142 |
|
SHAPES_SELECTED instead of SELECTED_SHAPE |
1143 |
|
|
1144 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Use the |
1145 |
|
SHAPES_SELECTED message now. |
1146 |
|
(IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED, |
1147 |
|
so deal with multiple shapes |
1148 |
|
(IdentifyView.__init__, IdentifyView.OnClose): The interactor is |
1149 |
|
gone. It's job from the dialog's point of view is now done by the |
1150 |
|
mainwindow, i.e. the parent. |
1151 |
|
|
1152 |
|
* Thuban/UI/controls.py (RecordListCtrl.fill_list): The second |
1153 |
|
parameter is now a list of shape ids. |
1154 |
|
(RecordTable.SetTable): The second parameter is now a list of |
1155 |
|
indices. |
1156 |
|
|
1157 |
|
* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the |
1158 |
|
selected_shape parameter and ivar to selected_shapes. It's now a |
1159 |
|
list of shape ids. |
1160 |
|
(MapRenderer.draw_label_layer): Deal with multiple selected |
1161 |
|
shapes. Rearrange the code a bit so that the setup and shape type |
1162 |
|
distinctions are only executed once. |
1163 |
|
|
1164 |
|
* test/test_selection.py: Test cases for the selection class |
1165 |
|
|
1166 |
|
2003-03-11 Jonathan Coles <[email protected]> |
1167 |
|
|
1168 |
|
* Thuban/Model/load.py: Temporary fix so that the xml reader |
1169 |
|
doesn't cause Thuban to crash. |
1170 |
|
|
1171 |
|
* Thuban/Model/layer.py: Handle the cyclic references between |
1172 |
|
a layer and its classification better, and be sure to disconnect |
1173 |
|
the classification from the layer when the layer is destroyed |
1174 |
|
so that we don't maintain a cyclic reference that may not be |
1175 |
|
garbage collected. |
1176 |
|
|
1177 |
|
* Thuban/Model/classification.py: See comment for layer.py. |
1178 |
|
|
1179 |
|
2003-03-12 Jan-Oliver Wagner <[email protected]> |
1180 |
|
|
1181 |
|
* HOWTO-Release: New. Information on the steps for releasing |
1182 |
|
a new version of Thuban. |
1183 |
|
|
1184 |
|
2003-03-11 Jonathan Coles <[email protected]> |
1185 |
|
|
1186 |
|
* Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog. |
1187 |
|
Use True instead of true. |
1188 |
|
(Classifier): Should have a single panel in which all the controls lie. |
1189 |
|
|
1190 |
|
* Thuban/UI/proj4dialog.py: Add normal border. |
1191 |
|
|
1192 |
|
* Thuban/UI/tree.py: Fixed problem with bad item images under Windows. |
1193 |
|
|
1194 |
|
* Thuban/UI/mainwindow.py: Use True instead of true. |
1195 |
|
|
1196 |
|
* setup.py: Update some definitions to use wxWindows2.4 files |
1197 |
|
|
1198 |
|
* Data/iceland_sample_class.thuban: Fixed file so that the |
1199 |
|
field_type information is present. |
1200 |
|
|
1201 |
2003-03-10 Jonathan Coles <[email protected]> |
2003-03-10 Jonathan Coles <[email protected]> |
1202 |
|
|
1203 |
* Thuban/UI/classifier.py (Classifier.__init__): Make the |
* Thuban/UI/classifier.py (Classifier.__init__): Make the |