33 |
from Thuban.Model.data import SHAPETYPE_ARC, SHAPETYPE_POLYGON, SHAPETYPE_POINT |
from Thuban.Model.data import SHAPETYPE_ARC, SHAPETYPE_POLYGON, SHAPETYPE_POINT |
34 |
|
|
35 |
from Thuban.UI.classgen import ClassGenDialog |
from Thuban.UI.classgen import ClassGenDialog |
36 |
|
from Thuban.UI.colordialog import ColorDialog |
37 |
|
|
38 |
from dialogs import NonModalNonParentDialog |
from dialogs import NonModalNonParentDialog |
39 |
from messages import MAP_REPLACED |
from messages import MAP_REPLACED |
685 |
FIELDTYPE_INT: _("Integer"), |
FIELDTYPE_INT: _("Integer"), |
686 |
FIELDTYPE_DOUBLE: _("Decimal")} |
FIELDTYPE_DOUBLE: _("Decimal")} |
687 |
|
|
688 |
def __init__(self, parent, name, map, layer, group = None): |
def __init__(self, parent, name, layer, group = None): |
689 |
"""Create a Properties/Classification dialog for a layer. |
"""Create a Properties/Classification dialog for a layer. |
690 |
The layer is part of map. If group is not None, select that |
The layer is part of map. If group is not None, select that |
691 |
group in the classification table. |
group in the classification table. |
697 |
|
|
698 |
self.parent.Subscribe(MAP_REPLACED, self.map_replaced) |
self.parent.Subscribe(MAP_REPLACED, self.map_replaced) |
699 |
self.layer = layer |
self.layer = layer |
700 |
self.map = map |
self.map = parent.Map() |
701 |
|
|
702 |
self.map.Subscribe(MAP_LAYERS_REMOVED, self.map_layers_removed) |
self.map.Subscribe(MAP_LAYERS_REMOVED, self.map_layers_removed) |
703 |
self.layer.Subscribe(LAYER_SHAPESTORE_REPLACED, |
self.layer.Subscribe(LAYER_SHAPESTORE_REPLACED, |
1286 |
self.previewWin.Refresh() |
self.previewWin.Refresh() |
1287 |
|
|
1288 |
def __GetColor(self, cur): |
def __GetColor(self, cur): |
1289 |
dialog = wxColourDialog(self) |
dialog = ColorDialog(self) |
1290 |
if cur is not Transparent: |
dialog.SetColor(cur) |
|
dialog.GetColourData().SetColour(Color2wxColour(cur)) |
|
1291 |
|
|
1292 |
ret = None |
ret = None |
1293 |
if dialog.ShowModal() == wxID_OK: |
if dialog.ShowModal() == wxID_OK: |
1294 |
ret = wxColour2Color(dialog.GetColourData().GetColour()) |
ret = dialog.GetColor() |
1295 |
|
|
1296 |
dialog.Destroy() |
dialog.Destroy() |
1297 |
|
|
1510 |
|
|
1511 |
def _OnLeftDClick(self, event): |
def _OnLeftDClick(self, event): |
1512 |
self.DoEdit() |
self.DoEdit() |
1513 |
|
|
1514 |
|
from Thuban.UI.mainwindow import layer_properties_dialogs |
1515 |
|
layer_properties_dialogs.add(Layer, Classifier) |
1516 |
|
layer_properties_dialogs.add(RasterLayer, Classifier) |