diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 15:43:45 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 15:43:45 +0200 |
commit | ae0c828ac29043e7adc56a78fc18d816b32c12b4 (patch) | |
tree | 51cc9b30f40faa951fc029f72c5f5b5e573e863d /kkbswitch/kbswitchintf.cpp | |
download | kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.tar.gz kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.zip |
Initial import of kkbswitch 1.4.3
Diffstat (limited to 'kkbswitch/kbswitchintf.cpp')
-rw-r--r-- | kkbswitch/kbswitchintf.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/kkbswitch/kbswitchintf.cpp b/kkbswitch/kbswitchintf.cpp new file mode 100644 index 0000000..4e95839 --- /dev/null +++ b/kkbswitch/kbswitchintf.cpp @@ -0,0 +1,51 @@ +/*************************************************************************** + kbswitchintf.cpp - 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. * + * * + ***************************************************************************/ + +#include "kbswitchintf.h" +//#include <kapp.h> + +KBSwitchIntf::KBSwitchIntf(QObject *parent, KBConfig *conf) + : QObject(parent, "KBSwitchIntf"), DCOPObject("KBSwitchIntf") +{ + m_kbconf = conf; +} + +KBSwitchIntf::~KBSwitchIntf(){ +} + +int KBSwitchIntf::getNumKbdGroups() +{ + return m_kbconf->groupCount(); +} + +ASYNC KBSwitchIntf::selectNextGroup() +{ + emit nextGroupSelected(); +} + +ASYNC KBSwitchIntf::selectGroup(int groupno) +{ + emit groupSelected(groupno); +} + +QStringList KBSwitchIntf::getGroupNames() +{ + QStringList result; + for (int i = 0; i < m_kbconf->groupCount(); i++) + result.append(m_kbconf->getGroup(i)->getName()); + return result; +} |