ICF 3.0.5.47
Technical documentation of ICF Libraries
CMultiParamsManagerGuiComp.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 iqtprm_CMultiParamsManagerGuiComp_included
7#define iqtprm_CMultiParamsManagerGuiComp_included
8
9
10// Qt includes
11#include <QtCore/QtGlobal>
12#include <QtWidgets/QStackedWidget>
13
14// ICF includes
16
18
19
20namespace iprmgui
21{
22
23
25{
26public:
28
29 I_BEGIN_COMPONENT(CMultiParamsManagerGuiComp);
30 I_ASSIGN_MULTI_0(m_paramsGuiCompPtr, "ParamsGui", "GUI object used to display parameters", false);
31 I_ASSIGN_TO(m_paramsObserverCompPtr, m_paramsGuiCompPtr, false);
32 I_ASSIGN_TO(m_viewExtendersCompPtr, m_paramsGuiCompPtr, false);
33 I_ASSIGN_MULTI_0(m_paramsSetTypeIdsAttrPtr, "ParamTypeIds", "The list of type IDs for supported parameter sets", true);
34 I_END_COMPONENT;
35
37
38protected:
39 // reimplemented (CParamsManagerGuiCompBase)
40 imod::IObserver* GetEditorObserver(const iprm::IParamsSet* paramsSetPtr) const override;
41 istdgui::IGuiObject* GetEditorGui(const iprm::IParamsSet* paramsSetPtr) const override;
42 void UpdateParamsView(int selectedIndex) override;
44
45 // reimplemented (istdgui::CComponentBase)
46 void OnGuiCreated() override;
47 void OnGuiDestroyed() override;
48
49private:
50 I_MULTIREF(istdgui::IGuiObject, m_paramsGuiCompPtr);
51 I_MULTIREF(imod::IObserver, m_paramsObserverCompPtr);
52 I_MULTIREF(i2dgui::IViewExtender, m_viewExtendersCompPtr);
53 I_MULTIATTR(QByteArray, m_paramsSetTypeIdsAttrPtr);
54
55 QStackedWidget* m_parameterEditorStackPtr;
56
57 typedef QMap<QWidget*, istdgui::IGuiObject*> WidgetGuiMap;
58 typedef QMap<QByteArray /*parameter type ID*/, int /*Position in the page stack*/> TypeToStackPositionMap;
59 typedef QMap<QByteArray /*parameter type ID*/, i2dgui::IViewExtender* /*Corresponding view extender*/> TypeToExtenderMap;
60 typedef QMap<i2dgui::IViewProvider*, int> ConnectedSceneFlags; // maps connected scene provider to connection flags
61
62 WidgetGuiMap m_widgetToGuiMap;
63 TypeToStackPositionMap m_typeToStackPositionMap;
64 TypeToExtenderMap m_typeToExtenderMap;
65};
66
67
68} // namespace iprmgui
69
70
71#endif // !iqtprm_CMultiParamsManagerGuiComp_included
72
73
Interface for GUI objects presenting its results using extern view objects.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:30
Set of general parameters.
Definition IParamsSet.h:29
void OnGuiDestroyed() override
Called just before GUI is released.
istdgui::IGuiObject * GetEditorGui(const iprm::IParamsSet *paramsSetPtr) const override
Get the editor GUI for a given parameter set.
void UpdateParamsView(int selectedIndex) override
imod::IObserver * GetEditorObserver(const iprm::IParamsSet *paramsSetPtr) const override
Get the observer for a given parameter set.
i2dgui::IViewExtender * GetCurrentViewExtenderPtr() const override
Get the currently active view extender.
void OnGuiCreated() override
Called just after GUI is initialized.
Common interface for GUI objects using in component context.
Definition IGuiObject.h:27
This package contains Qt based implementations of standard parameter components.

© Witold Gantzke and Kirill Lepskiy