25 void NamedHandleObjectWithState::AddState(
const QString& stateId,
30 throw Poco::NullPointerException(
"Cannot add a null state");
33 states[stateId] =
state;
45 if (value.IsNotNull())
47 return value->ToString();
63 if (value.IsNotNull())
65 return value->ToString();
73 const QString& stateId)
const
80 QHash<QString, State::Pointer>::const_iterator iter = states.find(stateId);
88 return QList<QString>();
91 QList<QString> stateIds;
92 for (QHash<QString, State::Pointer>::const_iterator iter = states.begin();
93 iter != states.end(); ++iter)
95 stateIds.push_back(iter.key());
104 throw ctkInvalidArgumentException(
"Cannot remove an empty id");
void RemoveState(const QString &id) override
QString GetDescription() const override
virtual QString GetName() const
virtual QString GetDescription() const
QList< QString > GetStateIds() const override
static const QString NAME
berry::SmartPointer< Self > Pointer
const SmartPointer< State > & state
QString GetName() const override
static const QString DESCRIPTION
SmartPointer< State > GetState(const QString &stateId) const override
NamedHandleObjectWithState(const QString &id)