/******************************************************************* * brightnessosdwidget.h * adapted from kdemultimedia/kmix/osdwidget.h * Copyright 2009 Aurélien Gâteau * Copyright 2009 Dario Andres Rodriguez * Copyright 2009 Christian Esken * Copyright 2010 Felix Geyer * * 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. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * ******************************************************************/ #ifndef BRIGHTNESSOSDWIDGET__H #define BRIGHTNESSOSDWIDGET__H #include "powerdevilbackendinterface.h" #include #include class QTimer; namespace Plasma { class Label; class Meter; } class BrightnessOSDWidget : public Plasma::Dialog { Q_OBJECT public: BrightnessOSDWidget(PowerDevil::BackendInterface::BrightnessControlType type, QWidget * parent = 0); void setCurrentBrightness(int brightnessLevel); void activateOSD(); protected slots: void themeUpdated(); private: PowerDevil::BackendInterface::BrightnessControlType m_type; QGraphicsScene *m_scene; QGraphicsWidget *m_container; Plasma::Label *m_iconLabel; Plasma::Label *m_volumeLabel; Plasma::Meter *m_meter; QTimer *m_hideTimer; QPixmap m_brightnessPixmap; }; #endif