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:
con
2011-01-12 09:45:19 +01:00
parent 20f0088ec9
commit e7ad89ffd8
9 changed files with 369 additions and 166 deletions

View File

@@ -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