/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/classgen.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/classgen.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 877 by jonathan, Fri May 9 16:32:17 2003 UTC revision 907 by bh, Fri May 16 15:01:04 2003 UTC
# Line 11  from Thuban import _ Line 11  from Thuban import _
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
# Line 200  class ClassGenDialog(wxDialog): Line 198  class ClassGenDialog(wxDialog):
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    
# Line 818  class GenQuantilesPanel(wxPanel): Line 816  class GenQuantilesPanel(wxPanel):
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    

Legend:
Removed from v.877  
changed lines
  Added in v.907

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26