ACF $AcfVersion:0$
CModelDialogGuiComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <imod/IObserver.h>
7#include <imod/IModel.h>
10
11
12namespace iqtgui
13{
14
15
23 public imod::TSingleModelObserverBase<istd::IChangeable>
24{
25public:
28
29 I_BEGIN_COMPONENT(CModelDialogGuiComp);
30 I_REGISTER_INTERFACE(imod::IObserver);
31 I_ASSIGN(m_editorCompPtr, "Gui", "Editor for the model data", true, "ModelObserver");
32 I_ASSIGN(m_dataCompPtr, "Model", "Model data", false, "Model");
33 I_ASSIGN(m_workingModelFactoryCompPtr, "WorkingDataFactory", "Model factory using to create the working model data", true, "WorkingModelFactory");
34 I_ASSIGN_TO(m_workingDataFactoryCompPtr, m_workingModelFactoryCompPtr, true);
35 I_END_COMPONENT;
36
37 // reimplemented (iqtgui::IDialog)
38 virtual int ExecuteDialog(IGuiObject* parentPtr) override;
39
40private:
41 I_REF(imod::IObserver, m_editorCompPtr);
42 I_REF(istd::IChangeable, m_dataCompPtr);
43 I_FACT(imod::IModel, m_workingModelFactoryCompPtr);
44 I_FACT(istd::IChangeable, m_workingDataFactoryCompPtr);
45
46 icomp::IComponentUniquePtr m_workingObjectPtr;
47};
48
49
50} // namespace iqtgui
51
52
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:25
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:156
Basic implementation for a single model observer with binding to concrete data object interface.
Dialog based representation of any UI-Component.
Component for the dialog based model editing.
imod::TSingleModelObserverBase< istd::IChangeable > BaseClass2
virtual int ExecuteDialog(IGuiObject *parentPtr) override
Execute dialog instance.
iqtgui::CDialogGuiComp BaseClass
Common interface for GUI objects used in ACF component context.
Definition IGuiObject.h:133
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
std::unique_ptr< IComponent > IComponentUniquePtr
Definition IComponent.h:72
Standard GUI specific interfaces and components based on Qt.