1
/***************************************************************************
2
kbswitchtrayicon.h - description
5
copyright : (C) 2001 by Leonid Zeitlin
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef KBSWITCHTRAYICON_H
19
#define KBSWITCHTRAYICON_H
21
#include <ksystemtray.h>
26
/**The tray icon showing the current keyboard group
27
*@author Leonid Zeitlin
30
class KBSwitchTrayIcon : public KSystemTray {
33
KBSwitchTrayIcon(KBConfig *conf);
35
/** No descriptions */
36
void setToggleGroups(int group1, int group2);
37
/** No descriptions */
39
/** Update the tray icon display for the given group */
40
void updateTrayIcon(int groupno);
42
void groupSelected(int groupno);
43
/** No descriptions */
45
/** No descriptions */
46
void preferencesSelected();
47
private slots: // Private slots
48
/** No descriptions */
49
void slotMenuActivated(int id);
52
private: // Private attributes
55
protected: // Protected methods
56
/** No descriptions */
57
void mouseReleaseEvent(QMouseEvent *event);
58
public slots: // Public slots
59
/** No descriptions */
61
/** Update menu and tray icons after configuration has changed */
62
void slotUpdateIcons();
63
private: // Private methods
64
/** No descriptions */
65
void addLayoutItems(KPopupMenu *menu, bool clearOld);
66
/** No descriptions */
67
void updateMenuIcons();
68
/** No descriptions */
69
void setActiveGroup(int groupno);