~ubuntu-branches/ubuntu/lucid/kkbswitch/lucid

« back to all changes in this revision

Viewing changes to kkbswitch/kbswitchtrayicon.h

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2005-09-07 02:01:14 UTC
  • Revision ID: james.westby@ubuntu.com-20050907020114-2wyo9eu21uihq86n
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 *                                                                         *
 
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.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef KBSWITCHTRAYICON_H
 
19
#define KBSWITCHTRAYICON_H
 
20
 
 
21
#include <ksystemtray.h>
 
22
 
 
23
#include "kbgroup.h"
 
24
#include "kbconfig.h"
 
25
 
 
26
/**The tray icon showing the current keyboard group
 
27
  *@author Leonid Zeitlin
 
28
  */
 
29
 
 
30
class KBSwitchTrayIcon : public KSystemTray  {
 
31
  Q_OBJECT
 
32
public: 
 
33
        KBSwitchTrayIcon(KBConfig *conf);
 
34
        ~KBSwitchTrayIcon();
 
35
  /** No descriptions */
 
36
  void setToggleGroups(int group1, int group2);
 
37
  /** No descriptions */
 
38
  void reconfigure();
 
39
  /** Update the tray icon display for the given group */
 
40
  void updateTrayIcon(int groupno);
 
41
signals:
 
42
  void groupSelected(int groupno);      
 
43
  /** No descriptions */
 
44
  void clicked();
 
45
  /** No descriptions */
 
46
  void preferencesSelected();
 
47
private slots: // Private slots
 
48
  /** No descriptions */
 
49
  void slotMenuActivated(int id);
 
50
  /** Display help */
 
51
  void slotHelp();
 
52
private: // Private attributes
 
53
  /**  */
 
54
  KBConfig *m_kbconf;
 
55
protected: // Protected methods
 
56
  /** No descriptions */
 
57
  void mouseReleaseEvent(QMouseEvent *event);
 
58
public slots: // Public slots
 
59
  /** No descriptions */
 
60
  void slotAbout();
 
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);
 
70
};
 
71
 
 
72
#endif