6#include <QtCore/QVector>
30 I_ASSIGN(m_elementIndexParamIdAttrPtr,
"ElementIndexParamId",
"ID of index of returned parameter set in manager list",
false,
"Index");
31 I_ASSIGN(m_elementUuidParamIdAttrPtr,
"ElementUuidParamId",
"ID of object uuid of returned parameter set in manager list",
false,
"Uuid");
32 I_ASSIGN(m_elementNameParamIdAttrPtr,
"ElementNameParamId",
"ID of the name of returned parameter set in manager list",
false,
"Name");
33 I_ASSIGN(m_elementDescriptionParamIdAttrPtr,
"ElementDescriptionParamId",
"ID of the description of returned parameter set in manager list",
false,
"Description");
34 I_ASSIGN_MULTI_0(m_fixedParamSetsCompPtr,
"FixedParamSets",
"List of references to fixed parameter set",
false);
35 I_ASSIGN_MULTI_0(m_fixedSetNamesAttrPtr,
"FixedSetNames",
"List of fixed parameter names",
false);
36 I_ASSIGN_MULTI_0(m_fixedSetDescriptionsAttrPtr,
"FixedSetDescriptions",
"List of fixed parameter descriptions",
false);
37 I_ASSIGN_MULTI_0(m_fixedSetIdsAttrPtr,
"FixedSetIds",
"List of fixed parameter IDs",
false);
38 I_ASSIGN(m_defaultSetNameAttrPtr,
"DefaultSetName",
"Default name of parameter set. Use %1 to insert automatic enumeration, %0 to substitute name of the corresponding factory (MultiParams only)",
true,
"<noname>");
39 I_ASSIGN(m_serializeSelectionAttrPtr,
"SerializeSelection",
"If enabled, the current parameter set selection will be serialized",
true,
true);
40 I_ASSIGN(m_defaultSelectedIndexAttrPtr,
"DefaultSelection",
"If enabled, the given parameter set will be automatically selected",
false, -1);
41 I_ASSIGN(m_allowDisabledAttrPtr,
"AllowDisabled",
"Control if disabled parameters are supported",
true,
false);
42 I_ASSIGN(m_supportEnablingAttrPtr,
"SupportEnabling",
"Control if enabling or disabling of parameters is allowed (works only if disabled parameters are supported)",
true,
true);
43 I_ASSIGN(m_allowEditFixedAttrPtr,
"AllowEditFixed",
"If enabled, the editing of fixed parameters is enabled",
true,
true);
47 I_MULTIREF(
IParamsSet, m_fixedParamSetsCompPtr);
50 I_MULTIATTR(QByteArray, m_fixedSetIdsAttrPtr);
52 I_ATTR(
bool, m_serializeSelectionAttrPtr);
53 I_ATTR(
int, m_defaultSelectedIndexAttrPtr);
54 I_ATTR(
bool, m_allowDisabledAttrPtr);
55 I_ATTR(
bool, m_supportEnablingAttrPtr);
56 I_ATTR(
bool, m_allowEditFixedAttrPtr);
57 I_ATTR(QByteArray, m_elementIndexParamIdAttrPtr);
58 I_ATTR(QByteArray, m_elementUuidParamIdAttrPtr);
59 I_ATTR(QByteArray, m_elementNameParamIdAttrPtr);
60 I_ATTR(QByteArray, m_elementDescriptionParamIdAttrPtr);
88 I_ASSIGN(m_parentSelectionCompPtr,
"ParentSelection",
"Parent selection component",
false,
"ParentSelection");
162 virtual const QString&
GetName()
const override;
163 virtual void SetName(
const QString& name)
override;
170 mutable QString m_uuid;
195 virtual const QString&
GetName()
const override;
252 template <
class InterfaceType>
255 return &component.m_selectedParams;
Base class for component implementation.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
Common interface for model objects, that supports Model/Observer design pattern.
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Implementation of a named object over iprm::INameParam interface.
virtual Ids GetParamIds(bool editableOnly=false) const override
Get list of used parameter IDs in the parameter set.
virtual ISelectionParam * GetSubselection(int index) const override
Get sub-selection for specified option.
virtual void SetName(const QString &name) override
Set the object name.
iprm::CNameParam description
CParamsManagerCompBase * parentPtr
virtual int GetSelectedOptionIndex() const override
Get selected index.
virtual iser::ISerializable * GetEditableParameter(const QByteArray &id) override
Get access to editable parameter (read-write access).
virtual QByteArray GetFactoryId() const override
iprm::IParamsSetSharedPtr paramSetPtr
virtual const IParamsInfoProvider * GetParamsInfoProvider() const override
Get parameter information provider.
virtual const iser::ISerializable * GetParameter(const QByteArray &id) const override
Get any parameter (read-only access).
virtual bool SetSelectedOptionIndex(int index) override
Set index of selected option.
virtual const QString & GetName() const override
Get the object name.
virtual bool IsNameFixed() const override
Return true if the name is fixed (non-editable).
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual bool CopyFrom(const istd::IChangeable &object, istd::IChangeable::CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
imod::CModelUpdateBridge updateBridge
virtual const IOptionsList * GetSelectionConstraints() const override
Get constraints of this parameter.
virtual Ids GetParamIds(bool editableOnly=false) const override
Get list of used parameter IDs in the parameter set.
virtual QByteArray GetFactoryId() const override
virtual iser::ISerializable * GetEditableParameter(const QByteArray &id) override
Get access to editable parameter (read-write access).
virtual const IParamsInfoProvider * GetParamsInfoProvider() const override
Get parameter information provider.
virtual const iser::ISerializable * GetParameter(const QByteArray &id) const override
Get any parameter (read-only access).
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
CParamsManagerCompBase * parentPtr
virtual const QString & GetName() const override
Get the object name.
virtual bool IsNameFixed() const override
Return true if the name is fixed (non-editable).
virtual void SetName(const QString &name) override
Set the object name.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
UuidParam(const ParamSet &parent)
I_MULTITEXTATTR(m_fixedSetDescriptionsAttrPtr)
I_MULTITEXTATTR(m_fixedSetNamesAttrPtr)
I_TEXTATTR(m_defaultSetNameAttrPtr)
icomp::CComponentBase BaseClass
Implementation of parameter manager.
void EnsureParamsSetModelDetached(iprm::IParamsSet *paramsSetPtr) const
virtual IParamsSet * GetParamsSet(int index) const override
Get selected parameter set.
int FindFixedParamSetIndex(const QString &name) const
virtual const IOptionsList * GetSelectionConstraints() const override
Get constraints of this parameter.
virtual bool SetParamsSetName(int index, const QString &name) override
Set name of specified parameter set.
virtual bool RemoveParamsSet(int index) override
Remove parameter set at selected position.
virtual QString CalculateNewDefaultName(int typeIndex=-1) const
std::vector< ParamSetPtr > ParamSets
virtual int GetIndexOperationFlags(int index=-1) const override
Get operation control flags of some parameter set or whole manager.
CParamsManagerCompBaseAttr BaseClass
virtual QString GetParamsSetDescription(int index) const override
Get the description of the specified parameter set.
virtual QString GetOptionDescription(int index) const override
Get human-readable description for an option.
virtual int GetOptionsCount() const override
Get number of managed options.
virtual void SetParamsSetDescription(int index, const QString &description) override
Set the description of the specified parameter set.
virtual int GetParamsSetsCount() const override
Get number of managed parameter sets.
virtual bool IsParameterCreationSupported() const =0
Return true if creation of parameter sets is supported by the implementation.
virtual QString GetParamsSetName(int index) const override
Get name of specified parameter set.
virtual iprm::IParamsSetUniquePtr CreateParamsSetInstance(int typeIndex=-1) const =0
Create a new instance of the parameter set.
virtual int GetOptionsFlags() const override
Get constraints flags.
virtual int GetCreatedParamsSetsCount() const =0
Get the number of parameter sets created at the run time.
virtual bool SetIndexOperationFlags(int index, int flags) override
Set operation control flags of some parameter-set.
QMap< int, int > m_fixedParamsSetFlagsMap
imod::CModelUpdateBridge m_updateBridge
std::unique_ptr< ParamSet > ParamSetPtr
int FindParamSetIndex(const QString &name) const
virtual bool SetSelectedOptionIndex(int index) override
Set index of selected option.
virtual bool IsOptionEnabled(int index) const override
Return true if the option is enabled and can be selected.
virtual int GetSelectedOptionIndex() const override
Get selected index.
virtual QString GetOptionName(int index) const override
Get name of specified option.
virtual ISelectionParam * GetSubselection(int index) const override
Get sub-selection for specified option.
virtual int InsertParamsSet(int typeIndex=-1, int index=-1) override
Insert new parameter set at selected position.
virtual bool SwapParamsSet(int index1, int index2) override
Swap two parameter sets.
virtual void OnComponentCreated() override
bool IsNameUnique(const QString &name) const
virtual iprm::IParamsSetUniquePtr CreateParameterSet(int typeIndex=-1, int index=-1) const override
Create a new parameter set instance.
virtual QByteArray GetOptionId(int index) const override
Get option ID.
Interface for an object containing a name.
Constraints of selection from set of possibilities.
Common interface for the management of dynamic selection constraints.
Provider of parameter information (name and description).
Manager of parameter sets.
Set of general parameters.
Interface allowing to select single option from list of options.
Represents an input/output persistence archive for object serialization.
Common interface for factorisable model objects.
Common class for all classes which objects can be archived or restored from archive.
Common interface for data model objects, which can be changed.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Unique ownership smart pointer for interface types.
Contains interfaces and implementations of flexible parameter concept.