/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban/UI/tableview.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 22493 byte(s)
Diff to previous 2718 , to selected 1276
made a copy

Revision 2718 - (view) (annotate) - [select for diffs]
Modified Fri Jan 5 23:43:49 2007 UTC (18 years, 2 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 22493 byte(s)
Diff to previous 2700 , to selected 1276
2007-01-06 Didrik Pinte <dpinte@itae.be>

       UTF-8 locales support reading non utf-8 files. This is a workaround and
       not a real bugfix. See
       http://wald.intevation.org/tracker/index.php?func=detail&aid=118 for
       more details

       * Thuban/UI/
       tableview.py, controls.py, baserenderer.py, view.py: decode text from
       iso-8859-1 encoding.




Revision 2700 - (view) (annotate) - [select for diffs]
Modified Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 22138 byte(s)
Diff to previous 2561 , to selected 1276
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2561 - (view) (annotate) - [select for diffs]
Modified Tue Feb 8 20:34:29 2005 UTC (20 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 22010 byte(s)
Diff to previous 2032 , to selected 1276
More wxPython 2.5 changes.  This time taken from a patch from
Daniel Calvelo Aros.

* Thuban/UI/tableview.py (QueryTableFrame.__init__)
(QueryTableFrame.__init__): Pass the size of a spacer as a single
item.

* Thuban/UI/projdialog.py (ProjFrame.build_dialog)
(ProjFrame.build_dialog): Pass the size of a spacer as a single
item.

* Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Pass the
size of a spacer as a single item.

* Thuban/UI/classifier.py (Classifier.dialog_layout): Pass the
size of a spacer as a single item.


Revision 2032 - (view) (annotate) - [select for diffs]
Modified Mon Dec 22 14:54:47 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 22004 byte(s)
Diff to previous 1892 , to selected 1276
(TableGrid.OnDestroy)
(TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
unsubscribe all subscribers.
(LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
self.grid since it may already have been destroyed.
Fixes RT #2256


Revision 1892 - (view) (annotate) - [select for diffs]
Modified Thu Oct 30 18:16:53 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 21507 byte(s)
Diff to previous 1662 , to selected 1276
(TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
Unsubscribe the messages here not in OnClose because that might
get called multiple times. Fixes RT #2196
(TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
anymore.


Revision 1662 - (view) (annotate) - [select for diffs]
Modified Wed Aug 27 13:51:01 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 21441 byte(s)
Diff to previous 1394 , to selected 1276
Make the table interface distinguish between row ids (an integer
that uniquely identifies a row) and row ordinals (a simple row
count from 0 to NumRows() - 1)

* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
(PostGISTable.RowOrdinalToId): New methods to conver between row
ids and row ordinals
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
parameter row_is_ordinal to indicate whether the row parameter is
the row id or the ordinal

* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
(TransientTableBase.RowOrdinalToId)
(AutoTransientTable.RowIdToOrdinal)
(AutoTransientTable.RowOrdinalToId): Same new methods as in
PostGISTable.
(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
Same new parameter as in PostGISTable.

* Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
(DBFTable.ReadValue, DBFTable.ReadRowAsDict)
(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
parameter as in PostGISTable.

* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
(DataTable.RowOrdinalToId): New methods to convert between row ids
and row ordinals.
(TableGrid.SelectRowById): New method to select a row based on its
ID as opposed to its ordinal
(DataTable.GetValue, TableGrid.OnRangeSelect)
(TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
(QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
(LayerTableFrame.__init__): Convert between row ids and row
ordinals as appropriate

* test/postgissupport.py (PostGISDatabase.__init__): Add
doc-string.
(PostGISDatabase.initdb): The optional third item in a tuple in
tables is now a (key, value) list with additional arguments to
pass to upload_shapefile
(upload_shapefile): New parameter gid_offset to allow gids that
are not the same as the shapeids in the shapefile
(PostgreSQLServer.get_default_static_data_db): Use the new
gid_offset to make the gids in landmarks 1000 higher than the
shapeids in the shapefile

* test/test_viewport.py
(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
new shapeids in the landmarks table

* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Add tests for
the new table methods and new keywords arguments.

* test/test_postgis_db.py
(TestPostGISTable.test_read_row_as_dict_row_count_mode)
(TestPostGISTable.test_read_value_row_count_mode)
(TestPostGISTable.test_row_id_to_ordinal)
(TestPostGISTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
(TestPostGISShapestorePoint.test_shapes_in_region)
(TestPostGISShapestorePoint.test_shape_raw_data)
(TestPostGISShapestorePoint.test_shape_points)
(TestPostGISShapestorePoint.test_shape_shapeid)
(TestPostGISShapestorePoint.test_all_shapes)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_read_value)
(TestPostGISTable.test_read_row_as_dict): Adapt to the new
shapeids in the landmarks table

* test/test_memory_table.py
(TestMemoryTable.test_read_row_as_dict_row_count_mode)
(TestMemoryTable.test_read_value_row_count_mode)
(TestMemoryTable.test_row_id_to_ordinal)
(TestMemoryTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments

* test/test_dbf_table.py
(TestDBFTable.test_read_row_as_dict_row_count_mode)
(TestDBFTable.test_read_value_row_count_mode)
(TestDBFTable.test_row_id_to_ordinal)
(TestDBFTable.test_row_oridnal_to_id): New test for the new table
methods and the new arguments


Revision 1394 - (view) (annotate) - [select for diffs]
Modified Thu Jul 10 14:54:58 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 20726 byte(s)
Diff to previous 1276
(QueryTableFrame.__init__): Add an
        Export Selection button and move the export buttons underneath
        the table.
(QueryTableFrame.UpdateStatusText): Added event argument so
        that it can respond to grid selection events. The status text
        is now updated even when the table is not associated with a
        layer as was previously assumed.
(QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
        UpdateStatusText responds to these events.
(QueryTableFrame.OnSaveAs): Renamed to doExport.
(QueryTableFrame.doExport): Helper function that saves the
        entire table, or selected rows, to a file.
(QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
        Respond to export button events and call doExport.


Revision 1276 - (view) (annotate) - [selected]
Modified Fri Jun 20 17:46:34 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 20190 byte(s)
Diff to previous 1219
Use Thuban[Begin|End]BusyCursor()
        instead of a direct call to wx[Begin|End]CusyCursor().


Revision 1219 - (view) (annotate) - [select for diffs]
Modified Mon Jun 16 17:42:54 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 20110 byte(s)
Diff to previous 1202 , to selected 1276
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


Revision 1202 - (view) (annotate) - [select for diffs]
Modified Fri Jun 13 16:01:10 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 20095 byte(s)
Diff to previous 1199 , to selected 1276
(TableFrame.__init__): Add a panel
        object that can be used by derived classes to place any
        controls (including the grid) onto.
(QueryTableFrame.__init__): Use the panel as the parent window
        for all the controls. Reparent the grid so that the panel is
        the parent. Call UpdateStatusText() to correctly initialize
        the status bar.


Revision 1199 - (view) (annotate) - [select for diffs]
Modified Fri Jun 13 15:04:28 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 19748 byte(s)
Diff to previous 1146 , to selected 1276
(TableGrid.__init__): Create an
        instance variable to keep track of how many rows are selected.
        Subscribe once to the the events we are interested in.
(ThubanGrid.OnRangeSelect): Only handle event if event handling
        hasn't been turned off.
(ThubanGrid.OnSelectCell): Only handle event if event handling
        hasn't been turned off.
(ThubanGrid.ToggleEventListeners): Rather than subscribe None
        as an event listener (which changes the event handler stack)
        simply set an instance variable to False. This is checked in
        the event handlers.
(ThubanGrid.GetNumberSelected): Return the number of currently
        selected rows.
(TableFrame): Inherit from ThubanFrame so we can have a
        status bar and control buttons.
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
        Explicitly set which items are selected in the operator choice and
        action choice so there is always a valid selection. Fixes RTbug #1941.
        Subscribe to grid cell selection events so we can update the
        status bar.
(QueryTableFrame.UpdateStatusText): Update the status bar with
        how many rows are in the grid, how many columns, and how many
        rows are selected.
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
        Call UpdateStatusText when cells are (de)selected.
(QueryTableFrame.OnQuery): Use the string value in the value
        combo if either the selected item index is 0 or if the string
        cannot be found in the predefined list (this happens if the
        user changes the text). Fixes RTbug #1940.
        Only turn off the grid event listeners if there a query comes
        back with a none empty list of ids. in the case that the list
        is empty this causes a grid.ClearSelection() call to actually
        clear the grid selection which causes the selected items in
        the map to be deselected. Fixes RTbug #1939.


Revision 1146 - (view) (annotate) - [select for diffs]
Modified Tue Jun 10 12:00:16 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 18760 byte(s)
Diff to previous 1104 , to selected 1276
(LayerTableFrame.__init__): Subscribe to
the messages MAP_LAYERS_REMOVED messages
(LayerTableFrame.OnClose): Unsubscribe from it.
(LayerTableFrame.map_layers_removed): New. Receiver for
MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
dialog is showing is removed.


Revision 1104 - (view) (annotate) - [select for diffs]
Modified Fri May 30 06:29:54 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 18268 byte(s)
Diff to previous 1096 , to selected 1276
(QueryTableFrame.OnQuery): Wrap code with try/finally. Fixes RTBug #1904.


Revision 1096 - (view) (annotate) - [select for diffs]
Modified Thu May 29 10:03:07 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 18047 byte(s)
Diff to previous 1092 , to selected 1276
(LayerTableFrame.OnClose): Bug-fix: Now
unsubscribes all that is subcribed in __init__.


Revision 1092 - (view) (annotate) - [select for diffs]
Modified Wed May 28 17:10:04 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 17983 byte(s)
Diff to previous 1068 , to selected 1276
(NullRenderer.Draw): New. Our own
renderer so that NULL/None values get displayed differently (by a
gray rectangle).
(TableGrid.__init__): Override the default renderers


Revision 1068 - (view) (annotate) - [select for diffs]
Modified Tue May 27 15:02:37 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 16638 byte(s)
Diff to previous 1066 , to selected 1276
* 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.


Revision 1066 - (view) (annotate) - [select for diffs]
Modified Tue May 27 14:18:05 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15576 byte(s)
Diff to previous 1058 , to selected 1276
(QueryTableFrame.__init__): The "_S_election" display has some unwanted side
effects. Removed again.


Revision 1058 - (view) (annotate) - [select for diffs]
Modified Tue May 27 11:30:29 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15577 byte(s)
Diff to previous 1045 , to selected 1276
Dialog derived from NonModalNonParentDialog


Revision 1045 - (view) (annotate) - [select for diffs]
Modified Tue May 27 06:54:03 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15550 byte(s)
Diff to previous 1035 , to selected 1276
(QueryTableFrame.__init__): Underline the "S" of selection box label to
	hint on hot key (Alt-S). Works under Win32 but is ignored under GTK.


Revision 1035 - (view) (annotate) - [select for diffs]
Modified Mon May 26 17:03:08 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15514 byte(s)
Diff to previous 1032 , to selected 1276
Replace the true/false of wxWindows by True/False of Python 2.2.1.


Revision 1032 - (view) (annotate) - [select for diffs]
Modified Mon May 26 15:33:20 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15514 byte(s)
Diff to previous 1027 , to selected 1276
(LayerTableFrame.__init__): If there is already a selection present,
update the grid accordingly.


Revision 1027 - (view) (annotate) - [select for diffs]
Modified Mon May 26 11:47:17 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 15320 byte(s)
Diff to previous 1013 , to selected 1276
(QueryTableFrame.OnSaveAs): Call table_to_dbf or table_to_csv depending on
	file selection.


Revision 1013 - (view) (annotate) - [select for diffs]
Modified Fri May 23 09:18:28 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 14816 byte(s)
Diff to previous 979 , to selected 1276
(LayerTableFrame, QueryTableFrame): Split the class LayerTableFrame into
two classes, LayerTableFrame and QueryTableFrame.
The latter implements the selection GUI without dependency on a layer.
LayerTableFrame now is derived from QueryTableFrame and connects
to a layer.


Revision 979 - (view) (annotate) - [select for diffs]
Modified Thu May 22 11:40:59 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 13855 byte(s)
Diff to previous 966 , to selected 1276
(LayerTableFrame.__init__): Rename 'Save As'
	Button to 'Export'. Center Buttons in Selection Box, set Focus to
	Grid.
(LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
	changes focus to the Selection when pressing "Alt-S".


Revision 966 - (view) (annotate) - [select for diffs]
Modified Wed May 21 17:24:40 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 13384 byte(s)
Diff to previous 939 , to selected 1276
(TableGrid.__init__): Call
        ToggleEventListeners to turn on listening.
(TableGrid.ToggleEventListeners): New. Turns event listening on
        and off so as to prevent excessive messages.
(LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
        to suppress excessive messages when selecting many rows.
        Fixes RTBug #1880.


Revision 939 - (view) (annotate) - [select for diffs]
Modified Tue May 20 15:25:22 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 12240 byte(s)
Diff to previous 881 , to selected 1276
(LayerTableFrame.__init__): Change the
        Choices symbols to match those used in the table query method.
        Replace deprecated method calls on table with new method names.


Revision 881 - (view) (annotate) - [select for diffs]
Modified Fri May 9 16:34:15 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 12451 byte(s)
Diff to previous 838 , to selected 1276
(TableGrid.OnRangeSelect): Fix some issues
        with correctly selecting the rows and issuing the right events.
        Be sure to call Skip() to allow the grid to do some of its own
        handling which allows the rows to actually be selected.
(LayerTableGrid.select_shapes): Rename from select_shape. Supports
        selecting multiple shapes.
(LayerTableFrame): Support for building Queries.
(LayerTableFrame.select_shapes): Allow multiple shapes to be selected.


Revision 838 - (view) (annotate) - [select for diffs]
Modified Tue May 6 15:53:32 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 8051 byte(s)
Diff to previous 808 , to selected 1276
(DataTable.SetTable, DataTable.GetValue):
Adapt to new table interface


Revision 808 - (view) (annotate) - [select for diffs]
Modified Mon May 5 10:33:47 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 8080 byte(s)
Diff to previous 535 , to selected 1276
(TableGrid.disallow_messages)
(TableGrid.allow_messages): New methods to make it possible to
inhibit message sending.
(TableGrid.issue): Only send the message if not inhibited.
(LayerTableGrid.select_shape): Use the new methods to make sure
that no ROW_SELECTED message is sent while we're updating the
selected rows to match the selected shapes.


Revision 535 - (view) (annotate) - [select for diffs]
Modified Fri Mar 14 20:42:18 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 6650 byte(s)
Diff to previous 279 , to selected 1276
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.


Revision 279 - (view) (annotate) - [select for diffs]
Modified Mon Aug 26 15:06:01 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 6433 byte(s)
Diff to previous 278 , to selected 1276
(LayerTableGrid.select_shape): Remove a debug print


Revision 278 - (view) (annotate) - [select for diffs]
Modified Mon Aug 26 12:50:23 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 6491 byte(s)
Diff to previous 173 , to selected 1276
* Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
layer table specific code from TableGrid into LayerTableGrid
(TableFrame, LayerTableFrame): Split the layer table specific code
from TableFrame into LayerTableFrame

* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
LayerTableFrame


Revision 173 - (view) (annotate) - [select for diffs]
Modified Wed May 15 13:29:34 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 5269 byte(s)
Diff to previous 77 , to selected 1276
	* Thuban/UI/tableview.py (TableGrid.__init__): Do not call
	AutoSizeColumns because it will cause a traversal of the entire
	table which for large .dbf files will take a very long time.


Revision 77 - (view) (annotate) - [select for diffs]
Modified Mon Feb 4 19:27:13 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 5033 byte(s)
Diff to previous 34 , to selected 1276
	* Thuban/UI/tableview.py (TableGrid.__init__): Fix typo


Revision 34 - (view) (annotate) - [select for diffs]
Modified Thu Sep 6 15:32:56 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 5028 byte(s)
Diff to previous 30 , to selected 1276
	* Thuban/UI/tableview.py: Add some doc-strings
	(TableGrid):
	(TableGrid.OnRangeSelect):
	(TableGrid.OnSelectCell):
	(TableFrame.__init__):
	(TableFrame.row_selected):
	Selecting rows in the grid view now updates the selected shapes
	through the TableFrame. To achieve this we derive TableGrid from
	Publisher and introduce the message type ROW_SELECTED which the
	TableFrame subscribes to and which is issued by OnRangeSelect and
	OnSelectCell

	(DataTable.SelectRow): Removed because it's no longer needed in
	the row/shape selection scheme


Revision 30 - (view) (annotate) - [select for diffs]
Modified Thu Sep 6 13:31:57 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 4718 byte(s)
Diff to previous 6 , to selected 1276
(TableGrid.__init__): Don't subscribe to the SELECTED_SHAPE message
anymore. This is now handled by the parent.
(TableGrid.select_shape): Only update the selection if the shape is not
None.

(TableFrame): Inherit from the new NonModalDialog class.
(TableFrame.__init__, TableFrame.select_shape): Handle the SELECT_SHAPE
message.
(TableFrame.OnClose): Extend the inherited method to unsubscribe
SELECT_SHAPE


Revision 6 - (view) (annotate) - [select for diffs]
Added Tue Aug 28 15:41:52 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/tableview.py
File length: 4392 byte(s)
Diff to selected 1276
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.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26