- Action(const QString &text, QObject *parent);
- Action(const QIcon &icon, const QString &text, QObject *parent);
+ Action(const QString &text, QObject *parent, const QObject *receiver = 0, const char *slot = 0, const QKeySequence &shortcut = 0);
+ Action(const QIcon &icon, const QString &text, QObject *parent, const QObject *receiver = 0, const char *slot = 0, const QKeySequence &shortcut = 0);
+
+ QKeySequence shortcut(ShortcutTypes types = ActiveShortcut) const;
+ void setShortcut(const QShortcut &shortcut, ShortcutTypes type = ShortcutTypes(ActiveShortcut | DefaultShortcut));
+ void setShortcut(const QKeySequence &shortcut, ShortcutTypes type = ShortcutTypes(ActiveShortcut | DefaultShortcut));
+
+ bool isShortcutConfigurable() const;
+ void setShortcutConfigurable(bool configurable);
+
+signals:
+ void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+
+private:
+ void init();
+
+private slots:
+ void slotTriggered();
+};