* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+/// A specialized QWidgetAction, enhanced by some KDE features
+/** This declares/implements a subset of KAction's API (notably we've left out global shortcuts
+ * for now), which should make it easy to plug in KDE support later on.
+ */
- Q_PROPERTY(QShortcut shortcut READ shortcut WRITE setShortcut);
- Q_PROPERTY(bool shortcutConfigurable READ isShortcutConfigurable WRITE setShortcutConfigurable);
- Q_FLAGS(ShortcutType);
+ Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
+ Q_PROPERTY(bool shortcutConfigurable READ isShortcutConfigurable WRITE setShortcutConfigurable)
+ Q_FLAGS(ShortcutType)
explicit Action(QObject *parent);
Action(const QString &text, QObject *parent);
Action(const QIcon &icon, const QString &text, QObject *parent);
explicit Action(QObject *parent);
Action(const QString &text, QObject *parent);
Action(const QIcon &icon, const QString &text, QObject *parent);
- QShortcut shortcut(ShortcutTypes types = ActiveShortcut) const;
- void setShortcut(const QShortcut &shortcut, ShortcutTypes type = ActiveShortcut);
- void setShortcut(const QKeySequence &shortcut, ShortcutTypes type = ActiveShortcut);
+ 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));