30 #include "../core/ContextItem.h"
31 #include "../../geometry/Envelope.h"
32 #include "../../color/RGBAColor.h"
33 #include "../../maptools/Canvas.h"
34 #include "../core/enum/Enums.h"
38 m_currentPointType(0),
55 delete m_enumPointType;
64 Property pro_pointName = pointProperty();
65 if(!pro_pointName.
isNull())
67 m_properties->addProperty(pro_pointName);
81 if(!pro_pointName.
isNull())
84 EnumType* enumType = m_enumPointType->searchLabel(label);
87 m_currentPointType = enumType;
94 return m_enumPointType;
99 return m_currentPointType;
106 if(!m_currentPointType)
107 return pro_pointName;
112 return pro_pointName;
114 pro_pointName.
setName(
"point_type");
115 pro_pointName.
setLabel(
"graphic type");
123 for(
int i = 0 ; i < m_enumPointType->size() ; ++i)
125 EnumType* enumType = m_enumPointType->getEnum(i);
127 if(enumType == m_enumPointType->getNoneType() || enumType == m_currentPointType)
135 return pro_pointName;
150 m_pointColor = color;
virtual EnumType * getCircleType() const
Returns value that represents circle type belonging to enumeration.
Class that represents a "Model" part of Point MVC component. Its coordinate system is the same of sce...
virtual EnumDataType * getEnumDataType()
Returns data type enumeration.
te::color::RGBAColor m_pointColor
void addOption(Variant variant)
Class to represent a scale point enumeration. Ex.: X, square, circle, etc.
std::string getLabel()
Returns label.
virtual EnumType * getCurrentPointType()
bool isNull()
Returns true if no value has been set, false otherwise.
virtual void updateProperties(te::layout::Properties *properties)
Reimplemented from Observable.
virtual te::color::RGBAColor getPointColor()
Variant getOptionByCurrentChoice()
EnumPointType * m_enumPointType
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
EnumType * m_type
type of the MVC component
virtual void updateProperties(te::layout::Properties *properties)
Reimplemented from Observable.
virtual Property pointProperty() const
virtual EnumPointType * getEnumPointType()
static Enums & getInstance()
It returns a reference to the singleton instance.
An Envelope defines a 2D rectangular region.
Class to represent a data type enumeration. Ex.: int, double, bool, te::color::RGBAColor (color)...
te::gm::Envelope m_box
bounding rectangle
Class acts like a union for some C++/TerraLib5 data types. Responsible for storing the value...
virtual Properties * getProperties() const
Reimplemented from Observable.
virtual ~PointModel()
Destructor.
void setValue(ValueType value, EnumType *type)
Stores a copy of value.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
EnumType * m_currentPointType
virtual EnumType * getDataTypeStringList() const
Returns value that represents type StringList (string) belonging to enumeration.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
virtual Properties * getProperties() const
Reimplemented from Observable.
virtual double getShapeSize()
std::string toString()
Returns the value of string type. (The setValue method received a string)
void setName(std::string name)
Sets the name of this property.
virtual EnumType * getDataTypeString() const
Returns value that represents type string belonging to enumeration.
virtual void setLabel(std::string label)
Sets the label of this property.
void setOptionChoice(Variant variant)
virtual bool contains(Property property)
Checks if the property is contained within the set of properties.
A property acts like a attribute member of a object and stores the state of this attribute. A set of properties stores the state of an object. Any data type, not included in the convertValue method in the class te::layout::Variant, it will be by default "std::string" value.
virtual void setPointColor(te::color::RGBAColor color)
void setValue(ValueType value, EnumType *type)
Stores a copy of value.