~ubuntu-branches/ubuntu/lucid/kkbswitch/lucid

« back to all changes in this revision

Viewing changes to kkbswitch/kbswitchintf.h

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2005-09-07 02:01:14 UTC
  • Revision ID: james.westby@ubuntu.com-20050907020114-2wyo9eu21uihq86n
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          kbswitchintf.h  -  description
 
3
                             -------------------
 
4
    begin                : Sun Aug 12 2001
 
5
    copyright            : (C) 2001 by Leonid Zeitlin
 
6
    email                : lz@europe.com
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef KBSWITCHINTF_H
 
19
#define KBSWITCHINTF_H
 
20
 
 
21
#include <dcopobject.h>
 
22
#include <qobject.h>
 
23
#include <qstringlist.h>
 
24
 
 
25
#include "kbconfig.h"
 
26
 
 
27
/**This class implements DCOP bindings for KBSwitch
 
28
  *@author Leonid Zeitlin
 
29
  */
 
30
 
 
31
/* Interesting to note: moc failed on this file when the k_dcop section immediately
 
32
   followed the signals section (the error message was "syntax error"). After I
 
33
   separated the signals and k_dcop sections with the public section everything worked.
 
34
   Apparently, the k_dcop "keyword" confuses moc, which is only natural given that
 
35
   moc doesn't know about dcopidl! */
 
36
class KBSwitchIntf : public QObject, public DCOPObject  {
 
37
  K_DCOP
 
38
  Q_OBJECT
 
39
signals:
 
40
  void nextGroupSelected();     
 
41
  void groupSelected(int groupno);
 
42
public:
 
43
        KBSwitchIntf(QObject *parent, KBConfig *conf);
 
44
        ~KBSwitchIntf();
 
45
private:
 
46
        KBConfig *m_kbconf;
 
47
k_dcop:
 
48
  int getNumKbdGroups();
 
49
  ASYNC selectNextGroup();
 
50
  ASYNC selectGroup(int groupno);
 
51
  QStringList getGroupNames();
 
52
};
 
53
 
 
54
#endif