Parent Directory
|
Revision Log
* Thuban/Model/messages.py (TABLE_REMOVED): New message. * Thuban/Model/session.py (Session.UnreferencedTables): New method to return tables that are not referenced by other tables or shape stores and can be removed. (Session.RemoveTable): Issue a TABLE_REMOVED message after removing the table * Thuban/UI/mainwindow.py: Remove unused imports (MainWindow.TableClose): Implement. * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some messages so that the frame will be automatically closed when a new session is opened or the table is removed. (TableFrame.OnClose): Unsubscribe the Subscriptions made in __init__ (TableFrame.close_on_session_replaced) (TableFrame.close_on_table_removed): New. Subscribers that close the window * test/test_session.py (TestSessionMessages.test_remove_table) (TestSessionSimple.test_remove_table): Move the test to TestSessionSimple and add test for the TABLE_REMOVED message (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED (TestSessionSimple.test_unreferenced_tables) New. Test for the UnreferencedTables method. (UnreferencedTablesTests): New. Class with some more sophisticated tests for UnreferencedTables.
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 | |
25 | # Map specific message types |
26 | MAP_STACKING_CHANGED = "MAP_STACKING_CHANGED" |
27 | MAP_LAYERS_CHANGED = "MAP_LAYERS_CHANGED" |
28 | MAP_LAYERS_ADDED = "MAP_LAYERS_ADDED" |
29 | MAP_LAYERS_REMOVED = "MAP_LAYERS_REMOVED" |
30 | MAP_PROJECTION_CHANGED = "MAP_PROJECTION_CHANGED" |
31 | |
32 | # Extension specific message types |
33 | EXTENSION_CHANGED = "EXTENSION_CHANGED" |
34 | EXTENSION_OBJECTS_CHANGED = "EXTENSION_OBJECTS_CHANGED" |
35 | |
36 | # Session specific message types |
37 | MAPS_CHANGED = "MAPS_CHANGED" |
38 | EXTENSIONS_CHANGED = "EXTENSIONS_CHANGED" |
39 | FILENAME_CHANGED = "FILENAME_CHANGED" |
40 | |
41 | TABLE_REMOVED = "TABLE_REMOVED" |
42 |
Name | Value |
---|---|
svn:eol-style | native |
svn:keywords | Author Date Id Revision |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |