You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.6 KiB
52 lines
1.6 KiB
11 years ago
|
/***************************************************************************
|
||
|
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;
|
||
|
}
|