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

© 2007-2017 Witold Gantzke and Kirill Lepskiy