25 |
from wx import grid |
from wx import grid |
26 |
|
|
27 |
from Thuban import _ |
from Thuban import _ |
28 |
|
from Thuban.UI import internal_from_wxstring |
29 |
from Thuban.UI.common import Color2wxColour, wxColour2Color |
from Thuban.UI.common import Color2wxColour, wxColour2Color |
30 |
|
|
31 |
from Thuban.Model.messages import MAP_LAYERS_REMOVED, LAYER_SHAPESTORE_REPLACED |
from Thuban.Model.messages import MAP_LAYERS_REMOVED, LAYER_SHAPESTORE_REPLACED |
931 |
fieldName = None |
fieldName = None |
932 |
fieldType = None |
fieldType = None |
933 |
else: |
else: |
934 |
fieldName = self.fields.GetString(fieldIndex) |
fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex)) |
935 |
fieldType = self.layer.GetFieldType(fieldName) |
fieldType = self.layer.GetFieldType(fieldName) |
936 |
|
|
937 |
clazz = self.fields.GetClientData(fieldIndex) |
clazz = self.fields.GetClientData(fieldIndex) |
957 |
self.layer.GetClassification(). |
self.layer.GetClassification(). |
958 |
GetDefaultGroup().GetProperties())) |
GetDefaultGroup().GetProperties())) |
959 |
|
|
960 |
fieldName = self.fields.GetString(fieldIndex) |
fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex)) |
961 |
fieldType = self.layer.GetFieldType(fieldName) |
fieldType = self.layer.GetFieldType(fieldName) |
962 |
|
|
963 |
self.classGrid.CreateTable(clazz, fieldType, |
self.classGrid.CreateTable(clazz, fieldType, |
967 |
"""Set the field type string using the data type of the field |
"""Set the field type string using the data type of the field |
968 |
at fieldIndex. |
at fieldIndex. |
969 |
""" |
""" |
970 |
fieldName = self.fields.GetString(fieldIndex) |
fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex)) |
971 |
fieldType = self.layer.GetFieldType(fieldName) |
fieldType = self.layer.GetFieldType(fieldName) |
972 |
|
|
973 |
assert Classifier.type2string.has_key(fieldType) |
assert Classifier.type2string.has_key(fieldType) |
1054 |
"""Open up a dialog for the user to generate classifications.""" |
"""Open up a dialog for the user to generate classifications.""" |
1055 |
|
|
1056 |
self.genDlg = ClassGenDialog(self, self.layer, |
self.genDlg = ClassGenDialog(self, self.layer, |
1057 |
self.fields.GetString(self.__cur_field)) |
internal_from_wxstring(self.fields.GetString(self.__cur_field))) |
1058 |
|
|
1059 |
self.Bind(wx.EVT_CLOSE, self._OnGenDialogClose, self.genDlg) |
self.Bind(wx.EVT_CLOSE, self._OnGenDialogClose, self.genDlg) |
1060 |
|
|