/***************************************************************************
- * 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 *
#ifndef ACTION_H_
#define ACTION_H_
+#ifndef HAVE_KDE
+
#include <QShortcut>
#include <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));
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