1 |
# Copyright (c) 2003-2004 by Intevation GmbH |
# Copyright (c) 2003-2005 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Jan-Oliver Wagner <[email protected]> (2003-2004) |
# Jan-Oliver Wagner <[email protected]> (2003-2004) |
4 |
# Martin Schulze <[email protected]> (2004) |
# Martin Schulze <[email protected]> (2004) |
44 |
from Thuban.UI.layerproperties import LayerProperties |
from Thuban.UI.layerproperties import LayerProperties |
45 |
from messages import MAP_REPLACED |
from messages import MAP_REPLACED |
46 |
|
|
|
ID_CLASS_TABLE = 40011 |
|
|
|
|
47 |
|
|
48 |
# table columns |
# table columns |
49 |
COL_VISIBLE = 0 |
COL_VISIBLE = 0 |
73 |
clazz -- the working classification that this grid should |
clazz -- the working classification that this grid should |
74 |
use for display. |
use for display. |
75 |
""" |
""" |
76 |
|
wxGrid.__init__(self, parent, -1, style = 0) |
|
wxGrid.__init__(self, parent, ID_CLASS_TABLE, style = 0) |
|
77 |
|
|
78 |
self.classifier = classifier |
self.classifier = classifier |
79 |
|
|
158 |
group = self.GetTable().GetClassGroup(sel[0]) |
group = self.GetTable().GetClassGroup(sel[0]) |
159 |
if isinstance(group, ClassGroupDefault): |
if isinstance(group, ClassGroupDefault): |
160 |
wxMessageDialog(self, |
wxMessageDialog(self, |
161 |
"The Default group cannot be removed.", |
_("The Default group cannot be removed."), |
162 |
style = wxOK | wxICON_EXCLAMATION).ShowModal() |
style = wxOK | wxICON_EXCLAMATION).ShowModal() |
163 |
return |
return |
164 |
|
|
787 |
controlButtonBox.Add(button_moveup, 0, wxGROW|wxALL, 4) |
controlButtonBox.Add(button_moveup, 0, wxGROW|wxALL, 4) |
788 |
controlButtonBox.Add(button_movedown, 0, wxGROW|wxALL, 4) |
controlButtonBox.Add(button_movedown, 0, wxGROW|wxALL, 4) |
789 |
controlButtonBox.Add(button_edit, 0, wxGROW|wxALL, 4) |
controlButtonBox.Add(button_edit, 0, wxGROW|wxALL, 4) |
790 |
controlButtonBox.Add(60, 20, 0, wxGROW|wxALL|wxALIGN_BOTTOM, 4) |
controlButtonBox.Add( (60, 20), 0, wxGROW|wxALL|wxALIGN_BOTTOM, 4) |
791 |
controlButtonBox.Add(button_remove, 0, |
controlButtonBox.Add(button_remove, 0, |
792 |
wxGROW|wxALL|wxALIGN_BOTTOM, 4) |
wxGROW|wxALL|wxALIGN_BOTTOM, 4) |
793 |
|
|
1404 |
dc.DestroyClippingRegion() |
dc.DestroyClippingRegion() |
1405 |
|
|
1406 |
|
|
1407 |
class ClassGroupPropertiesCtrl(wxWindow, wxControl): |
class ClassGroupPropertiesCtrl(wxControl): |
1408 |
"""A custom window and control that draw a preview of group properties |
"""A custom window and control that draw a preview of group properties |
1409 |
and can open a dialog to modify the properties if the user double-clicks |
and can open a dialog to modify the properties if the user double-clicks |
1410 |
it. |
it. |
1412 |
|
|
1413 |
def __init__(self, parent, id, props, shapeType, |
def __init__(self, parent, id, props, shapeType, |
1414 |
size = wxDefaultSize, style = 0): |
size = wxDefaultSize, style = 0): |
1415 |
|
wxControl.__init__(self, parent, id, size = size, style = style) |
|
wxWindow.__init__(self, parent, id, size = size, style = style) |
|
1416 |
|
|
1417 |
self.parent = parent |
self.parent = parent |
1418 |
|
|