ACF $AcfVersion:0$
CSelectableParamsSetGuiComp.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 <iprm/IParamsSet.h>
8
9
10namespace iqtprm
11{
12
13
19{
20public:
22
23 I_BEGIN_COMPONENT(CSelectableParamsSetGuiComp);
24 I_ASSIGN_MULTI_0(m_slaveObserversCompPtr, "Editors", "Editors for the parameters in the parameter set", true);
25 I_END_COMPONENT;
26
27public:
29
30 // reimplemented (imod::CSingleModelObserverBase)
31 virtual void BeforeUpdate(imod::IModel* modelPtr) override;
32 virtual void AfterUpdate(imod::IModel* modelPtr, const istd::IChangeable::ChangeSet& changeSet) override;
33
34protected:
35 // reimplemented (iqtgui::TGuiObserverWrap)
36 virtual void OnGuiModelAttached() override;
37 virtual void OnGuiModelDetached() override;
38
39private:
40 void EnsureDetachLastEditor();
41 void ConnectCurrentEditor();
42
43 iprm::IParamsSet* ExtractParamsSetPtr(imod::IModel* modelPtr) const;
44
45private:
46 int m_currentParamsSetIndex;
47
48 I_MULTIREF(imod::IObserver, m_slaveObserversCompPtr);
49};
50
51
52} // namespace iqtprm
53
54
55
56
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
Set of general parameters.
Definition IParamsSet.h:81
Component to show any selected GUI, implemented as observer of iprm::ISelectionParam.
Editor for the selected parameter in the parameter manager.
virtual void OnGuiModelAttached() override
virtual void OnGuiModelDetached() override
virtual void AfterUpdate(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
virtual void BeforeUpdate(imod::IModel *modelPtr) override
Set of change flags (its IDs).
Definition IChangeable.h:36
This package contains Qt based implementations of standard parameter components.