19 #include <QStringList> 30 const QString& preferenceKey)
32 bool currentValue = GetValue().Cast<
ObjectBool>()->GetValue();
34 if (ShouldPersist() && (store->Keys().contains(preferenceKey)))
36 const bool value = store->GetBool(preferenceKey, currentValue);
37 if (value != currentValue)
46 const QString& preferenceKey)
53 store->PutBool(preferenceKey, boolValue->GetValue());
62 throw ctkInvalidArgumentException(
"ToggleState takes a Boolean as a value");
65 PersistentState::SetValue(value);
void Load(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override
SmartPointer< Other > Cast() const
void Save(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override
void SetValue(const Object::Pointer &value) override