CSelectableParamsSetGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtprm_CSelectableParamsSetGuiComp_included
2 #define iqtprm_CSelectableParamsSetGuiComp_included
3 
4 
5 // ACF includes
6 #include <iprm/IParamsSet.h>
8 
9 
10 namespace iqtprm
11 {
12 
13 
19 {
20 public:
22 
23  I_BEGIN_COMPONENT(CSelectableParamsSetGuiComp);
24  I_ASSIGN_MULTI_0(m_slaveObserversCompPtr, "Editors", "Editors for the parameters in the parameter set", true);
25  I_END_COMPONENT;
26 
27 public:
29 
30  // reimplemented (imod::CSingleModelObserverBase)
31  virtual void BeforeUpdate(imod::IModel* modelPtr);
32  virtual void AfterUpdate(imod::IModel* modelPtr, const istd::IChangeable::ChangeSet& changeSet);
33 
34 protected:
35  // reimplemented (iqtgui::TGuiObserverWrap)
36  virtual void OnGuiModelAttached();
37  virtual void OnGuiModelDetached();
38 
39 private:
40  void EnsureDetachLastEditor();
41  void ConnectCurrentEditor();
42 
43  iprm::IParamsSet* ExtractParamsSetPtr(imod::IModel* modelPtr) const;
44 
45 private:
46  int m_currentParamsSetIndex;
47 
48  I_MULTIREF(imod::IObserver, m_slaveObserversCompPtr);
49 };
50 
51 
52 } // namespace iqtprm
53 
54 
55 #endif // !iqtprm_CSelectableParamsSetGuiComp_included
56 
57 
Component to show any selected GUI, implemented as observer of iprm::ISelectionParam.
virtual void AfterUpdate(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
This function will be called after update of the observer contents occures.
virtual void BeforeUpdate(imod::IModel *modelPtr)
This function will be called before update of the observer contents occures.
virtual void OnGuiModelAttached()
Called when model is attached and GUI is created.
Editor for the selected parameter in the parameter manager.
virtual void OnGuiModelDetached()
Called when model is detached or GUI is destroyed.
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
Set of general parameters.
Definition: IParamsSet.h:23

© 2007-2017 Witold Gantzke and Kirill Lepskiy