Parent Directory
|
Revision Log
* Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New message. * Thuban/Model/layer.py (Layer.SetShapeStore): Send LAYER_SHAPESTORE_REPLACED when the shapestore changes. A LAYER_CHANGED will still be sent if the classification changes. * Thuban/UI/classifier.py (Classifier.__init__): Add the map as parameter so we can subscribe to some of its messages (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED and the layer's LAYER_SHAPESTORE_REPLACED (Classifier.unsubscribe_messages): New. Unsubscribe from message subscribed to in __init__ (Classifier.map_layers_removed) (Classifier.layer_shapestore_replaced): receivers for the messages subscribed to in __init__. Unsubscribe and close the dialog * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass the map to the Classifier dialog * test/test_layer.py (SetShapeStoreTests): Derive from SubscriberMixin as well so we can test messages (SetShapeStoreTests.setUp): Subscribe to some of the layer's messages (SetShapeStoreTests.tearDown): Clear the messages again (SetShapeStoreTests.test_sanity): Expand the doc-string and check for the modified flag too (SetShapeStoreTests.test_set_shape_store_modified_flag): New test to check whether SetShapeStore sets the modified flag (SetShapeStoreTests.test_set_shape_store_different_field_name) (SetShapeStoreTests.test_set_shape_store_same_field) (SetShapeStoreTests.test_set_shape_store_same_field_different_type): Add tests for the messages. This checks both the new LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1 | # Copyright (c) 2001, 2003 by Intevation GmbH |
2 | # Authors: |
3 | # Bernhard Herzog <[email protected]> |
4 | # |
5 | # This program is free software under the GPL (>=v2) |
6 | # Read the file COPYING coming with Thuban for details. |
7 | |
8 | """ |
9 | Define the message types used by the classes implementing Thuban's data |
10 | model. The messages types are simply strings. The message system itself |
11 | is implemented in Thuban.Lib.connector. |
12 | """ |
13 | __version__ = "$Revision$" |
14 | |
15 | # Common message types |
16 | TITLE_CHANGED = "TITLE_CHANGED" |
17 | CHANGED = "CHANGED" |
18 | |
19 | # layer specific message types |
20 | LAYER_PROJECTION_CHANGED = "LAYER_PROJECTION_CHANGED" |
21 | LAYER_LEGEND_CHANGED = "LAYER_LEGEND_CHANGED" |
22 | LAYER_VISIBILITY_CHANGED = "LAYER_VISIBILITY_CHANGED" |
23 | LAYER_CHANGED = "LAYER_CHANGED" |
24 | LAYER_SHAPESTORE_REPLACED = "LAYER_SHAPESTORE_REPLACED" |
25 | |
26 | # Map specific message types |
27 | MAP_STACKING_CHANGED = "MAP_STACKING_CHANGED" |
28 | MAP_LAYERS_CHANGED = "MAP_LAYERS_CHANGED" |
29 | MAP_LAYERS_ADDED = "MAP_LAYERS_ADDED" |
30 | MAP_LAYERS_REMOVED = "MAP_LAYERS_REMOVED" |
31 | MAP_PROJECTION_CHANGED = "MAP_PROJECTION_CHANGED" |
32 | |
33 | # Extension specific message types |
34 | EXTENSION_CHANGED = "EXTENSION_CHANGED" |
35 | EXTENSION_OBJECTS_CHANGED = "EXTENSION_OBJECTS_CHANGED" |
36 | |
37 | # Session specific message types |
38 | MAPS_CHANGED = "MAPS_CHANGED" |
39 | EXTENSIONS_CHANGED = "EXTENSIONS_CHANGED" |
40 | FILENAME_CHANGED = "FILENAME_CHANGED" |
41 | |
42 | TABLE_REMOVED = "TABLE_REMOVED" |
43 |
Name | Value |
---|---|
svn:eol-style | native |
svn:keywords | Author Date Id Revision |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |