85 |
self.shapeType = shapeType |
self.shapeType = shapeType |
86 |
table = self.GetTable() |
table = self.GetTable() |
87 |
if table is None: |
if table is None: |
88 |
|
w = self.GetDefaultColSize() * 3 + self.GetDefaultRowLabelSize() |
89 |
|
h = self.GetDefaultRowSize() * 4 + self.GetDefaultColLabelSize() |
90 |
|
self.SetDimensions(-1, -1, w, h) |
91 |
|
self.SetSizeHints(w, h, -1, -1) |
92 |
self.SetTable(ClassTable(clazz, self.shapeType, self), true) |
self.SetTable(ClassTable(clazz, self.shapeType, self), true) |
93 |
else: |
else: |
94 |
table.Reset(clazz, self.shapeType) |
table.Reset(clazz, self.shapeType) |
283 |
|
|
284 |
self.__NotifyRowChanges(old_len, len(self.tdata)) |
self.__NotifyRowChanges(old_len, len(self.tdata)) |
285 |
|
|
|
view = self.GetView() |
|
|
w = view.GetDefaultColSize() * 3 + view.GetDefaultRowLabelSize() |
|
|
h = view.GetDefaultRowSize() * 4 + view.GetDefaultColLabelSize() |
|
|
view.SetDimensions(-1, -1, w, h) |
|
|
view.SetSizeHints(w, h, -1, -1) |
|
286 |
|
|
287 |
self.GetView().EndBatch() |
self.GetView().EndBatch() |
288 |
|
|
628 |
# |
# |
629 |
|
|
630 |
self.fieldTypeText = wxStaticText(self, -1, "") |
self.fieldTypeText = wxStaticText(self, -1, "") |
631 |
self.__SetFieldTypeText(self.__cur_field) |
topBox.Add(self.fieldTypeText, 0, wxGROW | wxALIGN_LEFT | wxALL, 4) |
|
|
|
|
topBox.Add(self.fieldTypeText, 0, wxALIGN_LEFT | wxALL, 4) |
|
|
#self.fieldTypeText.SetLabel("asdfadsfs") |
|
632 |
|
|
633 |
propertyBox = wxBoxSizer(wxHORIZONTAL) |
propertyBox = wxBoxSizer(wxHORIZONTAL) |
634 |
propertyBox.Add(wxStaticText(self, -1, _("Field: ")), |
propertyBox.Add(wxStaticText(self, -1, _("Field: ")), |
635 |
0, wxALIGN_CENTER | wxALL, 4) |
0, wxALIGN_LEFT | wxALL, 4) |
636 |
propertyBox.Add(self.fields, 1, wxGROW|wxALL, 4) |
propertyBox.Add(self.fields, 1, wxGROW|wxALL, 4) |
637 |
EVT_COMBOBOX(self, ID_PROPERTY_SELECT, self._OnFieldSelect) |
EVT_COMBOBOX(self, ID_PROPERTY_SELECT, self._OnFieldSelect) |
638 |
|
|
755 |
|
|
756 |
|
|
757 |
|
|
758 |
type2string = {None: "None", |
type2string = {None: _("None"), |
759 |
FIELDTYPE_STRING: "Text", |
FIELDTYPE_STRING: _("Text"), |
760 |
FIELDTYPE_INT: "Integer", |
FIELDTYPE_INT: _("Integer"), |
761 |
FIELDTYPE_DOUBLE: "Decimal"} |
FIELDTYPE_DOUBLE: _("Decimal")} |
762 |
|
|
763 |
def __SetFieldTypeText(self, fieldIndex): |
def __SetFieldTypeText(self, fieldIndex): |
764 |
fieldName = self.fields.GetString(fieldIndex) |
fieldName = self.fields.GetString(fieldIndex) |
869 |
|
|
870 |
def __init__(self, parent, prop, shapeType): |
def __init__(self, parent, prop, shapeType): |
871 |
wxDialog.__init__(self, parent, -1, _("Select Properties"), |
wxDialog.__init__(self, parent, -1, _("Select Properties"), |
872 |
style = wxRESIZE_BORDER) |
style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) |
873 |
|
|
874 |
self.prop = ClassGroupProperties(prop) |
self.prop = ClassGroupProperties(prop) |
875 |
|
|
892 |
|
|
893 |
lineColorBox = wxBoxSizer(wxHORIZONTAL) |
lineColorBox = wxBoxSizer(wxHORIZONTAL) |
894 |
lineColorBox.Add( |
lineColorBox.Add( |
895 |
wxButton(self, ID_SELPROP_STROKECLR, "Change Line Color"), |
wxButton(self, ID_SELPROP_STROKECLR, _("Change Line Color")), |
896 |
1, wxALL | wxGROW, 4) |
1, wxALL | wxGROW, 4) |
897 |
EVT_BUTTON(self, ID_SELPROP_STROKECLR, self._OnChangeLineColor) |
EVT_BUTTON(self, ID_SELPROP_STROKECLR, self._OnChangeLineColor) |
898 |
|
|
899 |
lineColorBox.Add( |
lineColorBox.Add( |
900 |
wxButton(self, ID_SELPROP_STROKECLRTRANS, "Transparent"), |
wxButton(self, ID_SELPROP_STROKECLRTRANS, _("Transparent")), |
901 |
1, wxALL | wxGROW, 4) |
1, wxALL | wxGROW, 4) |
902 |
EVT_BUTTON(self, ID_SELPROP_STROKECLRTRANS, |
EVT_BUTTON(self, ID_SELPROP_STROKECLRTRANS, |
903 |
self._OnChangeLineColorTrans) |
self._OnChangeLineColorTrans) |
908 |
if shapeType != SHAPETYPE_ARC: |
if shapeType != SHAPETYPE_ARC: |
909 |
fillColorBox = wxBoxSizer(wxHORIZONTAL) |
fillColorBox = wxBoxSizer(wxHORIZONTAL) |
910 |
fillColorBox.Add( |
fillColorBox.Add( |
911 |
wxButton(self, ID_SELPROP_FILLCLR, "Change Fill Color"), |
wxButton(self, ID_SELPROP_FILLCLR, _("Change Fill Color")), |
912 |
1, wxALL | wxGROW, 4) |
1, wxALL | wxGROW, 4) |
913 |
EVT_BUTTON(self, ID_SELPROP_FILLCLR, self._OnChangeFillColor) |
EVT_BUTTON(self, ID_SELPROP_FILLCLR, self._OnChangeFillColor) |
914 |
fillColorBox.Add( |
fillColorBox.Add( |
915 |
wxButton(self, ID_SELPROP_FILLCLRTRANS, "Transparent"), |
wxButton(self, ID_SELPROP_FILLCLRTRANS, _("Transparent")), |
916 |
1, wxALL | wxGROW, 4) |
1, wxALL | wxGROW, 4) |
917 |
EVT_BUTTON(self, ID_SELPROP_FILLCLRTRANS, |
EVT_BUTTON(self, ID_SELPROP_FILLCLRTRANS, |
918 |
self._OnChangeFillColorTrans) |
self._OnChangeFillColorTrans) |