Generic command to add/delete/modify the value of a "Property" inside a "PropertySet" of an Element. The corresponding data structures "PropertySetInfo", "PropertyDescriptor", ... are created automatically (if they don't already exist). (Note: if the "PropertySetDefinition" is of type "PredefinedPropertySet", the "Property" can only be set, neither added, nor deleted because those entries are fixed)
More...
|
| CmdSetPropertySetDefinition ()=default |
|
| ~CmdSetPropertySetDefinition ()=default |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, std::shared_ptr< OpenLxApp::Element > aElement) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::vector< std::shared_ptr< OpenLxApp::Element >> &aElements) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const bool &propertyValue) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const bool &propertyValue, std::shared_ptr< OpenLxApp::Element > aElement) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const bool &propertyValue, const std::vector< std::shared_ptr< OpenLxApp::Element >> &aElements) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const double &propertyValue) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const double &propertyValue, std::shared_ptr< OpenLxApp::Element > aElement) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const double &propertyValue, const std::vector< std::shared_ptr< OpenLxApp::Element >> &aElements) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::string &propertyValue) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::string &propertyValue, std::shared_ptr< OpenLxApp::Element > aElement) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::string &propertyValue, const std::vector< std::shared_ptr< OpenLxApp::Element >> &aElements) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::vector< std::string > &propertyValue, const int &index) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::vector< std::string > &propertyValue, const int &index, std::shared_ptr< OpenLxApp::Element > aElement) |
|
| CmdSetPropertySetDefinition (const std::string &propertySetName, const std::string &propertyName, const std::vector< std::string > &propertyValue, const int &index, const std::vector< std::shared_ptr< OpenLxApp::Element >> &aElements) |
|
bool | redo () override |
|
bool | undo () override |
|
Public Member Functions inherited from Core::Command |
| Command () |
|
virtual | ~Command () |
|
virtual void | serialize (std::ostream &, const unsigned int) |
|
Base::String | getDescription () const |
|
void | setDescription (const Base::String &s) |
|
void | setParameter (const std::string &key, const Core::Variant &value) |
|
bool | getParameter (const std::string &key, Core::Variant &value) const |
|
void | setSilentMode (bool on) |
|
bool | isInSilentMode () const |
|
void | setDoRecomputeInRedo (bool on) |
|
void | setDoRecomputeInUndo (bool on) |
|
bool | getDoRecomputeInRedo () const |
|
bool | getDoRecomputeInUndo () const |
|
void | setDone (bool yes) |
|
bool | isDone () const |
|
Generic command to add/delete/modify the value of a "Property" inside a "PropertySet" of an Element. The corresponding data structures "PropertySetInfo", "PropertyDescriptor", ... are created automatically (if they don't already exist). (Note: if the "PropertySetDefinition" is of type "PredefinedPropertySet", the "Property" can only be set, neither added, nor deleted because those entries are fixed)
The function signature(s) intentionally uses basic data like "std::string" and "std::vector<std::string>" in order to make the python command line as concise as possible. (Note: all conversions to our Core::Variant data type is done internally)
CmdSetPropertySetDefinition("PropertySet1", "Property1", 1) => Adds a property of type "Number" with value 1.0 CmdSetPropertySetDefinition("PropertySet1", "Property1", 1.0) => Same as above CmdSetPropertySetDefinition("PropertySet1", "Property2", "Hello") => Adds a property of type "Text" with value 'Hello' CmdSetPropertySetDefinition("PropertySet1", "Property3", "") => Same as above but with empty text CmdSetPropertySetDefinition("PropertySet1", "Property4", 4) => Adds a property of type "Number" with value 4.0 CmdSetPropertySetDefinition("PropertySet1", "Property4", 4.1) => "Property4" is already defined, this just changes its value from 4.0 to 4.1 CmdSetPropertySetDefinition("PropertySet2", "Property4", 4.2) => "Property4" defined in a different "PropertySet" with a different value (4.2) CmdSetPropertySetDefinition("PropertySet2", "Property5", True) => Adds a property of type "Boolean" with value True CmdSetPropertySetDefinition("PropertySet2", "Property6", ["A", "B", "C"], 0) => Adds a property of type "LUT" with the given strings (A, B, C) and index 0 ('A' is selected) CmdSetPropertySetDefinition("PropertySet2", "Property6", [], 1) => Selects 'B' in "Property6" (no need to repeat the list of strings) CmdSetPropertySetDefinition("PropertySet2", "Property6", False) => "Property6" is already defined with type "LUT". Changing it to "Boolean" will fail. CmdSetPropertySetDefinition("PropertySet2", "Property6") => Removes "Property6" from "PropertySet2".