ICF 3.1.1.10
Technical documentation of ICF Libraries
CVariableParamGuiComp.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_CVariableParamGuiComp_included
7#define iqtprm_CVariableParamGuiComp_included
8
9
10// ICF includes
11#include <QtCore/QString>
12
14
15#include <iprm/IVariableParam.h>
16
18
20
21#include <iprmgui/iprmgui.h>
22#include <GeneratedFiles/iprmgui/ui_CVariableParamGuiComp.h>
23
24
25namespace iprmgui
26{
27
28
30 public istdgui::TDesignerGuiObserverCompBase<Ui::CVariableParamGuiComp, iprm::IVariableParam>,
32{
33 Q_OBJECT
34
35public:
37
38 I_BEGIN_COMPONENT(CVariableParamGuiComp);
39 I_REGISTER_INTERFACE(i2dgui::IViewExtender);
40 I_ASSIGN_MULTI_0(m_editorsCompPtr, "Editors", "List of editor GUI's for each parameter type ID", true);
41 I_ASSIGN_TO(m_guisCompPtr, m_editorsCompPtr, true);
42 I_ASSIGN_TO(m_observersCompPtr, m_editorsCompPtr, true);
43 I_ASSIGN_TO(m_extendersCompPtr, m_editorsCompPtr, false);
44 I_ASSIGN_MULTI_0(m_typeIdsAttrPtr, "TypeIds", "List of ID for each variable type", true);
45 I_ASSIGN_MULTI_0(m_typeNamesAttrPtr, "TypeNames", "List of ID for each variable type", false);
46 I_END_COMPONENT;
47
49
50
51 // reimplemented (imod::IObserver)
52 bool OnModelDetached(imod::IModel* modelPtr) override;
53
54 // reimplemented (i2dgui::IViewExtender)
55 void AddItemsToScene(i2dgui::IViewProvider* providerPtr, int flags) override;
56 void RemoveItemsFromScene(i2dgui::IViewProvider* providerPtr) override;
57
58protected:
61
62 // reimplemented (istdgui::TGuiObserverWrap)
63 void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
64
65 // reimplemented (istdgui::CGuiComponentBase)
66 void OnGuiCreated() override;
67 void OnGuiDestroyed() override;
68
69protected Q_SLOTS:
71
72private:
73 I_MULTIREF(imod::IModelEditor, m_editorsCompPtr);
74 I_MULTIREF(istdgui::IGuiObject, m_guisCompPtr);
75 I_MULTIREF(imod::IObserver, m_observersCompPtr);
76 I_MULTIREF(i2dgui::IViewExtender, m_extendersCompPtr);
77 I_MULTIATTR(QString, m_typeIdsAttrPtr);
78 I_MULTITEXTATTR(m_typeNamesAttrPtr);
79
80 typedef QMap<i2dgui::IViewProvider*, int> ConnectedSceneFlags; // maps connected scene provider to connection flags
81 ConnectedSceneFlags m_connectedSceneFlags;
82
83 imod::IModel* m_lastParamModelPtr;
84 int m_currentTypeIndex;
85};
86
87
88} // namespace iprmgui
89
90
91#endif // !iqtprm_CVariableParamGuiComp_included
92
93
Interface for GUI objects presenting its results using extern view objects.
Interface for GUI objects managing view.
Common interface for an model editor.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:30
bool OnModelDetached(imod::IModel *modelPtr) override
This call back function will be called, if an observable object is about to be detached.
istdgui::TDesignerGuiObserverCompBase< Ui::CVariableParamGuiComp, iprm::IVariableParam > BaseClass
void OnGuiDestroyed() override
Called just before GUI is released.
void AddItemsToScene(i2dgui::IViewProvider *providerPtr, int flags) override
Called when items should be added to specified scene.
void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
void on_TypeSelectorCB_currentIndexChanged(int index)
void OnGuiCreated() override
Called just after GUI is initialized.
void RemoveItemsFromScene(i2dgui::IViewProvider *providerPtr) override
Called when items should be removed from specified scene.
Set of change flags (its IDs).
Definition IChangeable.h:38
Common interface for GUI objects using in component context.
Definition IGuiObject.h:27
Base class for all Qt GUI components.
This package contains Qt based implementations of standard parameter components.

© Witold Gantzke and Kirill Lepskiy