6#ifndef iprm_COptionsManager_included
7#define iprm_COptionsManager_included
11#include <QtCore/QVector>
83 const QString& optionName,
84 const QByteArray& optionId,
85 const QString& optionDescription = QString(),
86 int index = -1)
override;
106 OptionInfo(
const QString& optionName, QByteArray optionId,
const QString& optionDescription)
107 : optionName(optionName),
109 optionDescription(optionDescription),
116 QString optionDescription;
120 typedef QVector<OptionInfo> Options;
126 bool m_isSelectionSerialized;
Implementation of a simple options manager.
bool SetOptionEnabled(int index, bool isEnabled=true) override
Enables a given option.
int GetOptionIndexByName(const QString &optionName) const
Get the index for the given option name.
bool InsertOption(const QString &optionName, const QByteArray &optionId, const QString &optionDescription=QString(), int index=-1) override
Insert an option at some position.
QByteArray GetOptionId(int index) const override
Get option ID.
void SetFixedOptionsList(const iprm::IOptionsList *slaveSelectionConstraintsPtr)
Set additional fixed list of options.
bool SwapOptions(int index1, int index2) override
Swap two options.
int GetOptionIndexById(const QByteArray &optionId) const
Get the index for the given option ID.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
int GetOptionsCount() const override
Get number of managed options.
int GetSupportedOperations() const override
Get set of flags for supported operations.
bool SetOptionDescription(int index, const QString &optionDescription) override
Set a new description for the option at the given index optionIndex.
bool RemoveOption(int index) override
Remove an option at the given index.
bool SetOptionName(int index, const QString &optionName) override
Set a new name for the option at the given index optionIndex.
bool IsOptionEnabled(int index) const override
Return true if the option is enabled and can be selected.
QString GetOptionName(int index) const override
Get name of specified option.
virtual void ResetOptions()
Removes all options.
void SetSelectionSerialized(bool state)
Turn on or off selection serializing.
int GetOptionOperationFlags(int index=-1) const override
Get operation control flags of some option or whole manager.
int GetOptionsFlags() const override
Get constraints flags.
CSelectionParam BaseClass
bool IsSelectionSerialized() const
Check if selection is serialized.
bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
QString GetOptionDescription(int index) const override
Get human readable description for a option with the index index.
Basic implementation of selection parameter.
Constraints of selection from set of possibilities.
Common interface for the management of the dynamic selection constraints.
Represent input/output persistence archive.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains interfaces and implementations of flexible parameter concept.