#include <DynamicProperty.h>
This class implements an interface to add properties at run-time to an object derived from PropertyContainer. The additional properties are made persistent.
- Author
- Werner Mayer
◆ DynamicProperty()
Core::DynamicProperty::DynamicProperty |
( |
| ) |
|
◆ ~DynamicProperty()
virtual Core::DynamicProperty::~DynamicProperty |
( |
| ) |
|
|
virtual |
◆ addDynamicProperty()
Property* Core::DynamicProperty::addDynamicProperty |
( |
PropertyContainer & |
pc, |
|
|
const char * |
type, |
|
|
const char * |
name = 0 , |
|
|
const char * |
group = 0 , |
|
|
const char * |
doc = 0 , |
|
|
short |
attr = 0 , |
|
|
bool |
ro = false , |
|
|
bool |
hidden = false |
|
) |
| |
Add a dynamic property of the type type and with the name name. Group gives the grouping name which appears in the property editor and doc shows the tooltip there. With attr, ro and hidden the behaviour of the property can be controlled. attr is an OR'ed value of the PropertyType enumeration. If no special attribute should be set Prop_None can be set (or leave the default of 0). For convenience the attributes for 'Read-Only' and 'Hidden' can also be controlled with the values ro or hidden. This means,
is equivalent to
◆ addProperty()
bool Core::DynamicProperty::addProperty |
( |
Property * |
prop | ) |
|
Add a pre-existing property
The property is not treated as dynamic, and will not trigger signal.
- Returns
- Return false if there is a property exist with the same name.
◆ clear()
void Core::DynamicProperty::clear |
( |
| ) |
|
◆ getDynamicPropertyByName()
Property* Core::DynamicProperty::getDynamicPropertyByName |
( |
const char * |
name | ) |
const |
Find a dynamic property by its name.
◆ getDynamicPropertyData()
PropData Core::DynamicProperty::getDynamicPropertyData |
( |
const Property * |
prop | ) |
const |
◆ getDynamicPropertyNames()
std::vector<std::string> Core::DynamicProperty::getDynamicPropertyNames |
( |
| ) |
const |
Get a list of all dynamic properties.
◆ getPropertyDocumentation() [1/2]
const char* Core::DynamicProperty::getPropertyDocumentation |
( |
const char * |
name | ) |
const |
Get the documentation of a named property.
◆ getPropertyDocumentation() [2/2]
const char* Core::DynamicProperty::getPropertyDocumentation |
( |
const Property * |
prop | ) |
const |
Get the documentation of a property.
◆ getPropertyGroup() [1/2]
const char* Core::DynamicProperty::getPropertyGroup |
( |
const char * |
name | ) |
const |
Get the group name of a named property.
◆ getPropertyGroup() [2/2]
const char* Core::DynamicProperty::getPropertyGroup |
( |
const Property * |
prop | ) |
const |
Get the group name of a property.
◆ getPropertyList()
void Core::DynamicProperty::getPropertyList |
( |
std::vector< Property * > & |
List | ) |
const |
Get all properties of the class (including parent)
◆ getPropertyMap()
void Core::DynamicProperty::getPropertyMap |
( |
std::map< std::string, Property * > & |
Map | ) |
const |
Get all properties of the class (including parent)
◆ getPropertyName()
const char* Core::DynamicProperty::getPropertyName |
( |
const Property * |
prop | ) |
const |
Get the name of a property.
◆ getPropertyType() [1/2]
short Core::DynamicProperty::getPropertyType |
( |
const char * |
name | ) |
const |
Get the attributes of a named property.
◆ getPropertyType() [2/2]
short Core::DynamicProperty::getPropertyType |
( |
const Property * |
prop | ) |
const |
Get the attributes of a property.
◆ removeDynamicProperty()
bool Core::DynamicProperty::removeDynamicProperty |
( |
const char * |
name | ) |
|
Removes a dynamic property by name. Returns true if the property is part of the container, otherwise false is returned.
◆ removeProperty()
bool Core::DynamicProperty::removeProperty |
( |
const Property * |
prop | ) |
|
Remove pre-existing property, which will not be deleted.
◆ restore()
◆ save()
◆ size()
size_t Core::DynamicProperty::size |
( |
| ) |
const |
The documentation for this class was generated from the following file:
- D:/CadworkJobs/SoftwareProjekte/Lexocad/LexoGit/Lexocad/lexocad/Core/include/Core/DynamicProperty.h