forked from qt-creator/qt-creator
Refactor the "proxy action" behavior of Command to Utils::ProxyAction
A generic action that acts as a proxy for another (changeable) action, like it is used for mostly all of the visible actions in Qt Creator through the action manager.
This commit is contained in:
@@ -54,12 +54,12 @@ class CORE_EXPORT Command : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum CommandAttribute {
|
||||
CA_Hide = 0x0100,
|
||||
CA_UpdateText = 0x0200,
|
||||
CA_UpdateIcon = 0x0400,
|
||||
CA_NonConfigureable = 0x8000,
|
||||
CA_Mask = 0xFF00
|
||||
CA_Hide,
|
||||
CA_UpdateText,
|
||||
CA_UpdateIcon,
|
||||
CA_NonConfigureable
|
||||
};
|
||||
Q_DECLARE_FLAGS(CommandAttributes, CommandAttribute)
|
||||
|
||||
virtual void setDefaultKeySequence(const QKeySequence &key) = 0;
|
||||
virtual QKeySequence defaultKeySequence() const = 0;
|
||||
@@ -95,4 +95,6 @@ signals:
|
||||
|
||||
} // namespace Core
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::Command::CommandAttributes)
|
||||
|
||||
#endif // COMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user