summaryrefslogtreecommitdiffstats
path: root/kkbswitch/kbswitchintf.h
blob: 703254a6ec486d2db4c90b70324b5899a7da2f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 <ntqobject.h>
#include <ntqstringlist.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 TQObject, public DCOPObject  {
  K_DCOP
  Q_OBJECT
signals:
  void nextGroupSelected();	
  void groupSelected(int groupno);
public:
	KBSwitchIntf(TQObject *parent, KBConfig *conf);
	~KBSwitchIntf();
private:
	KBConfig *m_kbconf;
k_dcop:
  int getNumKbdGroups();
  ASYNC selectNextGroup();
  ASYNC selectGroup(int groupno);
  TQStringList getGroupNames();
};

#endif