11 |
|
|
12 |
from wxPython.wx import * |
from wxPython.wx import * |
13 |
|
|
14 |
from Thuban.Model.classification import Classification, ClassGroupRange, \ |
from Thuban.Model.classification import ClassGroupProperties |
|
ClassGroupSingleton, ClassGroupProperties |
|
15 |
|
|
16 |
from Thuban.Model.table import Table, FIELDTYPE_INT, FIELDTYPE_DOUBLE, \ |
from Thuban.Model.table import FIELDTYPE_INT, FIELDTYPE_DOUBLE, \ |
17 |
FIELDTYPE_STRING |
FIELDTYPE_STRING |
18 |
|
|
|
from Thuban.Model.color import Color |
|
19 |
from Thuban.Model.range import Range |
from Thuban.Model.range import Range |
20 |
|
|
21 |
import classifier, resource |
import classifier, resource |
198 |
and max is not None \ |
and max is not None \ |
199 |
and numGroups is not None: |
and numGroups is not None: |
200 |
|
|
201 |
self.clazz = ClassGenerator().GenUnifromDistribution( |
self.clazz = ClassGenerator().GenUniformDistribution( |
202 |
min, max, numGroups, ramp, |
min, max, numGroups, ramp, |
203 |
self.type == FIELDTYPE_INT) |
self.type == FIELDTYPE_INT) |
204 |
|
|
816 |
|
|
817 |
def GetList(self): |
def GetList(self): |
818 |
|
|
819 |
|
_list = [] |
820 |
|
|
821 |
if self.layer.table is not None: |
if self.layer.table is not None: |
822 |
wxBeginBusyCursor() |
wxBeginBusyCursor() |
823 |
_list = self.layer.table.UniqueValues(self.fieldName) |
|
824 |
|
# |
825 |
|
# FIXME: Replace with a call to table when the method |
826 |
|
# has been written to get all the values |
827 |
|
# |
828 |
|
table = self.layer.table |
829 |
|
for i in range(table.NumRows()): |
830 |
|
_list.append(table.ReadValue(i, self.fieldName)) |
831 |
|
|
832 |
wxEndBusyCursor() |
wxEndBusyCursor() |
|
return _list |
|
833 |
|
|
834 |
return [] |
return _list |
835 |
|
|
836 |
def OnRangeText(self, event): |
def OnRangeText(self, event): |
837 |
|
|