12 |
from wxPython.wx import * |
from wxPython.wx import * |
13 |
from wxPython.grid import * |
from wxPython.grid import * |
14 |
|
|
15 |
|
from Thuban import _ |
16 |
|
|
17 |
ID_PROPERTY_SELECT = 4010 |
ID_PROPERTY_SELECT = 4010 |
18 |
ID_CLASS_TABLE = 40011 |
ID_CLASS_TABLE = 40011 |
19 |
|
|
23 |
class Classifier(wxDialog): |
class Classifier(wxDialog): |
24 |
|
|
25 |
def __init__(self, parent, layer): |
def __init__(self, parent, layer): |
26 |
wxDialog.__init__(self, parent, -1, "Classify", |
wxDialog.__init__(self, parent, -1, _("Classify"), |
27 |
style = wxRESIZE_BORDER) |
style = wxRESIZE_BORDER) |
28 |
|
|
29 |
topBox = wxBoxSizer(wxVERTICAL) |
topBox = wxBoxSizer(wxVERTICAL) |
30 |
|
|
31 |
propertyBox = wxBoxSizer(wxHORIZONTAL) |
propertyBox = wxBoxSizer(wxHORIZONTAL) |
32 |
propertyBox.Add(wxStaticText(self, -1, "Property"), |
propertyBox.Add(wxStaticText(self, -1, _("Property")), |
33 |
0, wxALIGN_CENTER | wxALL, 4) |
0, wxALIGN_CENTER | wxALL, 4) |
34 |
|
|
35 |
self.properties = wxComboBox(self, ID_PROPERTY_SELECT, "", |
self.properties = wxComboBox(self, ID_PROPERTY_SELECT, "", |
56 |
self.classTable.SetTable(table, true) |
self.classTable.SetTable(table, true) |
57 |
#table.SetNumberRows(10) |
#table.SetNumberRows(10) |
58 |
#table.SetNumberCols(2) |
#table.SetNumberCols(2) |
59 |
table.SetColLabelValue(0, "Class") |
table.SetColLabelValue(0, _("Class")) |
60 |
table.SetColLabelValue(1, "Value") |
table.SetColLabelValue(1, _("Value")) |
61 |
#self.classTable.SetColLabelValue(0, "Class") |
#self.classTable.SetColLabelValue(0, _("Class")) |
62 |
#self.classTable.SetColLabelValue(1, "Value") |
#self.classTable.SetColLabelValue(1, _("Value")) |
63 |
#self.classTable.SetCellValue(1, 1, "Value") |
#self.classTable.SetCellValue(1, 1, _("Value")) |
64 |
|
|
65 |
tableBox.Add(self.classTable, 0, wxALL, 4) |
tableBox.Add(self.classTable, 0, wxALL, 4) |
66 |
|
|
70 |
# Control buttons: |
# Control buttons: |
71 |
# |
# |
72 |
buttonBox = wxBoxSizer(wxHORIZONTAL) |
buttonBox = wxBoxSizer(wxHORIZONTAL) |
73 |
buttonBox.Add(wxButton(self, ID_CLASSIFY_OK, "OK"), |
buttonBox.Add(wxButton(self, ID_CLASSIFY_OK, _("OK")), |
74 |
0, wxALL, 4) |
0, wxALL, 4) |
75 |
buttonBox.Add(wxButton(self, ID_CLASSIFY_CANCEL, "Cancel"), |
buttonBox.Add(wxButton(self, ID_CLASSIFY_CANCEL, _("Cancel")), |
76 |
0, wxALL, 4) |
0, wxALL, 4) |
77 |
topBox.Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 10) |
topBox.Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_BOTTOM, 10) |
78 |
|
|