ICF 3.0.5.47
Technical documentation of ICF Libraries
CModelDialogGuiComp.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 iqtgui_CModelDialogGuiComp_included
7#define iqtgui_CModelDialogGuiComp_included
8
9
10// ICF includes
11#include <imod/IObserver.h>
12#include <imod/IModel.h>
14
16
17
18namespace istdgui
19{
20
21
29 public imod::TSingleModelObserverBase<istd::IChangeable>
30{
31public:
34
35 I_BEGIN_COMPONENT(CModelDialogGuiComp);
36 I_REGISTER_INTERFACE(imod::IObserver);
37 I_ASSIGN(m_editorCompPtr, "Gui", "Editor for the model data", true, "ModelObserver");
38 I_ASSIGN(m_dataCompPtr, "Model", "Model data", false, "Model");
39 I_ASSIGN(m_workingModelFactoryCompPtr, "WorkingDataFactory", "Model factory using to create the working model data", true, "WorkingModelFactory");
40 I_ASSIGN_TO(m_workingDataFactoryCompPtr, m_workingModelFactoryCompPtr, true);
41 I_END_COMPONENT;
42
43 // reimplemented (istdgui::IDialog)
44 int ExecuteDialog(IGuiObject* parentPtr) override;
45
46private:
47 I_REF(imod::IObserver, m_editorCompPtr);
48 I_REF(istd::IChangeable, m_dataCompPtr);
49 I_FACT(imod::IModel, m_workingModelFactoryCompPtr);
50 I_FACT(istd::IChangeable, m_workingDataFactoryCompPtr);
51
52 std::unique_ptr<icomp::IComponent> m_workingObjectPtr;
53};
54
55
56} // namespace istdgui
57
58
59#endif // !iqtgui_CModelDialogGuiComp_included
60
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
Basic implementation for a single model observer with binding to concrete data object interface.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Dialog based representation of any UI-Component.
Component for the dialog based model editing.
imod::TSingleModelObserverBase< istd::IChangeable > BaseClass2
istdgui::CDialogGuiComp BaseClass
int ExecuteDialog(IGuiObject *parentPtr) override
Execute dialog instance.
Common interface for GUI objects using in component context.
Definition IGuiObject.h:27
Standard GUI specific interfaces and components based on Qt.

© Witold Gantzke and Kirill Lepskiy