systemtray.h 1.79 KB
Newer Older
1 2 3
/***************************************************************************
                          systray.cpp  -  description
                             -------------------
4 5

    copyright            : (C) 2002 by Daniel Molkentin,
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    email                : molkentin@kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 SYSTEMTRAY_H
#define SYSTEMTRAY_H

#include <ksystemtray.h>

class QTimer;
24
class KPassivePopup;
25 26 27 28 29

class SystemTray : public KSystemTray
{
    Q_OBJECT

30
public:
31
    SystemTray(QWidget *parent = 0, const char *name = 0);
32
    virtual ~SystemTray();
33

34
private:
Scott Wheeler's avatar
Scott Wheeler committed
35
    virtual void wheelEvent(QWheelEvent *e);
36
    void createPopup();
Scott Wheeler's avatar
Scott Wheeler committed
37
    void setToolTip(const QString &tip = QString::null);
Scott Wheeler's avatar
Scott Wheeler committed
38
    void mousePressEvent(QMouseEvent *e);
39
    bool buttonsToLeft() const;
40
    QPixmap createPixmap(const QString &pixName);
41

42
private slots:
43
    void slotPlay();
44 45 46 47
    void slotPause() { setPixmap(m_pausePix); }
    void slotStop();

private:
48 49 50
    QPixmap m_playPix;
    QPixmap m_pausePix;
    QPixmap m_currentPix;
51 52
    QPixmap m_backPix;
    QPixmap m_forwardPix;
53
    QPixmap m_appPix;
54 55 56

    KPassivePopup *m_popup;
    QLabel *m_currentLabel;
57 58 59
};

#endif // SYSTEMTRAY_H