Parent Directory
|
Revision Log
Sticky Revision: |
made a copy
2006-09-18 Didrik Pinte <dpinte@itae.be> * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6
Enable the experimental attribute editing again and introduce a command line switch to actually activate it * Thuban/UI/main.py (options): New. Container for options set on the commmand line (main): Add the --enable-attribute-editing flag. * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute editing is enabled use the grid ctrl which allows editing of the values * Thuban/Model/transientdb.py (AutoTransientTable.write_record): New. Just delegate this to the underlying table.
(IdentifyView.selected_shape): Fix typo in doc-string
(IdentifyView.ID_STOP): New. (IdentifyView.__init__): Added another button that allows to stop the identify mode. (IdentifyView.OnStop): New. Stops the identify mode.
Update to the layer interface: Direct access to the table, shapetable, shapefile and filename attributes is now actively deprecated by issuing deprecation warnings for all places where this happens. * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access to the instance variables table, shapetable, shapefile and filename via __getattr__ so that we can issue a deprecation warning. (Layer.SetShapeStore): Don't set the deprecated instance variables any more (Layer.SetShapeStore): Don't use deprecated layer instance variables (Layer.Destroy): No need to explicitly remove the instance variables any more (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer instance variables * Thuban/UI/classgen.py (ClassGenDialog.__init__) (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve) (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't use deprecated layer instance variables * Thuban/UI/classifier.py (Classifier.__init__): Don't use deprecated layer instance variables * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer instance variables * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use deprecated layer instance variables * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use deprecated layer instance variables * Thuban/Model/save.py (SessionSaver.write_layer): Don't use deprecated layer instance variables * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer) (MapRenderer.polygon_render_param): Don't use deprecated layer instance variables * test/runtests.py (main): Turn Thuban's deprecation warnings into errors so that they're cought by the tests * test/test_load.py (TestSingleLayer.test): Don't use deprecated layer instance variables
(IdentifyView.__init__): Call self.selected_shape with the current selection to make sure the contents of the dialog are up to date when it's shown for the first time. The dialog used to work without this by luck. The recent fix to the connector module 'broke' a 'feature' the identify view was relying on, i.e that subscribing to a message in response to receiving a message of that type would mean that the new subscriber would also be called for the same message.
(IdentifyView.__init__): Layout reimplemented without panel. Make life easier to fit the list in the dialog.
(IdentifyView.__init__): Use ListCtrl instead of GridCtrl
Replace the true/false of wxWindows by True/False of Python 2.2.1.
(IdentifyListCtrl.selected_shape) (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
Implement multiple selected shapes * Thuban/UI/selection.py: New module with a class to represent the selection. * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove these unused messages * Thuban/UI/application.py (ThubanApplication.OnInit) (ThubanApplication.OnExit, ThubanApplication.SetSession): The interactor is gone now. (ThubanApplication.CreateMainWindow): There is no interactor anymore so we pass None as the interactor argument for now for compatibility. * Thuban/UI/view.py (MapCanvas.delegated_messages) (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and Unsubscribe, delegate messages according to the delegated_messages class variable. (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some attributes from instance variables as described with the delegated_methods class variable. (MapCanvas.__init__): New instance variable selection holding the current selection (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply pass them on to the renderer (MapCanvas.SetMap): Clear the selection when a different map is selected. (MapCanvas.shape_selected): Simple force a complete redraw. The selection class now takes care of only issueing SHAPES_SELECTED messages when the set of selected shapes actually does change. (MapCanvas.SelectShapeAt): The selection is now managed in self.selection * Thuban/UI/mainwindow.py (MainWindow.delegated_messages) (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and Unsubscribe, delegate messages according to the delegated_messages class variable. (MainWindow.delegated_methods, MainWindow.__getattr__): Get some attributes from instance variables as described with the delegated_methods class variable. (MainWindow.__init__): The interactor as ivar is gone. The parameter is still there for compatibility. The selection messages now come from the canvas. (MainWindow.current_layer, MainWindow.has_selected_layer): Delegate to the the canvas. (MainWindow.LayerShowTable, MainWindow.Classify) (MainWindow.identify_view_on_demand): The dialogs don't need the interactor parameter anymore. * Thuban/UI/tableview.py (TableFrame.__init__) (LayerTableFrame.__init__, LayerTableFrame.OnClose) (LayerTableFrame.row_selected): The interactor is gone. It's job from the dialog's point of view is now done by the mainwindow, i.e. the parent. Subscribe to SHAPES_SELECTED instead of SELECTED_SHAPE * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor is gone. It's job from the dialog's point of view is now done by the mainwindow, i.e. the parent. * Thuban/UI/classifier.py (Classifier.__init__): The interactor is gone. It's job from the dialog's point of view is now done by the mainwindow, i.e. the parent. * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is gone. It's job from the dialog's point of view is now done by the mainwindow, i.e. the parent. (SessionTreeCtrl.__init__): New parameter mainwindow which is stored as self.mainwindow. The mainwindow is need so that the tree can still subscribe to the selection messages. (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all) (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The selection is now accessible through the mainwindow. Subscribe to SHAPES_SELECTED instead of SELECTED_SHAPE * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the SHAPES_SELECTED message now. (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED, so deal with multiple shapes (IdentifyView.__init__, IdentifyView.OnClose): The interactor is gone. It's job from the dialog's point of view is now done by the mainwindow, i.e. the parent. * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the selected_shape parameter and ivar to selected_shapes. It's now a list of shape ids. (MapRenderer.draw_label_layer): Deal with multiple selected shapes. Rearrange the code a bit so that the setup and shape type distinctions are only executed once.
(IdentifyView.__init__): Set size of dialog.
Replace user string by _() for i18n.
* Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a RecordGrid in the identifyview. (IdentifyView.__init__): Use IdentifyGridCtrl instead of IdentifyListCtrl. The grid allows editing of the values.
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape): Handle the case of no layer (i.e. layer is None) properly.
(IdentifyListCtrl): Derive from the new class RecordListCtrl
(IdentifyListCtrl.__init__): Remove the interactor argument. The SELECTED_SHAPE message is now handled by the parent. (IdentifyView.__init__): Add the interactor argument so that we can handle the SELECTED_SHAPE message here (IdentifyView.selected_shape): New method to handle the SELECTED_SHAPE messages (IdentifyView): Derive from the new NonModalDialog class (IdentifyView.OnClose): Extend the inherited version to unsubscribe SELECT_SHAPE
import all the source files
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |