#include "cc_tools_qt/property/field.h"
Common set of properties.
Common base class for all other properties description classes
|
| Common () |
| Default constructor.
|
|
| Common (Common &&) |
| Move constructor.
|
|
| Common (const Common &) |
| Copy constructor.
|
|
| Common (const QVariant &props) |
| Construct from QVariant that contains QVariantMap.
|
|
| Common (const QVariantMap &props) |
| Construct from QVariantMap.
|
|
| ~Common () noexcept |
| Destructor.
|
|
void | getFrom (const QVariantMap &props) |
| Read the properties values from the provided map.
|
|
Common & | hidden (bool value=true) |
| Set whether the field is hidden.
|
|
Common & | hiddenWhenReadOnly (bool value=true) |
| Set whether the field must be hidden when cannot be modified.
|
|
bool | isHidden () const |
| Check the field is hidden.
|
|
bool | isHiddenWhenReadOnly () const |
| Check the field is hidden when readOnly.
|
|
bool | isReadOnly () const |
| Check whether the field cannot be modified.
|
|
bool | isSerialisedHidden () const |
| Check the serialisation part is hidden.
|
|
const QString & | name () const |
| Get name of the field.
|
|
Common & | operator= (Common &&) |
| Move assignment operator.
|
|
Common & | operator= (const Common &) |
| Copy assignment operator.
|
|
Common & | readOnly (bool value=true) |
| Set whether the field cannot be modified.
|
|
Common & | serialisedHidden (bool value=true) |
| Set whether the serialised part is hidden.
|
|
void | setName (const char *value) |
| Update the name value.
|
|
void | setName (const QString &value) |
| Update the name value.
|
|
void | setTo (QVariantMap &props) const |
| Copy all the properties value into provided properties map.
|
|
|
template<typename TValueType > |
static TValueType | getElemFrom (const QVariantMap &props, const QString &name, const TValueType &defaultVal=TValueType()) |
| read element value from the map
|
|
template<typename U > |
static void | setElemTo (U &&val, const QString &name, QVariantMap &props) |
| set element value to the map
|
|
◆ getElemFrom()
template<typename TValueType >
static TValueType cc_tools_qt::property::field::Common::getElemFrom |
( |
const QVariantMap & |
props, |
|
|
const QString & |
name, |
|
|
const TValueType & |
defaultVal = TValueType() |
|
) |
| |
|
staticprotected |
read element value from the map
- Parameters
-
[in] | props | Properties map |
[in] | name | Property name |
[in] | defaultVal | Value to return if not found in map |
- Returns
- Value of found property in the map
◆ setElemTo()
template<typename U >
static void cc_tools_qt::property::field::Common::setElemTo |
( |
U && |
val, |
|
|
const QString & |
name, |
|
|
QVariantMap & |
props |
|
) |
| |
|
staticprotected |
set element value to the map
- Parameters
-
[in] | val | Value to set |
[in] | name | Name of the property |
[in,out] | props | Map to update |
The documentation for this class was generated from the following file:
- lib/include/cc_tools_qt/property/field.h