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.

kbswitchtrayicon.h 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /***************************************************************************
  2. kbswitchtrayicon.h - description
  3. -------------------
  4. begin : Wed Jul 4 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. #ifndef KBSWITCHTRAYICON_H
  17. #define KBSWITCHTRAYICON_H
  18. #include <ksystemtray.h>
  19. #include "kbgroup.h"
  20. #include "kbconfig.h"
  21. /**The tray icon showing the current keyboard group
  22. *@author Leonid Zeitlin
  23. */
  24. class KBSwitchTrayIcon : public KSystemTray {
  25. Q_OBJECT
  26. public:
  27. KBSwitchTrayIcon(KBConfig *conf);
  28. ~KBSwitchTrayIcon();
  29. /** No descriptions */
  30. void setToggleGroups(int group1, int group2);
  31. /** No descriptions */
  32. void reconfigure();
  33. /** Update the tray icon display for the given group */
  34. void updateTrayIcon(int groupno);
  35. signals:
  36. void groupSelected(int groupno);
  37. /** No descriptions */
  38. void clicked();
  39. /** No descriptions */
  40. void preferencesSelected();
  41. private slots: // Private slots
  42. /** No descriptions */
  43. void slotMenuActivated(int id);
  44. /** Display help */
  45. void slotHelp();
  46. private: // Private attributes
  47. /** */
  48. KBConfig *m_kbconf;
  49. protected: // Protected methods
  50. /** No descriptions */
  51. void mouseReleaseEvent(TQMouseEvent *event);
  52. public slots: // Public slots
  53. /** No descriptions */
  54. void slotAbout();
  55. /** Update menu and tray icons after configuration has changed */
  56. void slotUpdateIcons();
  57. private: // Private methods
  58. /** No descriptions */
  59. void addLayoutItems(TDEPopupMenu *menu, bool clearOld);
  60. /** No descriptions */
  61. void updateMenuIcons();
  62. /** No descriptions */
  63. void setActiveGroup(int groupno);
  64. };
  65. #endif