ICF 3.1.1.10
Technical documentation of ICF Libraries
CComposedGuiComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iqtgui_CComposedGuiComp_included
7#define iqtgui_CComposedGuiComp_included
8
9
10// Qt includes
11#include <QtCore/QString>
12#include <QtWidgets/QWidget>
13#include <QtWidgets/QSplitter>
14
15// ICF includes
16#include <iprm/IParamsSet.h>
19
20
21namespace istdgui
22{
23
24
39 public istdgui::TRestorableGuiWrap<CMultiPageGuiCompBase>
40{
41public:
43
44 I_BEGIN_COMPONENT(CComposedGuiComp);
45 I_ASSIGN_MULTI_0(m_guisCompPtr, "Guis", "List of GUI's", true);
46 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\n* 6 - Mini-widget", true, false);
47 I_ASSIGN(m_settingsKeyAttrPtr, "SettingsKey", "Key for saving/restoring of the layout information in the registry", false, "SettingsKey");
48 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);
49 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);
50 I_END_COMPONENT;
51
52 // reimplemented (istdgui::CMultiPageGuiCompBase)
53 int GetPagesCount() const override;
54 istdgui::IGuiObject* GetPageGuiComponent(int pageIndex) const override;
55
56protected:
57 QWidget* GetPageContainerWidget() const;
58
59 // reimplemented (TRestorableGuiWrap)
60 void OnRestoreSettings(const QSettings& settings) override;
61 void OnSaveSettings(QSettings& settings) const override;
62
63 // reimplemented (istdgui::CMultiPageGuiCompBase)
64 int GetDesignType() const override;
65
66 // reimplemented (istdgui::CGuiComponentBase)
67 void OnGuiCreated() override;
68
69private:
73 QString GetSettingsKey() const;
74
75private:
76 I_MULTIREF(istdgui::IGuiObject, m_guisCompPtr);
77 I_ATTR(int, m_designTypeAttrPtr);
78 I_ATTR(QString, m_settingsKeyAttrPtr);
79 I_ATTR(int, m_tabOrientationAttrPtr);
80 I_ATTR(bool, m_flatViewAttrPtr);
81};
82
83
84} // namespace istdgui
85
86
87#endif // !iqtgui_CComposedGuiComp_included
88
89
Component for the layouting/grouping of the UI-subcomponents.
istdgui::TRestorableGuiWrap< CMultiPageGuiCompBase > BaseClass
int GetPagesCount() const override
Get the number of the pages in the UI container.
int GetDesignType() const override
Get the container UI mode.
void OnRestoreSettings(const QSettings &settings) override
istdgui::IGuiObject * GetPageGuiComponent(int pageIndex) const override
Get the UI component for a given page.
QWidget * GetPageContainerWidget() const
void OnSaveSettings(QSettings &settings) const override
void OnGuiCreated() override
Called just after GUI is initialized.
Common interface for GUI objects using in component context.
Definition IGuiObject.h:27
A wrapper for saving/restoring of GUI component states in the application settings.
Standard GUI specific interfaces and components based on Qt.

© Witold Gantzke and Kirill Lepskiy