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

Log of /branches/WIP-pyshapelib-bramz/Thuban/UI/legend.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: 25121 byte(s)
Diff to previous 2700 , to selected 1115
made a copy

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/legend.py
File length: 25121 byte(s)
Diff to previous 2588 , to selected 1115
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2588 - (view) (annotate) - [select for diffs]
Modified Tue Mar 29 18:05:01 2005 UTC (19 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 25030 byte(s)
Diff to previous 2562 , to selected 1115
(BMP_SIZE_W, BMP_SIZE_H): Set both to 16 to
match the site of the legend_icon_layer icon.  Otherwise wxpython
2.5 complains when the legend is created with the error:

PyAssertionError: C++ assertion "(bitmap.GetWidth() == m_width &&
bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0)"
failed in ./src/generic/imaglist.cpp(81): invalid bitmap size in
wxImageList: this might work on this platform but definitely won't under
Windows.


Revision 2562 - (view) (annotate) - [select for diffs]
Modified Wed Feb 16 21:14:47 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 25030 byte(s)
Diff to previous 2560 , to selected 1115
Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
so that that wxproj doesn't crash. Added GUI support for selecting
alpha channel (opacity can't be selected yet).


Revision 2560 - (view) (annotate) - [select for diffs]
Modified Tue Feb 8 20:25:22 2005 UTC (20 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 24834 byte(s)
Diff to previous 2187 , to selected 1115
Compatibility with wxPython 2.5.  The changes should make it work
better with 2.5 while still keeping compatibility with 2.4.  There
are still problems with 2.5, though.

* Thuban/UI/dock.py (DockableWindow.__CreateBorder): Pass the size
of a spacer as a single item.

* Thuban/UI/classifier.py (ClassGroupPropertiesCtrl): Derive only
from wxControl

* Thuban/UI/legend.py (LegendTree): When running with wxPython <
2.5, add an implementation of the GetFirstChild method that does
not require the second parameter.
(LegendTree.find_layer, LegendTree._OnMsgMapLayersAdded)
(LegendTree._OnMsgMapLayersRemoved, LegendTree.DeleteAllItems)
(LegendTree.DeleteChildren, LegendTree.__ShowHideLayer): Do not
pass the second parameter to GetFirstChild


Revision 2187 - (view) (annotate) - [select for diffs]
Modified Sun Apr 18 20:37:45 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 24149 byte(s)
Diff to previous 1895 , to selected 1115
ID_POP_xxx: removed.
(LegendPanel.__init__): Removed EVT_MENU bindings.
(LegendTree._OnRightClick): Replace direct creation of
menu via wx Classes by applying the menu definition
as of Menu class of menu.py.


Revision 1895 - (view) (annotate) - [select for diffs]
Modified Fri Oct 31 10:13:32 2003 UTC (21 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 25094 byte(s)
Diff to previous 1837 , to selected 1115
Added two items to legend popup menu: Remove Layer and Show Layer Table

* Thuban/UI/legend.py
	(LegendPanel._OnRemoveLayer, LegendPanel._OnShowTable):
	New event handlers, call the corresponding mainwindow methods.
	(LegendTree._OnRightClick): Added items to popup menu.


Revision 1837 - (view) (annotate) - [select for diffs]
Modified Tue Oct 21 09:29:52 2003 UTC (21 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 24618 byte(s)
Diff to previous 1252 , to selected 1115
Popup menu for legend. Scheduled for the 1.2 release this was too
simple to implement: The popup menu is bound to the legend tree, while
the events are hanlded by its anchestor, the legend panel. This
allows reuse of all the event handlers already implemented for the
legend toolbar buttons.

* Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
	to add handlers for the events issued by the popup menu.
 	(LegendPanel._OnToggleVisibility): Handler for toggling layer
	visibility event
    	(LegendPanel._OnProjection): Handler for layer projection event.
	(LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
	(LegendTree._OnRightClick): Event handler for right click, select item
	and pop up menu.
	(LegendTree.ToggleVisibility): Toggle layer visibility
	(LegendTree.LayerProjection): Raise layer projection dialog for
	current layer.


Revision 1252 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 09:28:08 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 22320 byte(s)
Diff to previous 1241 , to selected 1115
(ScaleBarBitmap.__SetScale): Do scale
        adjustment here if the map projection uses degrees.


Revision 1241 - (view) (annotate) - [select for diffs]
Modified Thu Jun 19 09:25:53 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 21169 byte(s)
Diff to previous 1231 , to selected 1115
(LegendTree.__init__): Instance variable
	raiseProperties initialized to prevent endless loops
(LegendTree._OnItemActivated): Depending on self.raiseProperties
	simply raise the properties or open the dialog and issue a second
	event.


Revision 1231 - (view) (annotate) - [select for diffs]
Modified Wed Jun 18 14:46:57 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 20524 byte(s)
Diff to previous 1211 , to selected 1115
(ScaleBarBitmap.__SetScale): Check if
        the map is None which may be the case if none has been loaded yet.


Revision 1211 - (view) (annotate) - [select for diffs]
Modified Mon Jun 16 12:27:52 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 20478 byte(s)
Diff to previous 1180 , to selected 1115
(LegendTree.__init__): Add instance variable
        preventExpandCollapse and subscribe to expanding and collapsing
        events.
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and
        collapsing events and will veto the event if it has been triggered
        by the user double clicking on a layer.
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
        that an expanding/collapsing event should be vetoed.


Revision 1180 - (view) (annotate) - [select for diffs]
Modified Thu Jun 12 16:28:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 20074 byte(s)
Diff to previous 1129 , to selected 1115
(ScaleBarBitmap.__SetScale): Don't draw
        the scalebar if the current map has no projection set.


Revision 1129 - (view) (annotate) - [select for diffs]
Modified Wed Jun 4 18:36:52 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 20019 byte(s)
Diff to previous 1119 , to selected 1115
(LegendTree.__init__): Remove instance
variable layer2id
(LegendTree.find_layer): New method to do with brute force what
layer2id tried to accomplish
(LegendTree._OnMsgLayerChanged)
(LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
Use find_layer instead of layer2id
(LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
update layer2id anymore
(LegendTree._OnMsgMapLayersRemoved)
(LegendTree._OnMsgMapLayersAdded): Get by without layer2id.


Revision 1119 - (view) (annotate) - [select for diffs]
Modified Mon Jun 2 10:37:59 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 19362 byte(s)
Diff to previous 1115
(LegendTree._OnMsgMapLayersRemoved): It's
possible that a layer is removed that is not currently selected in
the legend so don't check for this.


Revision 1115 - (view) (annotate) - [selected]
Modified Fri May 30 16:30:26 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 19510 byte(s)
Diff to previous 1113
(LegendTree.GetRootItem): Reset
availImgListIndices when a new image list is created


Revision 1113 - (view) (annotate) - [select for diffs]
Modified Fri May 30 15:59:49 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 19708 byte(s)
Diff to previous 1102 , to selected 1115
(LegendTree.__init__): New instance variable
changing_selection to indicate whether the LegendTree code itself
is currently changing the selection
(LegendTree.normalize_selection): New method to normalize the
selection by selecting the layer item even if the user clicked on
the classification.
(LegendTree._OnSelChanged): normalize the selection. This works
around a bug in wx which doesn't keep track of the selection
properly when subtrees are deleted.


Revision 1102 - (view) (annotate) - [select for diffs]
Modified Fri May 30 06:29:05 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 18647 byte(s)
Diff to previous 1063 , to selected 1115
The legend was cleared and repopulated any
        time something changed which caused some state to be lost such
        as which children were expanded or collapsed. Fixes RTBug #1901.
(LegendTree._OnMsgMapLayersAdded): Add only new layers.
(LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
        the legend but not in the map.
(LegendTree.__FillTree): Move main functionality out into smaller
        methods that can be used by other methods.
(LegendTree.__FillTreeLayer): Reuse old slots in the image list
        if they are available.
(LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
        that we override the wxTreeCtrl method. Iterate over children
        and call __RemoveLayer.
(LegendTree.__AddLayer): New. Add a new layer to the legend.
(LegendTree.__RemoveLayer): Remove a layer from the legend.
(LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
        Should only be called with the id of a layer branch.
(LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
        Returns the root item or creates one if necessary.


Revision 1063 - (view) (annotate) - [select for diffs]
Modified Tue May 27 14:08:28 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 16877 byte(s)
Diff to previous 1050 , to selected 1115
(LegendTree.__FillTree): Use 'legend_icon_layer'


Revision 1050 - (view) (annotate) - [select for diffs]
Modified Tue May 27 09:31:13 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 16875 byte(s)
Diff to previous 990 , to selected 1115
BMP_SIZE_W = 15
(LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
(LegendTree.__FillTreeLayer): Explicitely set SelectedImage.


Revision 990 - (view) (annotate) - [select for diffs]
Modified Thu May 22 16:51:24 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 16446 byte(s)
Diff to previous 980 , to selected 1115
(LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
	bound to tool events.
(LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
	New, methods binding the event methods with the map methods.


Revision 980 - (view) (annotate) - [select for diffs]
Modified Thu May 22 11:41:14 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 15157 byte(s)
Diff to previous 936 , to selected 1115
(LegendTree.__SetVisibilityStyle): Only gray out
	the text if not visible. The italic font sometimes exceeds the
	rendering area.


Revision 936 - (view) (annotate) - [select for diffs]
Modified Tue May 20 15:24:32 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 15120 byte(s)
Diff to previous 914 , to selected 1115
Change all checks that a layer is an
        instance of Layer into checks against BaseLayer.
(LegendTree.__FillTreeLayer): Only add children to a branch if
        the layer supports classification.


Revision 914 - (view) (annotate) - [select for diffs]
Modified Fri May 16 16:25:41 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 15001 byte(s)
Diff to previous 882 , to selected 1115
(ScalebarBitmap.__SetScale): Update to extended scalebar.DrawScalebar header.


Revision 882 - (view) (annotate) - [select for diffs]
Modified Fri May 9 16:34:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 14927 byte(s)
Diff to previous 864 , to selected 1115
Explicit imports.


Revision 864 - (view) (annotate) - [select for diffs]
Modified Thu May 8 12:29:23 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 14790 byte(s)
Diff to previous 858 , to selected 1115
Import Thuban.UI.scalebar


Revision 858 - (view) (annotate) - [select for diffs]
Modified Thu May 8 10:30:17 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 14793 byte(s)
Diff to previous 854 , to selected 1115
Initialize ScaleBar with canvas.map


Revision 854 - (view) (annotate) - [select for diffs]
Modified Wed May 7 18:24:13 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 14786 byte(s)
Diff to previous 795 , to selected 1115
(LegendPanel): Added scalebar bitmap
(ScaleBarBitmap): New, links the scalebar bitmap with view messages
and the renderer.


Revision 795 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 17:01:06 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13128 byte(s)
Diff to previous 668 , to selected 1115
(LegendTree.MoveCurrentItemUp,
        LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
        groups are selected, move the layer up/down. Fixes RTbug #1833.


Revision 668 - (view) (annotate) - [select for diffs]
Modified Mon Apr 14 17:12:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13634 byte(s)
Diff to previous 665 , to selected 1115
(LegendPanel.__init__): The toolbar should be allowed to grow within the sizer.
        Fixes a bug under Windows where the toolbar wasn't being drawn.


Revision 665 - (view) (annotate) - [select for diffs]
Modified Mon Apr 14 16:35:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13662 byte(s)
Diff to previous 658 , to selected 1115
remove print statement


Revision 658 - (view) (annotate) - [select for diffs]
Modified Mon Apr 14 14:06:30 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13703 byte(s)
Diff to previous 655 , to selected 1115
Call Create() at the end of __init__.


Revision 655 - (view) (annotate) - [select for diffs]
Modified Fri Apr 11 15:50:13 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13582 byte(s)
Diff to previous 652 , to selected 1115
Enable/disable the legend buttons when the legend changes. Fixes RTbug #1793.


Revision 652 - (view) (annotate) - [select for diffs]
Modified Fri Apr 11 14:28:08 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13328 byte(s)
Diff to previous 639 , to selected 1115
Use new bitmaps for the control buttons.
(LegendTree._OnMsgLayerTitleChanged): Change the displayed title
        if the layer's title changes.


Revision 639 - (view) (annotate) - [select for diffs]
Modified Thu Apr 10 14:35:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 12620 byte(s)
Diff to previous 632 , to selected 1115
Classify button is now called "Properties".
Refactored the code to change variable names.
(LegendTree.__FillTreeLayer): Only list a group if it is visible.


Revision 632 - (view) (annotate) - [select for diffs]
Modified Wed Apr 9 10:10:53 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 12990 byte(s)
Diff to previous 605 , to selected 1115
(LegendTree): Use a private method to
        consistently set the font and style of the text. Fixes RTbug #1786.


Revision 605 - (view) (annotate) - [select for diffs]
Modified Fri Apr 4 12:16:13 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 12997 byte(s)
Diff to previous 578 , to selected 1115
Fix assert calls.


Revision 578 - (view) (annotate) - [select for diffs]
Modified Mon Mar 31 18:31:46 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 13013 byte(s)
Diff to previous 572 , to selected 1115
(LegendPanel.Destroy): New. Cleans up
        when then window is told to close.
(LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
        comment in source for more info.


Revision 572 - (view) (annotate) - [select for diffs]
Modified Fri Mar 28 17:06:50 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 12591 byte(s)
Diff to previous 568 , to selected 1115
Modifications to support selecting a
        specific group in the classification dialog. Changed how layers
        are drawn when the layer is visible/invisible.


Revision 568 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 11:51:28 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 10421 byte(s)
Diff to previous 562 , to selected 1115
Removed unnecessary LegendDialog class.
(LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
        now part of DockableWindow.
(LegendPanel.DoOnSelChanged): Select the current layer in the map.
(LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
        with the selected layer and/or group.


Revision 562 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 11:06:22 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 11224 byte(s)
Diff to previous 542 , to selected 1115
Added some more buttons and made the LegendPanel a DockPanel.


Revision 542 - (view) (annotate) - [select for diffs]
Added Thu Mar 20 09:43:16 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/legend.py
File length: 9372 byte(s)
Diff to selected 1115
New. Creates a window that shows the map's
        Legend information and allows the user to add/modify classifications
        and how the layers are drawn on the map.


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