ACF $AcfVersion:0$
CCommandsMultiplexerComp.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
13
14
15namespace iqtgui
16{
17
18
23 public QObject,
24 public iqtgui::TDesignSchemaHandlerWrap<ibase::TLocalizableWrap<icomp::CComponentBase>>,
26 virtual public ibase::ICommandsProvider
27{
28public:
31
32 I_BEGIN_COMPONENT(CCommandsMultiplexerComp);
33 I_REGISTER_INTERFACE(ibase::ICommandsProvider);
34 I_ASSIGN(m_commandSelectionCompPtr, "CommandSelector", "Commands selector", true, "CommandSelector");
35 I_ASSIGN_TO(m_commandSelectionModelCompPtr, m_commandSelectionCompPtr, true);
36 I_ASSIGN_MULTI_0(m_commandProvidersCompPtr, "CommandProviders", "List if underlaying command providers", true);
37 I_ASSIGN_TO(m_commandProviderModelsCompPtr, m_commandProvidersCompPtr, false);
38 I_END_COMPONENT;
39
41
42 // reimpemented (ibase::ICommandsProvider)
43 virtual const ibase::IHierarchicalCommand* GetCommands() const override;
44
45protected:
46 // reimplemented (iqtgui::TDesignSchemaHandlerWrap)
47 virtual void OnDesignSchemaChanged(const QByteArray& themeId) override;
48
49 // reimplemented (ibase::TLocalizableWrap)
50 virtual void OnLanguageChanged() override;
51
52 // reimplemented (imod::IObserver)
53 virtual void BeforeUpdate(imod::IModel* modelPtr) override;
54 virtual void AfterUpdate(imod::IModel* modelPtr, const istd::IChangeable::ChangeSet& changeSet) override;
55
56 // reimpemented (icomp::CComponentBase)
57 virtual void OnComponentCreated() override;
58 virtual void OnComponentDestroyed() override;
59
60private:
61 I_REF(iprm::ISelectionParam, m_commandSelectionCompPtr);
62 I_REF(imod::IModel, m_commandSelectionModelCompPtr);
63 I_MULTIREF(ibase::ICommandsProvider, m_commandProvidersCompPtr);
64 I_MULTIREF(imod::IModel, m_commandProviderModelsCompPtr);
65};
66
67
68} // namespace iqtgui
69
70
71
72
Interface for a provider of the heriarchical commands.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:25
Interface allowing to select single option from list of options.
virtual void AfterUpdate(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
Callback invoked after an update of the observer's content occurs.
virtual void BeforeUpdate(imod::IModel *modelPtr) override
Callback invoked before an update of the observer's content occurs.
virtual const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
iqtgui::TDesignSchemaHandlerWrap< ibase::TLocalizableWrap< icomp::CComponentBase > > BaseClass
virtual void OnLanguageChanged() override
virtual void OnComponentDestroyed() override
virtual void OnComponentCreated() override
virtual void OnDesignSchemaChanged(const QByteArray &themeId) override
Set of change flags (its IDs).
Definition IChangeable.h:36
Common interface to define the hierarchical graph structures.
Standard GUI specific interfaces and components based on Qt.