• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
ksystemtray.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1999 Matthias Ettrich <ettrich@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18#ifndef KSYSTEMTRAY_H
19#define KSYSTEMTRAY_H
20
21#include <tdeglobal.h>
22#include <tqlabel.h>
23
24class TDEActionCollection;
25class TDEPopupMenu;
26class KSystemTrayPrivate;
27
63class TDEUI_EXPORT KSystemTray : public TQLabel
64{
65 TQ_OBJECT
66public:
67
81 KSystemTray( TQWidget* parent = 0, const char* name = 0 );
82
83 /*
84 Destructor
85 */
86 ~KSystemTray();
87
92 TDEPopupMenu* contextMenu() const;
93
99 TDEActionCollection* actionCollection();
100
104 virtual void setPixmap( const TQPixmap& icon );
105
110 virtual void setCaption( const TQString& title );
111
120 static TQPixmap loadIcon( const TQString &icon, TDEInstance *instance=TDEGlobal::instance() );
121
131 static TQPixmap loadSizedIcon( const TQString &icon, int iconWidth, TDEInstance *instance=TDEGlobal::instance() );
132
133signals:
139 void quitSelected();
140
141public slots:
142
150 void toggleActive();
155 void setActive();
160 void setInactive();
161
162protected:
163
170 void mousePressEvent( TQMouseEvent * );
171
178 void mouseReleaseEvent( TQMouseEvent * );
179
180
181
186 virtual void contextMenuAboutToShow( TDEPopupMenu* menu );
187
191 void showEvent( TQShowEvent * );
192
196 void enterEvent( TQEvent* );
197
198private slots:
199 void minimizeRestoreAction();
200 void maybeQuit();
201
202private:
203 void activateOrHide();
204 void minimizeRestore( bool restore );
205 TDEPopupMenu* menu;
206 // minimizeRestoreId is no longer needed. remove in KDE 4.0
207 int minimizeRestoreId;
208 uint hasQuit :1;
209protected:
210 virtual void virtual_hook( int id, void* data );
211private:
212 KSystemTrayPrivate* d;
213};
214
215
216#endif
KSystemTray::loadSizedIcon
static TQPixmap loadSizedIcon(const TQString &icon, int iconWidth, TDEInstance *instance=TDEGlobal::instance())
Loads an icon icon using the icon loader class of the given instance instance.
Definition ksystemtray.cpp:323
KSystemTray::KSystemTray
KSystemTray(TQWidget *parent=0, const char *name=0)
Construct a KSystemTray widget just like any other widget.
Definition ksystemtray.cpp:61
KSystemTray::toggleActive
void toggleActive()
Toggles the state of the window associated with this system tray icon (hides it, shows it or activate...
Definition ksystemtray.cpp:222
KSystemTray::setInactive
void setInactive()
Hides the window associated with this system tray icon, regardless of its current state.
Definition ksystemtray.cpp:232
KSystemTray::showEvent
void showEvent(TQShowEvent *)
Reimplemented for internal reasons.
Definition ksystemtray.cpp:111
KSystemTray::contextMenu
TDEPopupMenu * contextMenu() const
Access to the context menu.
Definition ksystemtray.cpp:139
KSystemTray::contextMenuAboutToShow
virtual void contextMenuAboutToShow(TDEPopupMenu *menu)
Makes it easy to adjust some menu items right before the context menu becomes visible.
Definition ksystemtray.cpp:178
KSystemTray::actionCollection
TDEActionCollection * actionCollection()
Easy access to the actions in the context menu Currently includes KStdAction::Quit and minimizeRestor...
Definition ksystemtray.cpp:310
KSystemTray::quitSelected
void quitSelected()
Emitted when quit is selected in the menu.
KSystemTray::mouseReleaseEvent
void mouseReleaseEvent(TQMouseEvent *)
Reimplemented to provide the standard show/raise behavior for the parentWidget() and the context menu...
Definition ksystemtray.cpp:173
KSystemTray::setPixmap
virtual void setPixmap(const TQPixmap &icon)
Changes the tray's icon.
Definition ksystemtray.cpp:328
KSystemTray::loadIcon
static TQPixmap loadIcon(const TQString &icon, TDEInstance *instance=TDEGlobal::instance())
Loads an icon icon using the icon loader class of the given instance instance.
Definition ksystemtray.cpp:315
KSystemTray::enterEvent
void enterEvent(TQEvent *)
Reimplemented for internal reasons.
Definition ksystemtray.cpp:134
KSystemTray::mousePressEvent
void mousePressEvent(TQMouseEvent *)
Reimplemented to provide the standard show/raise behavior for the parentWidget() and the context menu...
Definition ksystemtray.cpp:145
KSystemTray::setCaption
virtual void setCaption(const TQString &title)
Changes the tray's text description (which can be seen e.g.
Definition ksystemtray.cpp:341
KSystemTray::setActive
void setActive()
Activates the window associated with this system tray icon, regardless of its current state.
Definition ksystemtray.cpp:227
TDEActionCollection
A managed set of TDEAction objects.
Definition tdeactioncollection.h:79
TDEGlobal::instance
static TDEInstance * instance()
TDEInstance
TDEPopupMenu
A menu with title items.
Definition tdepopupmenu.h:123

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.15.0
This website is maintained by Timothy Pearson.