ACF $AcfVersion:0$
CComposedGuiComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
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
21namespace iqtgui
22{
23
24
39 public iqtgui::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 (iqtgui::CMultiPageGuiCompBase)
53 virtual int GetPagesCount() const override;
54 virtual iqtgui::IGuiObject* GetPageGuiComponent(int pageIndex) const override;
55
56protected:
57 QWidget* GetPageContainerWidget() const;
58
59 // reimplemented (TRestorableGuiWrap)
60 virtual void OnRestoreSettings(const QSettings& settings) override;
61 virtual void OnSaveSettings(QSettings& settings) const override;
62
63 // reimplemented (iqtgui::CMultiPageGuiCompBase)
64 virtual int GetDesignType() const override;
65
66 // reimplemented (iqtgui::CGuiComponentBase)
67 virtual void OnGuiCreated() override;
68
69private:
73 QString GetSettingsKey() const;
74
75private:
76 I_MULTIREF(iqtgui::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 iqtgui
85
86
87
88
Component for the layouting/grouping of the UI-subcomponents.
QWidget * GetPageContainerWidget() const
virtual int GetPagesCount() const override
Get the number of the pages in the UI container.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
virtual void OnRestoreSettings(const QSettings &settings) override
virtual void OnSaveSettings(QSettings &settings) const override
iqtgui::TRestorableGuiWrap< CMultiPageGuiCompBase > BaseClass
virtual int GetDesignType() const override
Get the container UI mode.
virtual iqtgui::IGuiObject * GetPageGuiComponent(int pageIndex) const override
Get the UI component for a given page.
Common interface for GUI objects used in ACF component context.
Definition IGuiObject.h:133
A wrapper for saving/restoring of GUI component states in the application settings.
Standard GUI specific interfaces and components based on Qt.