KKBSwitch – keyboard layout indicator
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.

kbswitchintf.cpp 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /***************************************************************************
  2. kbswitchintf.cpp - description
  3. -------------------
  4. begin : Sun Aug 12 2001
  5. copyright : (C) 2001 by Leonid Zeitlin
  6. email : lz@europe.com
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #include "kbswitchintf.h"
  17. //#include <kapp.h>
  18. KBSwitchIntf::KBSwitchIntf(TQObject *parent, KBConfig *conf)
  19. : TQObject(parent, "KBSwitchIntf"), DCOPObject("KBSwitchIntf")
  20. {
  21. m_kbconf = conf;
  22. }
  23. KBSwitchIntf::~KBSwitchIntf(){
  24. }
  25. int KBSwitchIntf::getNumKbdGroups()
  26. {
  27. return m_kbconf->groupCount();
  28. }
  29. ASYNC KBSwitchIntf::selectNextGroup()
  30. {
  31. emit nextGroupSelected();
  32. }
  33. ASYNC KBSwitchIntf::selectGroup(int groupno)
  34. {
  35. emit groupSelected(groupno);
  36. }
  37. TQStringList KBSwitchIntf::getGroupNames()
  38. {
  39. TQStringList result;
  40. for (int i = 0; i < m_kbconf->groupCount(); i++)
  41. result.append(m_kbconf->getGroup(i)->getName());
  42. return result;
  43. }
  44. #include "kbswitchintf.moc"