ksystemtray.h
/* This file is part of the KDE libraries
Copyright (C) 1999 Matthias Ettrich <ettrich@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KSYSTEMTRAY_H
#define KSYSTEMTRAY_H
#include <kglobal.h>
#include <qlabel.h>
class KActionCollection;
class KPopupMenu;
class KSystemTrayPrivate;
class KDEUI_EXPORT KSystemTray : public QLabel
{
Q_OBJECT
public:
KSystemTray( QWidget* parent = 0, const char* name = 0 );
/*
Destructor
*/
~KSystemTray();
KPopupMenu* contextMenu() const;
KActionCollection* actionCollection();
virtual void setPixmap( const QPixmap& icon );
virtual void setCaption( const QString& title );
static QPixmap loadIcon( const QString &icon, KInstance *instance=KGlobal::instance() );
signals:
void quitSelected();
public slots:
void toggleActive();
void setActive();
void setInactive();
protected:
void mousePressEvent( QMouseEvent * );
void mouseReleaseEvent( QMouseEvent * );
virtual void contextMenuAboutToShow( KPopupMenu* menu );
void showEvent( QShowEvent * );
void enterEvent( QEvent* );
private slots:
void minimizeRestoreAction();
void maybeQuit();
private:
void activateOrHide();
void minimizeRestore( bool restore );
KPopupMenu* menu;
// minimizeRestoreId is no longer needed. remove in KDE 4.0
int minimizeRestoreId;
uint hasQuit :1;
protected:
virtual void virtual_hook( int id, void* data );
private:
KSystemTrayPrivate* d;
};
#endif
KActionCollection
A managed set of KAction objects.
Definition: kactioncollection.h:78
KSystemTray
KDE System Tray Window class
Definition: ksystemtray.h:63
KInstance
KGlobal::instance
static KInstance * instance()

KDE Home | KDE Accessibility Home | Description of Access Keys