35 SetShouldPersist(
true);
39 QString defaultObject = parameters->value(
"default");
40 if (!defaultObject.isNull())
42 ReadDefault(defaultObject);
45 QString persistedObject = parameters->value(
"persisted");
46 if (!persistedObject.isNull())
48 ReadPersisted(persistedObject);
53 SetShouldPersist(
true);
57 void RegistryToggleState::ReadDefault(
const QString& defaultString)
59 if (defaultString.compare(
"true", Qt::CaseInsensitive) == 0)
66 void RegistryToggleState::ReadPersisted(
const QString& persistedString)
68 if (persistedString.compare(
"false", Qt::CaseInsensitive) == 0)
70 SetShouldPersist(
false);
74 SetShouldPersist(
true);
Implements transparent reference counting.
static const QString STATE_ID
void SetInitializationData(const SmartPointer< IConfigurationElement > &configurationElement, const QString &propertyName, const Object::Pointer &data) override
void SetValue(const Object::Pointer &value) override
SmartPointer< Other > Cast() const