CPixelFormatList.h
Go to the documentation of this file.
1 #ifndef iimg_CPixelFormatList_included
2 #define iimg_CPixelFormatList_included
3 
4 
5 // ACF includes
6 #include <iprm/IOptionsList.h>
7 
8 
9 namespace iimg
10 {
11 
12 
13 class CPixelFormatList: virtual public iprm::IOptionsList
14 {
15 public:
16  typedef QSet<int> ActiveFormats;
17 
19 
21  void SetActiveFormats(const ActiveFormats& formats);
22 
23  // reimplemented (iprm::IOptionsList)
24  virtual int GetOptionsFlags() const;
25  virtual int GetOptionsCount() const;
26  virtual QString GetOptionName(int index) const;
27  virtual QString GetOptionDescription(int index) const;
28  virtual QByteArray GetOptionId(int index) const;
29  virtual bool IsOptionEnabled(int index) const;
30 
31  // static methods
32  static const CPixelFormatList& GetInstance();
33 
34 private:
35  ActiveFormats m_activeFormats;
36 
37  static CPixelFormatList s_instance;
38 };
39 
40 
41 } // namespace iimg
42 
43 
44 #endif // !iimg_CPixelFormatList_included
45 
46 
virtual QByteArray GetOptionId(int index) const
Get option ID.
static const CPixelFormatList & GetInstance()
virtual int GetOptionsFlags() const
Get constraints flags.
Constraints of selection from set of possibilities.
Definition: IOptionsList.h:22
virtual bool IsOptionEnabled(int index) const
Return true if the option is enabled and can be selected.
void SetActiveFormats(const ActiveFormats &formats)
ActiveFormats GetActiveFormats() const
virtual int GetOptionsCount() const
Get number of managed options.
virtual QString GetOptionName(int index) const
Get name of specified option.
virtual QString GetOptionDescription(int index) const
Get human readable description for a option with the index index.

© 2007-2017 Witold Gantzke and Kirill Lepskiy