6 #ifndef GDCORE_PROPERTYDESCRIPTOR
7 #define GDCORE_PROPERTYDESCRIPTOR
10 #include "GDCore/String.h"
11 #include "GDCore/Project/MeasurementUnit.h"
14 class SerializerElement;
33 : currentValue(propertyValue), type(
"string"), label(
""), hidden(false),
34 deprecated(false), advanced(false),
41 : hidden(false), deprecated(false), advanced(false),
81 description = description_;
97 extraInformation = info;
109 extraInformation.push_back(info);
117 measurementUnit = measurementUnit_;
121 const gd::String& GetValue()
const {
return currentValue; }
122 const gd::String& GetType()
const {
return type; }
123 const gd::String& GetLabel()
const {
return label; }
124 const gd::String& GetDescription()
const {
return description; }
125 const gd::String& GetGroup()
const {
return group; }
128 const std::vector<gd::String>& GetExtraInfo()
const {
129 return extraInformation;
132 std::vector<gd::String>& GetExtraInfo() {
133 return extraInformation;
207 std::vector<gd::String>
A unit of measurement.
Definition: MeasurementUnit.h:24
Used to describe a property shown in a property grid.
Definition: PropertyDescriptor.h:24
PropertyDescriptor & SetValue(gd::String value)
Change the value displayed in the property grid.
Definition: PropertyDescriptor.h:52
bool IsHidden() const
Check if the property should be shown or hidden in the editor.
Definition: PropertyDescriptor.h:147
bool IsDeprecated() const
Check if the property is deprecated.
Definition: PropertyDescriptor.h:160
PropertyDescriptor & SetHidden(bool enable=true)
Set if the property should be shown or hidden in the editor.
Definition: PropertyDescriptor.h:139
PropertyDescriptor & SetExtraInfo(const std::vector< gd::String > &info)
Set and replace the additional information for the property.
Definition: PropertyDescriptor.h:96
PropertyDescriptor & SetGroup(gd::String group_)
Change the group where this property is displayed to the user, if any.
Definition: PropertyDescriptor.h:88
PropertyDescriptor & SetDeprecated(bool enable=true)
Set if the property is deprecated.
Definition: PropertyDescriptor.h:152
bool IsAdvanced() const
Check if the property is marked as advanced.
Definition: PropertyDescriptor.h:173
PropertyDescriptor()
Empty constructor creating an empty property to be displayed.
Definition: PropertyDescriptor.h:40
PropertyDescriptor & SetMeasurementUnit(const gd::MeasurementUnit &measurementUnit_)
Change the unit of measurement of the property value.
Definition: PropertyDescriptor.h:116
PropertyDescriptor & SetAdvanced(bool enable=true)
Set if the property is marked as advanced.
Definition: PropertyDescriptor.h:165
PropertyDescriptor(gd::String propertyValue)
Create a property being a simple gd::String with the specified value.
Definition: PropertyDescriptor.h:32
PropertyDescriptor & SetType(gd::String type_)
Change the type of the value displayed in the property grid.
Definition: PropertyDescriptor.h:64
PropertyDescriptor & AddExtraInfo(const gd::String &info)
Add an information about the property.
Definition: PropertyDescriptor.h:108
PropertyDescriptor & SetDescription(gd::String description_)
Change the description displayed to the user, if any.
Definition: PropertyDescriptor.h:80
PropertyDescriptor & SetLabel(gd::String label_)
Change the label displayed in the property grid.
Definition: PropertyDescriptor.h:72
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24