ACF $AcfVersion:0$
CCommandsBinderComp.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
7
9
11
13
14
15namespace iqtgui
16{
17
18
24 virtual public ibase::ICommandsProvider,
26{
27public:
29
30 I_BEGIN_COMPONENT(CCommandsBinderComp);
31 I_REGISTER_INTERFACE(ibase::ICommandsProvider);
32 I_ASSIGN_MULTI_0(m_commandProvidersCompPtr, "CommandProviders", "List of command providers", true);
33 I_END_COMPONENT;
34
36
37 // reimplemented (ibase::ICommandsProvider)
38 virtual const ibase::IHierarchicalCommand* GetCommands() const override;
39
40protected:
41 // reimplemented (imod::CMultiModelDispatcherBase)
42 void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
43
44 // reimplemented (icomp::CComponentBase)
45 virtual void OnComponentCreated() override;
46
47private:
48 void CreateCommands();
49private:
50 I_MULTIREF(ibase::ICommandsProvider, m_commandProvidersCompPtr);
51
52 mutable iqtgui::CHierarchicalCommand m_commands;
53
54 bool m_isUpdateLocked;
55};
56
57
58} // namespace iqtgui
59
60
61
62
Interface for a provider of the heriarchical commands.
Base class for component implementation.
Generic implementation of a data model changes notifier.
Component for binding of multiple command providers.
icomp::CComponentBase BaseClass
virtual const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
Called when some model observed by dispatcher will be changed.
virtual void OnComponentCreated() override
Implementation of hierarchical command based on QAction from Qt.
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.