6#ifndef iqtgui_CHierarchicalCommand_included
7#define iqtgui_CHierarchicalCommand_included
11#include <QtCore/QString>
12#include <QtGui/QAction>
43 explicit CHierarchicalCommand(
const QString& name =
"",
int priority = 100,
int staticFlags = CF_GLOBAL_MENU,
int groupId = GI_NORMAL);
83 void SetVisuals(
const QString& name,
const QString& shortName,
const QString& description,
const QIcon& icon = QIcon());
89 bool Execute(istd::IPolymorphic* contextPtr)
override;
96 void SetName(
const QString& name)
override;
135 typedef std::vector<istd::TOptDelPtr<CHierarchicalCommand>> Childs;
Provides single command for interaction with user.
Basic implementation of IEnableableParam interface.
Implementation of a named object over iprm::INameParam interface.
Represent input/output persistence archive.
Common interface for data model objects, which can be changed.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Template based implementation of a hierarchical object.
Common interface to define the hierarchical graph structures.
Pointer wrapper providing activatable deleting pointed object during destruction.
Implementation of hierarchical command based on QAction from Qt.
bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
std::unique_ptr< istd::IChangeable > CloneMe(istd::IChangeable::CompatibilityMode mode=istd::IChangeable::CM_WITHOUT_REFS) const override
Make a copy of this object.
int GetSupportedOperations() const override
Get set of flags for supported operations.
void ResetChilds()
Reset list of childs.
bool IsEqual(const istd::IChangeable &object) const override
Compare this object with another object.
iprm::CNameParam BaseClass3
bool operator!=(const CHierarchicalCommand &command) const
int GetGroupId() const override
int GetStaticFlags() const override
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
void SetStaticFlags(int flags)
void SetGroupId(int groupId)
int FindTheSameCommand(const ibase::IHierarchicalCommand &command) const
Find the same command in child list.
void InsertChild(istd::TOptDelPtr< CHierarchicalCommand > &&commandPtr, int index=-1)
Insert command to child list.
bool Execute(istd::IPolymorphic *contextPtr) override
void SetName(const QString &name) override
Set the object name.
ibase::ICommand * GetChild(int index) const override
Get child value.
void JoinLinkFrom(const ibase::IHierarchicalCommand *rootPtr)
Joint the second root as links.
CHierarchicalCommand & operator=(const CHierarchicalCommand &command)
bool SetEnabled(bool isEnabled=true) override
Set something to isEnabled state.
int GetPriority() const override
bool operator==(const CHierarchicalCommand &command) const
void SetPriority(int priority)
int GetChildsCount() const override
Get number of childs.
void SetVisuals(const QString &name, const QString &shortName, const QString &description, const QIcon &icon=QIcon())
Set all visual elements of this command.
int FindInsertingIndex(int priority) const
Find index where element with specified priority should be inserted.
CHierarchicalCommand(const QString &name="", int priority=100, int staticFlags=CF_GLOBAL_MENU, int groupId=GI_NORMAL)
void RemoveChild(int index)
Remove child at specified index.
iprm::CEnableableParam BaseClass2
Standard GUI specific interfaces and components based on Qt.