88 |
psizer.Add(wxStaticText(self, -1, _("Generate:")), |
psizer.Add(wxStaticText(self, -1, _("Generate:")), |
89 |
0, wxALIGN_CENTER_VERTICAL, 0) |
0, wxALIGN_CENTER_VERTICAL, 0) |
90 |
|
|
91 |
self.genCombo = wxComboBox(self, |
self.genChoice = wxChoice(self, ID_CLASSGEN_GENCOMBO) |
92 |
ID_CLASSGEN_GENCOMBO, |
psizer.Add(self.genChoice, 1, wxALL | wxGROW, 4) |
93 |
"", style = wxCB_READONLY) |
EVT_CHOICE(self, ID_CLASSGEN_GENCOMBO, self._OnGenTypeSelect) |
|
psizer.Add(self.genCombo, 1, wxALL | wxGROW, 4) |
|
|
EVT_COMBOBOX(self, ID_CLASSGEN_GENCOMBO, self._OnGenTypeSelect) |
|
94 |
|
|
95 |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
96 |
|
|
99 |
self.genPanel = None |
self.genPanel = None |
100 |
|
|
101 |
panel = GenUniquePanel(self, layer, fieldName, self.type) |
panel = GenUniquePanel(self, layer, fieldName, self.type) |
102 |
self.genCombo.Append(GENCOMBOSTR_UNIQUE, panel) |
self.genChoice.Append(GENCOMBOSTR_UNIQUE, panel) |
103 |
sizer.Add(panel, 1, wxGROW | wxALL, 4) |
sizer.Add(panel, 1, wxGROW | wxALL, 4) |
104 |
|
|
105 |
self.genPanel = panel |
self.genPanel = panel |
106 |
|
|
107 |
if self.type in (FIELDTYPE_INT, FIELDTYPE_DOUBLE): |
if self.type in (FIELDTYPE_INT, FIELDTYPE_DOUBLE): |
108 |
panel = GenUniformPanel(self, layer, fieldName, self.type) |
panel = GenUniformPanel(self, layer, fieldName, self.type) |
109 |
self.genCombo.Append(GENCOMBOSTR_UNIFORM, panel) |
self.genChoice.Append(GENCOMBOSTR_UNIFORM, panel) |
110 |
sizer.Add(panel, 1, wxGROW | wxALL, 4) |
sizer.Add(panel, 1, wxGROW | wxALL, 4) |
111 |
sizer.Show(panel, False) |
sizer.Show(panel, False) |
112 |
|
|
113 |
self.genCombo.SetSelection(0) |
self.genChoice.SetSelection(0) |
114 |
|
|
115 |
############# |
############# |
116 |
|
|
118 |
psizer.Add(wxStaticText(self, -1, _("Color Scheme:")), |
psizer.Add(wxStaticText(self, -1, _("Color Scheme:")), |
119 |
0, wxALIGN_CENTER_VERTICAL, 0) |
0, wxALIGN_CENTER_VERTICAL, 0) |
120 |
|
|
121 |
self.propCombo = wxComboBox(self, |
self.propCombo = wxChoice(self, ID_CLASSGEN_PROPCOMBO) |
|
ID_CLASSGEN_PROPCOMBO, |
|
|
"", style = wxCB_READONLY) |
|
122 |
psizer.Add(self.propCombo, 1, wxALL | wxGROW, 4) |
psizer.Add(self.propCombo, 1, wxALL | wxGROW, 4) |
123 |
EVT_COMBOBOX(self, ID_CLASSGEN_PROPCOMBO, self._OnPropTypeSelect) |
EVT_CHOICE(self, ID_CLASSGEN_PROPCOMBO, self._OnPropTypeSelect) |
124 |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
sizer.Add(psizer, 0, wxALL | wxGROW, 4) |
125 |
|
|
126 |
############# |
############# |
163 |
|
|
164 |
def _OnGenerate(self, event): |
def _OnGenerate(self, event): |
165 |
|
|
166 |
index = self.genCombo.GetSelection() |
index = self.genChoice.GetSelection() |
167 |
|
|
168 |
genSel = self.genCombo.GetString(index) |
genSel = self.genChoice.GetString(index) |
169 |
genPanel = self.genCombo.GetClientData(index) |
genPanel = self.genChoice.GetClientData(index) |
170 |
|
|
171 |
propPanel = self.propPanel |
propPanel = self.propPanel |
172 |
|
|