CComposedGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtgui_CComposedGuiComp_included
2 #define iqtgui_CComposedGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QWidget>
9 #include <QtWidgets/QSplitter>
10 #else
11 #include <QtGui/QWidget>
12 #include <QtGui/QSplitter>
13 #endif
14 
15 // ACF includes
16 #include <iprm/IParamsSet.h>
19 
20 
21 namespace iqtgui
22 {
23 
24 
37  public iqtgui::TRestorableGuiWrap<CMultiPageGuiCompBase>
38 {
39 public:
41 
42  I_BEGIN_COMPONENT(CComposedGuiComp);
43  I_ASSIGN_MULTI_0(m_guisCompPtr, "Guis", "List of GUI's", true);
44  I_ASSIGN(m_designTypeAttrPtr, "DesignType", "Type of design:\n* 0 - Simple (Group Box)\n* 1 - Tool Box\n* 2 - Tab Bar\n* 3 - Splitter\n* 4 - Stacked\n* 5 - Collapsible groups", true, false);
45  I_ASSIGN(m_settingsKeyAttrPtr, "SettingsKey", "Key for saving/restoring of the layout information in the registry", false, "SettingsKey");
46  I_ASSIGN(m_tabOrientationAttrPtr, "TabBarOrientation", "Orientation of the tab bar for tab design\n 0 - North\n 1 - South\n 2 - West\n 3 - East", true, 0);
47  I_ASSIGN(m_flatViewAttrPtr, "FlatView", "Tries to apply flat view to the design if possible (Group Box: without frame; Tab Bar: triangular tabs; Slider: transparent grip)", true, false);
48  I_END_COMPONENT;
49 
50  // reimplemented (iqtgui::CMultiPageGuiCompBase)
51  virtual int GetPagesCount() const;
52  virtual iqtgui::IGuiObject* GetPageGuiComponent(int pageIndex) const;
53 
54 protected:
55  QWidget* GetPageContainerWidget() const;
56 
57  // reimplemented (TRestorableGuiWrap)
58  virtual void OnRestoreSettings(const QSettings& settings);
59  virtual void OnSaveSettings(QSettings& settings) const;
60 
61  // reimplemented (iqtgui::CMultiPageGuiCompBase)
62  virtual int GetDesignType() const;
63 
64  // reimplemented (iqtgui::CGuiComponentBase)
65  virtual void OnGuiCreated();
66 
67 private:
71  QString GetSettingsKey() const;
72 
73  I_MULTIREF(iqtgui::IGuiObject, m_guisCompPtr);
74  I_ATTR(int, m_designTypeAttrPtr);
75  I_ATTR(QString, m_settingsKeyAttrPtr);
76  I_ATTR(int, m_tabOrientationAttrPtr);
77  I_ATTR(bool, m_flatViewAttrPtr);
78 };
79 
80 
81 } // namespace iqtgui
82 
83 
84 #endif // !iqtgui_CComposedGuiComp_included
85 
86 
iqtgui::TRestorableGuiWrap< CMultiPageGuiCompBase > BaseClass
Component for the layouting/grouping of the UI-subcomponents.
virtual void OnSaveSettings(QSettings &settings) const
virtual int GetPagesCount() const
Get the number of the pages in the UI container.
virtual iqtgui::IGuiObject * GetPageGuiComponent(int pageIndex) const
Get the UI component for a given page.
A wrapper for saving/restoring of GUI component states in the application settings.
QWidget * GetPageContainerWidget() const
Common interface for GUI objects using in component context.
Definition: IGuiObject.h:25
virtual int GetDesignType() const
Get the container UI mode.
virtual void OnRestoreSettings(const QSettings &settings)
virtual void OnGuiCreated()
Called just after GUI is initialized.

© 2007-2017 Witold Gantzke and Kirill Lepskiy