29 #ifndef __TERRALIB_LAYOUT_INTERNAL_PROPERTY_H
30 #define __TERRALIB_LAYOUT_INTERNAL_PROPERTY_H
34 #include "../enum/EnumType.h"
35 #include "../Config.h"
54 Property(
int parentItemHashCode = 0);
66 std::string getName();
73 void setName(std::string name);
82 std::vector<te::layout::Property> getSubProperty();
95 template <
typename ValueType>
96 void setValue(ValueType value,
EnumType* type);
103 void setValue(
Variant variant);
124 void setEditable(
bool editable);
128 void addOption(
Variant variant);
130 void removeOption(
Variant variant);
132 void setOptionChoice(
Variant variant);
134 void setOptionChoice(
int numberOption);
136 Variant getOptionByCurrentChoice();
138 std::vector<Variant> getOptionChoices();
141 void addSubProperty(
Property property );
143 void removeSubProperty(
Property property );
162 virtual void setLabel(std::string label);
169 virtual std::string getLabel();
171 virtual bool containsSubProperty(
Property subProperty);
173 virtual Property containsSubProperty(std::string name);
180 virtual void setMenu(
bool menu);
187 virtual bool isMenu();
189 virtual void setIcon(std::string icon);
191 virtual std::string getIcon();
198 virtual bool isComplex();
205 virtual void setVisible(
bool visible);
212 virtual bool isVisible();
226 void setRequired(
bool required);
233 void setParentItemHashCode(
int hashCode);
240 int getParentItemHashCode();
248 bool isComposeWidget();
256 void setComposeWidget(
bool compose);
274 void setPublic(
bool publicProperty);
297 template <
typename ValueType>
311 if(getName().compare(otherProp.
getName()) == 0)
std::string getName()
Method that returns the name of this property.
bool m_composeWidget
compose widget
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::vector< Variant > m_options
te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
int m_parentItemHashCode
hashcode of the object that owns this property
Class acts like a union for some C++/TerraLib5 data types. Responsible for storing the value...
std::string m_name
name of this property
Class acts like a union for some C++/TerraLib5 data types. Responsible for storing the value...
EnumType * m_type
data type of this property
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...
bool m_menu
the property will be used in a menu.
bool m_public
public property, used by another component
bool operator==(const Property &other)
std::vector< te::layout::Property > m_subProperty
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.
void setValue(ValueType value, EnumType *type)
Stores a copy of value.