CCommandsBinderComp.h
Go to the documentation of this file.
1 #ifndef iqtgui_CCommandsBinderComp_included
2 #define iqtgui_CCommandsBinderComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 
9 
11 
13 
14 
15 namespace iqtgui
16 {
17 
18 
23  public icomp::CComponentBase,
24  virtual public ibase::ICommandsProvider,
26 {
27 public:
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;
39 
40 protected:
41  // reimplemented (imod::CMultiModelDispatcherBase)
42  void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
43 
44  // reimplemented (icomp::CComponentBase)
45  virtual void OnComponentCreated();
46 
47 private:
48  void CreateCommands();
49 private:
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 #endif // !iqtgui_CCommandsBinderComp_included
62 
63 
Implementation of hierarchical command based on QAction from Qt.
Base class for component implementation.
Generic implementation of a data model changes notifier.
Interface for a provider of the heriarchical commands.
virtual void OnComponentCreated()
virtual const ibase::IHierarchicalCommand * GetCommands() const
Get list of menu commands.
Common interface to define the hierarchical graph structures.
Component for binding of multiple command providers.
icomp::CComponentBase BaseClass
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
Set of change flags (its IDs).
Definition: IChangeable.h:30

© 2007-2017 Witold Gantzke and Kirill Lepskiy