X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Faction.h;h=bbf00d2a412a9e3ff4be955745a06a5188a9217c;hp=378d45da177b2703bdc24df511c69930483f59e6;hb=328b48e6fbd78d6158eb55296c0843fc5a41bcfa;hpb=952da9aeecc6c778a7c3cd62b1ecfdc13b24bc8b diff --git a/src/uisupport/action.h b/src/uisupport/action.h index 378d45da..bbf00d2a 100644 --- a/src/uisupport/action.h +++ b/src/uisupport/action.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,6 +23,8 @@ #ifndef ACTION_H_ #define ACTION_H_ +#ifndef HAVE_KDE + #include #include @@ -45,8 +47,8 @@ class Action : public QWidgetAction { Q_DECLARE_FLAGS(ShortcutTypes, ShortcutType) explicit Action(QObject *parent); - 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)); @@ -67,4 +69,20 @@ class Action : public QWidgetAction { Q_DECLARE_OPERATORS_FOR_FLAGS(Action::ShortcutTypes) +#else /* HAVE_KDE */ +#include + +class Action : public KAction { + Q_OBJECT + + public: + explicit Action(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); + + private: + void init(); +}; +#endif + #endif