The UserProperties class This class store user properties. User properties are properties set by user who are don't know by QElectroTech. An user property is defined by a name and a value of arbitrarie type (QString, char*, int, double, bool, QUuid, QColor)
More...
#include <userproperties.h>
The UserProperties class This class store user properties. User properties are properties set by user who are don't know by QElectroTech. An user property is defined by a name and a value of arbitrarie type (QString, char*, int, double, bool, QUuid, QColor)
◆ UserProperties()
UserProperties::UserProperties |
( |
const QString |
tag_name = "userProperties" | ) |
|
◆ deleteUserProperties()
void UserProperties::deleteUserProperties |
( |
| ) |
|
◆ existUserProperty()
bool UserProperties::existUserProperty |
( |
const QString & |
key | ) |
const |
◆ fromSettings()
virtual void UserProperties::fromSettings |
( |
const QSettings & |
settings, |
|
|
const QString |
= QString() |
|
) |
| |
|
inlineoverridevirtual |
fromSettings load properties to setting file.
- Parameters
-
settings | : is use for prefix a word before the name of each parameter |
QString | |
Implements PropertiesInterface.
◆ fromXml()
bool UserProperties::fromXml |
( |
const QDomElement & |
xml_element | ) |
|
|
overridevirtual |
UserProperties::fromXml.
- Parameters
-
- Returns
- load user properties from xml Take care before using this function that the tagName of this class is the same as the tag of xml_element given in parameter.
Implements PropertiesInterface.
◆ setTagName()
void UserProperties::setTagName |
( |
const QString & |
tag_name | ) |
|
◆ setUserProperty()
void UserProperties::setUserProperty |
( |
const QString & |
key, |
|
|
const QVariant & |
value |
|
) |
| |
◆ tagName()
QString UserProperties::tagName |
( |
| ) |
const |
◆ toSettings()
virtual void UserProperties::toSettings |
( |
QSettings & |
settings, |
|
|
const QString |
= QString() |
|
) |
| const |
|
inlineoverridevirtual |
toSettings Save properties to setting file.
- Parameters
-
settings | : is use for prefix a word before the name of each parameter |
QString | |
Implements PropertiesInterface.
◆ toXml()
QDomElement UserProperties::toXml |
( |
QDomDocument & |
xml_document | ) |
const |
|
overridevirtual |
UserProperties::toXml.
- Parameters
-
- Returns
- A QDomElement who contain one child for each user properties the tag name of the returned domElement is "userProperties" by default If you want to change the tag name, see setTagName and tagName function.
Implements PropertiesInterface.
◆ userPropertiesCount()
int UserProperties::userPropertiesCount |
( |
| ) |
const |
◆ userPropertyValue()
QVariant UserProperties::userPropertyValue |
( |
const QString & |
key | ) |
|
UserProperties::userPropertyValue Returns the value of a user property with key key
If key
is not found, an invalid QVariant is returned. Use QVariant::type() to get the type of the value.
- Parameters
-
- Returns
◆ m_properties
QHash<QString, QVariant> UserProperties::m_properties |
|
private |
◆ m_tag_name
QString UserProperties::m_tag_name |
|
private |
The documentation for this class was generated from the following files: