23 #include <QStringList>
34 const QString& preferenceKey)
36 bool currentValue = GetValue().Cast<
ObjectBool>()->GetValue();
38 if (ShouldPersist() && (store->Keys().contains(preferenceKey)))
40 const bool value = store->GetBool(preferenceKey, currentValue);
41 if (value != currentValue)
50 const QString& preferenceKey)
57 store->PutBool(preferenceKey, boolValue->GetValue());
66 throw ctkInvalidArgumentException(
"ToggleState takes a Boolean as a value");
69 PersistentState::SetValue(value);
void Load(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override
void Save(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override
void SetValue(const Object::Pointer &value) override
SmartPointer< Other > Cast() const