Parent Directory
|
Revision Log
Sticky Revision: |
made a copy
New Classification "Pattern": Classify text attributes by regexp.
(Classification.TreeItem.build_info): Added output of size.
Removed some trailing whitespaces. (ClassGroupProperties.__init__): Set default size. (ClassGroupProperties.SetProperties): Set the size. (ClassGroupProperties.GetSize): New. Return the size. (ClassGroupProperties.SetSize): New. Set the size. (ClassGroupProperties__eq__): Compare also size. (ClassGroupProperties__repr__): Print also size.
(Classification.__getattr__) (Classification._compile_classification) (Classification._clear_compiled_classification): New. Methods to manage a 'compiled' representation of the classification groups which is created on demand (Classification.InsertGroup, Classification.RemoveGroup) (Classification.ReplaceGroup): reset the compiled representation (Classification.FindGroup): Use the compiled representation to find the matching group (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
(Classification.SetDefaultGroup): Send a CLASS_CHANGED message (Classification.RemoveGroup): Send a CLASS_CHANGED message and do not return the removed group since it wasn't used.
Use new CLASS_CHANGED message. (Classification): Inherit from Publisher. (Classification.__init__): Remove the layer parameter. Classifications no longer need to have a parent layer. (Classification.GetField, Classification.GetFieldType, Classification.SetFieldInfo): Removed. The field name is stored in the layer, and the type can be retreived by calling Layer.GetFieldType(). (Classification._set_layer, Classification.GetLayer): Removed. Classifications no longer have a parent layer.
(ClassGroupRange.__init__): Consolidate the min/max parameters into a single _range which can either be a tuple or a Range object. (ClassGroupRange.SetRange): Consolidate the min/max parameters into a single _range which can either be a tuple or a Range object.
(Classificatio.__init__): Remove unused lock variable.
Fixes RTbug #1973, 1971. (Classification.SetField, Classification.SetFieldType): Replaced with SetFieldInfo. (Classification.SetFieldInfo): New. Does a better job of what SetField and SetFieldType used to do by combining their function since they should really always be done at the same time. (Classification.SetLayer): Renamed to _set_layer. (Classification._set_layer): Should only be called from Layer's SetClassification. This does not cause a recursive call as SetLayer did because we know that Layer knows about the classification.
Remove "from __future__" import statement since python 2.2 is the earliest supported version.
Removed assert statements that tested if the variable was an instance of Color.
(ClassGroupRange.SetRange): Use new Range ___init__ to pass floats.
Explicit imports. (ClassGroupRange): Use the Range class to store the underlying range information. The interface remains the same, except for GetRange(), and you can also supply a Range object as the min parameter to SetRange or __init__.
Use repr() around values in the ClassGroup*.__repr__() methods so it is clearer when a value is a string and when it is a number.
Implemented __repr__ for the ClassGroup* classes to make debugging a bit easier. (ClassGroup.SetLabel): Check that the string is an instance of StringTypes not StringType. Accounts for Unicode strings.
fix missed renaming
(ClassGroupProperties): Make instance variables private and optimize comparison operator by first checking if the color references are the same. (ClassGroupSingleton): Make instance variables private. (ClassGroupRange): Make instance variables private.
(ClassGroupRange.__init__): Should pass group to ClassGroup constructor.
(ClassGroup): Move all the common methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__) here. Implement SetVisible(), IsVisible(). (ClassGroup.__init__): Add group parameter which acts as a copy constructor.
(Classification.__deepcopy__): Need to copy over field and fieldType attributes.
(Classification.AppendGroup, Classification.InsertGroup, Classification.ReplaceGroup, Classification.RemoveGroup, Classification.GetGroup): Do as the names imply. (Classification.FindGroup): This was called GetGroup, but GetGroup takes an index, while FindGroup takes a value. (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER REFERENCE. Currently there is a cyclic reference between the layer and its classification. If the classification doesn't need to know its owning layer we can change this, since it may make sense to be able to use the same classification with different layers.
Rename Color.None to Color.Transparent. (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill): Don't bother copying the color, since Colors are immutable.
Fix assert calls. (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill): Copy the color parameter rather than hold onto a reference.
(ClassGroup.GetDisplayText): New. Returns a string which is appropriately describes the group.
This comment is really for layer.py, but the motive was the same for classification.py: Handle the cyclic references between a layer and its classification better, and be sure to disconnect the classification from the layer when the layer is destroyed so that we don't maintain a cyclic reference that may not be garbage collected.
(Classification): Don't use layer's message function directly, use the ClassChanged() method when then classification changes. SetField/SetFieldType/SetLayer must keep the information about field name and field type in sync when an owning layer is set or removed.
Implemented __copy__ and __deepcopy__ for ClassGroup* and ClassGroupProperites so they can easily be copied by the classifier dialog. (ClassGroupProperites.__init__): The default line color should have been Color.Black.
Minor documentation changes, Addition of __eq__ and __ne__ methods. (Classification.SetLayer): prevent recursion between this method and Layer.SetClassification().
Class documentation. Renaming of methods with Stroke to Line. Groups are stored in a single list with the default as the first element. Groups are searched in the order they appear in the list.
Remove unnecessary wxPython import
(ClassGroupRange.GetProperties): Parameter 'value' should default to None.
Changed the class hierarchy so that a Classification consists of Groups which return Properties when a value matches a Group.
(Classification): Renamed GetProperties() to GetClassData(). Used the new iterator in TreeInfo(). (ClassIterator): Iterator implementation to iterate over the ClassData objects in a classification object.
(Classification): Uses the new ClassData* classes. Modification messages are passed up to the parent layer (if it exists). (ClassData): New class to encapsulate the common data in each classification property. (ClassDataDefault): Represents the Default class. data. (ClassDataPoint): Represents a single class. data point (ClassDataRange): Represents a class. range (ClassDataMap): Represents a class. map (unused).
* Thuban/Model/classification.py: Added import line to fix feature conflicts between running on python2.2 and python2.1.
* Thuban/Model/classification.py (Classificaton): Added set and get methods for the default data. The class also takes a layer reference so that modification messages can be sent. Fixed the methods to use the new ClassData class. (ClassData): New class to encapsulate the classification data
Added getNull() to return the NullData reference
New function TreeInfo to add information about the classification into the tree view.
fixed merging conflict
Replace user string by _() for i18n.
Encapsulates classification information for a layer
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |