ACF $AcfVersion:0$
CVariableParamGuiComp.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 <QtCore/QString>
7
9
10#include <iprm/IVariableParam.h>
11
13
14#include <iqt2d/IViewExtender.h>
15
16#include <iqtprm/iqtprm.h>
17#include <GeneratedFiles/iqtprm/ui_CVariableParamGuiComp.h>
18
19
20namespace iqtprm
21{
22
23
25 public iqtgui::TDesignerGuiObserverCompBase<Ui::CVariableParamGuiComp, iprm::IVariableParam>,
27{
28 Q_OBJECT
29
30public:
32
33 I_BEGIN_COMPONENT(CVariableParamGuiComp);
34 I_REGISTER_INTERFACE(iqt2d::IViewExtender);
35 I_ASSIGN_MULTI_0(m_editorsCompPtr, "Editors", "List of editor GUI's for each parameter type ID", true);
36 I_ASSIGN_TO(m_guisCompPtr, m_editorsCompPtr, true);
37 I_ASSIGN_TO(m_observersCompPtr, m_editorsCompPtr, true);
38 I_ASSIGN_TO(m_extendersCompPtr, m_editorsCompPtr, false);
39 I_ASSIGN_MULTI_0(m_typeIdsAttrPtr, "TypeIds", "List of ID for each variable type", true);
40 I_ASSIGN_MULTI_0(m_typeNamesAttrPtr, "TypeNames", "List of ID for each variable type", false);
41 I_END_COMPONENT;
42
44
45
46 // reimplemented (imod::IObserver)
47 virtual bool OnModelDetached(imod::IModel* modelPtr) override;
48
49 // reimplemented (iqt2d::IViewExtender)
50 virtual void AddItemsToScene(iqt2d::IViewProvider* providerPtr, int flags) override;
51 virtual void RemoveItemsFromScene(iqt2d::IViewProvider* providerPtr) override;
52
53protected:
56
57 // reimplemented (iqtgui::TGuiObserverWrap)
58 virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
59
60 // reimplemented (iqtgui::CGuiComponentBase)
61 virtual void OnGuiCreated() override;
62 virtual void OnGuiDestroyed() override;
63
64protected Q_SLOTS:
66
67private:
68 I_MULTIREF(imod::IModelEditor, m_editorsCompPtr);
69 I_MULTIREF(iqtgui::IGuiObject, m_guisCompPtr);
70 I_MULTIREF(imod::IObserver, m_observersCompPtr);
71 I_MULTIREF(iqt2d::IViewExtender, m_extendersCompPtr);
72 I_MULTIATTR(QString, m_typeIdsAttrPtr);
73 I_MULTITEXTATTR(m_typeNamesAttrPtr);
74
75 typedef QMap<iqt2d::IViewProvider*, int> ConnectedSceneFlags; // maps connected scene provider to connection flags
76 ConnectedSceneFlags m_connectedSceneFlags;
77
78 imod::IModel* m_lastParamModelPtr;
79 int m_currentTypeIndex;
80};
81
82
83} // namespace iqtprm
84
85
86
87
Common interface for an model editor.
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
Interface for GUI objects presenting its results using extern view objects.
Interface for GUI objects managing view.
Common interface for GUI objects used in ACF component context.
Definition IGuiObject.h:133
Base class for all Qt GUI components.
virtual void RemoveItemsFromScene(iqt2d::IViewProvider *providerPtr) override
Called when items should be removed from specified scene.
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
iqtgui::TDesignerGuiObserverCompBase< Ui::CVariableParamGuiComp, iprm::IVariableParam > BaseClass
void on_TypeSelectorCB_currentIndexChanged(int index)
virtual bool OnModelDetached(imod::IModel *modelPtr) override
virtual void OnGuiDestroyed() override
virtual void OnGuiCreated() override
virtual void AddItemsToScene(iqt2d::IViewProvider *providerPtr, int flags) override
Called when items should be added to specified scene.
Set of change flags (its IDs).
Definition IChangeable.h:36
#define I_MULTITEXTATTR(member)
Declare translatable multiple text attribute member.
This package contains Qt based implementations of standard parameter components.