summaryrefslogtreecommitdiffstats
path: root/kkbswitch/kbswitchintf.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-08-18 15:43:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-08-18 15:43:45 +0200
commitae0c828ac29043e7adc56a78fc18d816b32c12b4 (patch)
tree51cc9b30f40faa951fc029f72c5f5b5e573e863d /kkbswitch/kbswitchintf.h
downloadkkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.tar.gz
kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.zip
Initial import of kkbswitch 1.4.3
Diffstat (limited to 'kkbswitch/kbswitchintf.h')
-rw-r--r--kkbswitch/kbswitchintf.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/kkbswitch/kbswitchintf.h b/kkbswitch/kbswitchintf.h
new file mode 100644
index 0000000..16466c0
--- /dev/null
+++ b/kkbswitch/kbswitchintf.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ kbswitchintf.h - description
+ -------------------
+ begin : Sun Aug 12 2001
+ copyright : (C) 2001 by Leonid Zeitlin
+ email : lz@europe.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KBSWITCHINTF_H
+#define KBSWITCHINTF_H
+
+#include <dcopobject.h>
+#include <qobject.h>
+#include <qstringlist.h>
+
+#include "kbconfig.h"
+
+/**This class implements DCOP bindings for KBSwitch
+ *@author Leonid Zeitlin
+ */
+
+/* Interesting to note: moc failed on this file when the k_dcop section immediately
+ followed the signals section (the error message was "syntax error"). After I
+ separated the signals and k_dcop sections with the public section everything worked.
+ Apparently, the k_dcop "keyword" confuses moc, which is only natural given that
+ moc doesn't know about dcopidl! */
+class KBSwitchIntf : public QObject, public DCOPObject {
+ K_DCOP
+ Q_OBJECT
+signals:
+ void nextGroupSelected();
+ void groupSelected(int groupno);
+public:
+ KBSwitchIntf(QObject *parent, KBConfig *conf);
+ ~KBSwitchIntf();
+private:
+ KBConfig *m_kbconf;
+k_dcop:
+ int getNumKbdGroups();
+ ASYNC selectNextGroup();
+ ASYNC selectGroup(int groupno);
+ QStringList getGroupNames();
+};
+
+#endif