Support KAction and KActionCollection
[quassel.git] / src / uisupport / action.h
index 325beda..3e90ca6 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef ACTION_H_
 #define ACTION_H_
 
+#ifndef HAVE_KDE
+
 #include <QShortcut>
 #include <QWidgetAction>
 
@@ -67,4 +69,20 @@ class Action : public QWidgetAction {
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(Action::ShortcutTypes)
 
+#else /* HAVE_KDE */
+#include <KAction>
+
+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