CSelectionConstraintsComp.h
Go to the documentation of this file.
1 #ifndef iprm_CSelectionConstraintsComp_included
2 #define iprm_CSelectionConstraintsComp_included
3 
4 
5 // ACF includes
6 #include <iser/ISerializable.h>
7 #include <icomp/CComponentBase.h>
8 #include <iprm/IOptionsList.h>
9 
10 
11 namespace iprm
12 {
13 
14 
19  public icomp::CComponentBase,
20  virtual public iprm::IOptionsList
21 {
22 public:
24 
25  I_BEGIN_COMPONENT(CSelectionConstraintsComp);
26  I_REGISTER_INTERFACE(istd::IChangeable);
27  I_REGISTER_INTERFACE(iprm::IOptionsList);
28  I_ASSIGN_MULTI_0(m_optionNamesAttrPtr, "OptionNames", "Names of selectable options", true);
29  I_ASSIGN_MULTI_0(m_optionDescriptionsAttrPtr, "OptionDescriptions", "Descriptions of selectable options", true);
30  I_ASSIGN_MULTI_0(m_optionIdsAttrPtr, "OptionIds", "List of option IDs", true);
31  I_END_COMPONENT;
32 
33  // reimplemented (iprm::IOptionsList)
34  virtual int GetOptionsFlags() const;
35  virtual int GetOptionsCount() const;
36  virtual QString GetOptionName(int index) const;
37  virtual QString GetOptionDescription(int index) const;
38  virtual QByteArray GetOptionId(int index) const;
39  virtual bool IsOptionEnabled(int index) const;
40 
41 private:
42  I_MULTITEXTATTR(m_optionNamesAttrPtr);
43  I_MULTITEXTATTR(m_optionDescriptionsAttrPtr);
44  I_MULTIATTR(QByteArray, m_optionIdsAttrPtr);
45 };
46 
47 
48 } // namespace iprm
49 
50 
51 #endif // !iprm_CSelectionConstraintsComp_included
52 
53 
virtual int GetOptionsCount() const
Get number of managed options.
virtual QString GetOptionName(int index) const
Get name of specified option.
Base class for component implementation.
Constraints of selection from set of possibilities.
Definition: IOptionsList.h:22
virtual int GetOptionsFlags() const
Get constraints flags.
virtual QString GetOptionDescription(int index) const
Get human readable description for a option with the index index.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual QByteArray GetOptionId(int index) const
Get option ID.
virtual bool IsOptionEnabled(int index) const
Return true if the option is enabled and can be selected.
Implementation of selection constraints.

© 2007-2017 Witold Gantzke and Kirill Lepskiy