CMultiParamsManagerGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtprm_CMultiParamsManagerGuiComp_included
2 #define iqtprm_CMultiParamsManagerGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QStackedWidget>
9 #else
10 #include <QtGui/QStackedWidget>
11 #endif
12 
13 // ACF includes
14 #include <iqt2d/IViewExtender.h>
15 
17 
18 
19 namespace iqtprm
20 {
21 
22 
24 {
25 public:
27 
28  I_BEGIN_COMPONENT(CMultiParamsManagerGuiComp);
29  I_ASSIGN_MULTI_0(m_paramsGuiCompPtr, "ParamsGui", "GUI object used to display parameters", false);
30  I_ASSIGN_TO(m_paramsObserverCompPtr, m_paramsGuiCompPtr, false);
31  I_ASSIGN_TO(m_viewExtendersCompPtr, m_paramsGuiCompPtr, false);
32  I_ASSIGN_MULTI_0(m_paramsSetTypeIdsAttrPtr, "ParamTypeIds", "The list of type IDs for supported parameter sets", true);
33  I_END_COMPONENT;
34 
36 
37 protected:
38  // reimplemented (CParamsManagerGuiCompBase)
39  virtual imod::IObserver* GetObserverPtr(const iprm::IParamsSet* paramsSetPtr) const;
40  virtual iqtgui::IGuiObject* GetEditorGuiPtr(const iprm::IParamsSet* paramsSetPtr) const;
41  virtual void UpdateParamsView(int selectedIndex);
43 
44  // reimplemented (iqtgui::CComponentBase)
45  virtual void OnGuiCreated();
46  virtual void OnGuiDestroyed();
47 
48 private:
49  I_MULTIREF(iqtgui::IGuiObject, m_paramsGuiCompPtr);
50  I_MULTIREF(imod::IObserver, m_paramsObserverCompPtr);
51  I_MULTIREF(iqt2d::IViewExtender, m_viewExtendersCompPtr);
52  I_MULTIATTR(QByteArray, m_paramsSetTypeIdsAttrPtr);
53 
54  QStackedWidget* m_parameterEditorStackPtr;
55 
56  typedef QMap<QWidget*, iqtgui::IGuiObject*> WidgetGuiMap;
57  typedef QMap<QByteArray /*parameter type ID*/, int /*Position in the page stack*/> TypeToStackPositionMap;
58  typedef QMap<QByteArray /*parameter type ID*/, iqt2d::IViewExtender* /*Corresponding view extender*/> TypeToExtenderMap;
59  typedef QMap<iqt2d::IViewProvider*, int> ConnectedSceneFlags; // maps connected scene provider to connection flags
60 
61  WidgetGuiMap m_widgetToGuiMap;
62  TypeToStackPositionMap m_typeToStackPositionMap;
63  TypeToExtenderMap m_typeToExtenderMap;
64 };
65 
66 
67 } // namespace iqtprm
68 
69 
70 #endif // !iqtprm_CMultiParamsManagerGuiComp_included
71 
72 
virtual void OnGuiDestroyed()
Called just before GUI is released.
Interface for GUI objects presenting its results using extern view objects.
Definition: IViewExtender.h:19
virtual iqtgui::IGuiObject * GetEditorGuiPtr(const iprm::IParamsSet *paramsSetPtr) const
Get the editor GUI for a given parameter set.
virtual imod::IObserver * GetObserverPtr(const iprm::IParamsSet *paramsSetPtr) const
Get the observer for a given parameter set.
virtual void UpdateParamsView(int selectedIndex)
Common interface for GUI objects using in component context.
Definition: IGuiObject.h:25
virtual iqt2d::IViewExtender * GetCurrentViewExtenderPtr() const
Get the currently active view extender.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition: IObserver.h:24
virtual void OnGuiCreated()
Called just after GUI is initialized.
Set of general parameters.
Definition: IParamsSet.h:23

© 2007-2017 Witold Gantzke and Kirill Lepskiy