diff options
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; +} |