add possibilities to fill the userProperties

This commit is contained in:
Martin
2021-03-05 07:56:35 +01:00
parent 51ed21f9ef
commit 6887c543da
2 changed files with 75 additions and 51 deletions

View File

@@ -404,11 +404,34 @@ QString PropertiesInterface::orientationToString(Qet::Orientation o) {
return(ret);
}
/*!
* \brief PropertiesInterface::propertiesToXml
* Write all user properties to the DomElement \p e
* \param e
*/
void PropertiesInterface::deleteUserProperties()
{
properties.clear();
}
int PropertiesInterface::userPropertiesCount() const
{
return properties.count();
}
void PropertiesInterface::setUserProperty(const QString& key, const QVariant& value)
{
properties[key] = value;
}
bool PropertiesInterface::existUserProperty(const QString& key) const
{
return properties.contains(key);
}
QVariant PropertiesInterface::userPropertyValue(const QString& key)
{
if (!existUserProperty(key))
return QVariant();
return properties[key];
}
void PropertiesInterface::propertiesToXml(QDomElement& e) const
{
if (properties.count() == 0)