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