CTeachableParamsDecoratorGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtinsp_CTeachableParamsDecoratorGuiComp_included
2 #define iqtinsp_CTeachableParamsDecoratorGuiComp_included
3 
4 
5 // ACF includes
6 #include <iprm/IParamsSet.h>
8 
9 // ACF-Solutions includes
11 
12 #include <GeneratedFiles/iqtinsp/ui_CTeachableParamsDecoratorGuiComp.h>
13 
14 
15 namespace iqtinsp
16 {
17 
18 
19 class CTeachableParamsDecoratorGuiComp: public iqtgui::TDesignerGuiObserverCompBase<Ui::CTeachableParamsDecoratorGuiComp, iprm::IParamsSet>
20 {
21  Q_OBJECT
22 
23 public:
25 
26  I_BEGIN_COMPONENT(CTeachableParamsDecoratorGuiComp);
27  I_ASSIGN(m_slaveEditorCompPtr, "SlaveEditor", "Slave editor will be displayed inside", true, "SlaveEditor");
28  I_ASSIGN_TO(m_slaveGuiCompPtr, m_slaveEditorCompPtr, true);
29  I_ASSIGN_TO(m_slaveObserverCompPtr, m_slaveEditorCompPtr, true);
30  I_ASSIGN(m_teachControllerCompPtr, "TeachController", "Teach controller for observed parameters", true, "TeachController");
31  I_END_COMPONENT;
32 
33  // reimplemented (imod::IModelEditor)
34  virtual void UpdateEditor(const istd::IChangeable::ChangeSet& changeSet);
35  virtual void UpdateModelFromEditor() const;
36  virtual bool IsReadOnly() const;
37  virtual void SetReadOnly(bool state);
38 
39  // reimplemented (imod::IObserver)
40  virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask);
41  virtual bool OnModelDetached(imod::IModel* modelPtr);
42 
43 protected:
44  void UpdateButtonsState();
45 
46  // reimplemented (iqtgui::CGuiComponentBase)
47  virtual void OnGuiCreated();
48  virtual void OnGuiDestroyed();
49 
50 protected Q_SLOTS:
53 
54 private:
55  I_REF(imod::IModelEditor, m_slaveEditorCompPtr);
56  I_REF(iqtgui::IGuiObject, m_slaveGuiCompPtr);
57  I_REF(imod::IObserver, m_slaveObserverCompPtr);
58  I_REF(iinsp::IModelTeachController, m_teachControllerCompPtr);
59 };
60 
61 
62 } // namespace iqtinsp
63 
64 
65 #endif // !iqtinsp_CTeachableParamsDecoratorGuiComp_included
66 
67 
iqtgui::TDesignerGuiObserverCompBase< Ui::CTeachableParamsDecoratorGuiComp, iprm::IParamsSet > BaseClass
virtual void UpdateModelFromEditor() const
Interface for someone controlling teaching of model data.
virtual void UpdateEditor(const istd::IChangeable::ChangeSet &changeSet)
virtual bool OnModelDetached(imod::IModel *modelPtr)
virtual void SetReadOnly(bool state)
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)

© 2007-2017 Witold Gantzke and Kirill Lepskiy