CIconProviderComp.h
Go to the documentation of this file.
1 #ifndef iqtgui_CIconProviderComp_included
2 #define iqtgui_CIconProviderComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <iqtgui/IIconProvider.h>
8 
9 
10 namespace iqtgui
11 {
12 
13 
15 {
16 public:
18 
19  I_BEGIN_COMPONENT(CIconProviderComp);
20  I_REGISTER_INTERFACE(iqtgui::IIconProvider);
21  I_ASSIGN_MULTI_0(m_iconFilesAttrPtr, "IconFiles", "Names of the icon files", true);
22  I_ASSIGN(m_iconPathAttrPtr, "IconsPath", "Path to the icon files", true, ".");
23  I_END_COMPONENT;
24 
25  // reimplemented (iqtgui::IIconProvider)
26  virtual int GetIconCount() const;
27  virtual QIcon GetIcon(int index) const;
28 
29 private:
30  I_MULTIATTR(QString, m_iconFilesAttrPtr);
31  I_ATTR(QString, m_iconPathAttrPtr);
32 };
33 
34 
35 } // namespace iqtgui
36 
37 
38 #endif // !iqtgui_CIconProviderComp_included
39 
icomp::CComponentBase BaseClass
This interface provides acces to an icon.
Definition: IIconProvider.h:21
virtual QIcon GetIcon(int index) const
Gets icon with the index iconIndex from collection.
Base class for component implementation.
virtual int GetIconCount() const
Gets the number of icons in the collection.

© 2007-2017 Witold Gantzke and Kirill Lepskiy