ICF 3.1.1.10
Technical documentation of ICF Libraries
CTeachableParamsDecoratorGuiComp.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 iqtinsp_CTeachableParamsDecoratorGuiComp_included
7#define iqtinsp_CTeachableParamsDecoratorGuiComp_included
8
9
10// ICF includes
11#include <iprm/IParamsSet.h>
14
15#include <GeneratedFiles/iinspgui/ui_CTeachableParamsDecoratorGuiComp.h>
16
17
18namespace iinspgui
19{
20
21
22class CTeachableParamsDecoratorGuiComp: public istdgui::TDesignerGuiObserverCompBase<Ui::CTeachableParamsDecoratorGuiComp, iprm::IParamsSet>
23{
24 Q_OBJECT
25
26public:
28
29 I_BEGIN_COMPONENT(CTeachableParamsDecoratorGuiComp);
30 I_ASSIGN(m_slaveEditorCompPtr, "SlaveEditor", "Slave editor will be displayed inside", true, "SlaveEditor");
31 I_ASSIGN_TO(m_slaveGuiCompPtr, m_slaveEditorCompPtr, true);
32 I_ASSIGN_TO(m_slaveObserverCompPtr, m_slaveEditorCompPtr, true);
33 I_ASSIGN(m_teachControllerCompPtr, "TeachController", "Teach controller for observed parameters", true, "TeachController");
34 I_END_COMPONENT;
35
36 // reimplemented (imod::IModelEditor)
37 void UpdateEditor(const istd::IChangeable::ChangeSet& changeSet) override;
38 void UpdateModelFromEditor() const override;
39 bool IsReadOnly() const override;
40 void SetReadOnly(bool state) override;
41
42 // reimplemented (imod::IObserver)
43 bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask) override;
44 bool OnModelDetached(imod::IModel* modelPtr) override;
45
46protected:
48
49 // reimplemented (istdgui::CGuiComponentBase)
50 void OnGuiCreated() override;
51 void OnGuiDestroyed() override;
52
53protected Q_SLOTS:
56
57private:
58 I_REF(imod::IModelEditor, m_slaveEditorCompPtr);
59 I_REF(istdgui::IGuiObject, m_slaveGuiCompPtr);
60 I_REF(imod::IObserver, m_slaveObserverCompPtr);
61 I_REF(iinsp::IModelTeachController, m_teachControllerCompPtr);
62};
63
64
65} // namespace iinspgui
66
67
68#endif // !iqtinsp_CTeachableParamsDecoratorGuiComp_included
69
70
Interface for someone controlling teaching of model data.
void OnGuiCreated() override
Called just after GUI is initialized.
void UpdateEditor(const istd::IChangeable::ChangeSet &changeSet) override
Updates editor with model data.
bool IsReadOnly() const override
Returns true if the model data can be changed.
void OnGuiDestroyed() override
Called just before GUI is released.
bool OnModelDetached(imod::IModel *modelPtr) override
This call back function will be called, if an observable object is about to be detached.
void UpdateModelFromEditor() const override
Updates model from editor.
void SetReadOnly(bool state) override
Set flag that the model data can be changed.
bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
This call back function will be called, if an observable object is about to be attached.
istdgui::TDesignerGuiObserverCompBase< Ui::CTeachableParamsDecoratorGuiComp, iprm::IParamsSet > BaseClass
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
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.
Contains Qt based implementations of inspection classes and components.

© Witold Gantzke and Kirill Lepskiy