source: lumina/lumina-desktop/panel-plugins/battery/LBattery.h @ 9d0ec76

releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since 9d0ec76 was 9d0ec76, checked in by Ken Moore <ken@…>, 8 months ago

Update lumina-desktop to use the new abilities in LuminaOS instead of the GLobals.h file. Now all the OS-specific stuff is contained in a single location.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1//===========================================
2//  Lumina-DE source code
3//  Copyright (c) 2014, Susanne Jaeckel
4//  Available under the 3-clause BSD license
5//  See the LICENSE file for full details
6//===========================================
7#ifndef _LUMINA_DESKTOP_BATTERY_H
8#define _LUMINA_DESKTOP_BATTERY_H
9
10#include <QTimer>
11#include <QWidget>
12#include <QString>
13#include <QLabel>
14
15#include <LuminaUtils.h>
16#include <LuminaXDG.h>
17#include <LuminaOS.h>
18
19#include "../../Globals.h"
20//#include "../LTBWidget.h"
21#include "../LPPlugin.h"
22
23class LBattery : public LPPlugin{
24        Q_OBJECT
25public:
26        LBattery(QWidget *parent = 0, QString id = "battery", bool horizontal=true);
27        ~LBattery();
28       
29private:
30        QTimer *timer;
31        QLabel *label;
32        int iconOld;
33       
34private slots:
35        void updateBattery(bool force = false);
36        QString getRemainingTime();
37
38public slots:
39        void OrientationChange(){
40          if(this->layout()->direction()==QBoxLayout::LeftToRight){
41            label->setFixedSize( QSize(this->height(), this->height()) );
42          }else{
43            label->setFixedSize( QSize(this->width(), this->width()) );
44          }
45          updateBattery(true); //force icon refresh
46        }
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.