ACF $AcfVersion:0$
ICommand.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#include <iprm/INameParam.h>
9
10
11namespace ibase
12{
13
14
19 virtual public iprm::INameParam,
20 virtual public iprm::IEnableableParam
21{
22public:
28 {
33 CF_PERMANENT = 0x0001,
34
39
44
48 CF_TOOLBAR = 0x0040,
49
53 CF_TOOLBOX = 0x0080,
54
58 CF_ONOFF = 0x0100,
59
63 CF_EXCLUSIVE = 0x0200
64 };
65
67 {
68 GI_NONE = -1,
70 GI_USER = 0x1000
71 };
72
76 virtual int GetPriority() const = 0;
77
83 virtual QByteArray GetCommandId() const = 0;
84
90 virtual int GetGroupId() const = 0;
91
96 virtual int GetStaticFlags() const = 0;
97
103 virtual bool Execute(istd::IPolymorphic* contextPtr) = 0;
104};
105
106
111
112
113} // namespace ibase
114
115
116
117
Provides single command for interaction with user.
Definition ICommand.h:21
StaticFlags
Flags indicating attributes of command.
Definition ICommand.h:28
@ CF_CONTEXT_MENU
Enable to use this command in context menu.
Definition ICommand.h:43
@ CF_PERMANENT
If this is enabled command will be permanent accessible, even if context is not active.
Definition ICommand.h:33
@ CF_EXCLUSIVE
Enable exclusive selection of this command with other commands in the same node with the same group I...
Definition ICommand.h:63
@ CF_TOOLBAR
Enable to use this command in application toolbar.
Definition ICommand.h:48
@ CF_TOOLBOX
Enable to use this command in separated toolbox.
Definition ICommand.h:53
@ CF_ONOFF
Inform that this command can be turned on or off (checkable).
Definition ICommand.h:58
@ CF_GLOBAL_MENU
Enable to use this command in global application menu.
Definition ICommand.h:38
virtual QByteArray GetCommandId() const =0
Get command ID used to identify the command in the command hierarchy.
virtual int GetPriority() const =0
Get priority in the same group.
virtual int GetGroupId() const =0
Get group ID used to decide if separator should be used.
virtual bool Execute(istd::IPolymorphic *contextPtr)=0
Execute this command.
virtual int GetStaticFlags() const =0
Get static flags of this command.
Interface for objects which can be enabled/disabled.
Interface for an object containing a name.
Definition INameParam.h:67
Base interface for all used interfaces and implementations.
Common interface to define the hierarchical graph structures.
This namespace contains basic implementations of standard primitives on the component level.
istd::TIHierarchical< ICommand > IHierarchicalCommand
Hierarchical command structure used to create dynamic menu structures.
Definition ICommand.h:110