1
/*******************************************************************
3
* Copyright 2009 Aurélien Gâteau <agateau@kde.org>
4
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
5
* Copyright 2009 Christian Esken <christian.esken@arcor.de>
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of
10
* the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
******************************************************************/
25
#include <QGraphicsView>
30
class QGraphicsWidget;
39
class OSDWidget : public QGraphicsView
43
OSDWidget(QWidget * parent = 0);
45
void setCurrentVolume(int volumeLevel, bool muted);
48
virtual QSize sizeHint() const;
51
virtual void drawBackground(QPainter *painter, const QRectF &rectF);
52
virtual void resizeEvent(QResizeEvent *);
55
Plasma::FrameSvg *m_background;
56
QGraphicsScene *m_scene;
57
QGraphicsWidget *m_container;
58
Plasma::Label *m_iconLabel;
59
Plasma::Label *m_volumeLabel;
60
Plasma::Meter *m_meter;
63
QPixmap m_volumeHighPixmap;
64
QPixmap m_volumeMediumPixmap;
65
QPixmap m_volumeLowPixmap;
66
QPixmap m_volumeMutedPixmap;