1 /*
2     Copyright (C) 2016  P.L. Lucas <selairi@gmail.com>
3 
4     This library is free software; you can redistribute it and/or
5     modify it under the terms of the GNU Lesser General Public
6     License as published by the Free Software Foundation; either
7     version 2.1 of the License, or (at your option) any later version.
8 
9     This library is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12     Lesser General Public License for more details.
13 
14     You should have received a copy of the GNU Lesser General Public
15     License along with this library; if not, write to the Free Software
16     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18 
19 #ifndef __MONITOR_INFO_H__
20 #define __MONITOR_INFO_H__
21 
22 #include <QString>
23 
24 
25 /** This class represents backlight and brightness values of screen.
26  * If backlight is supported, backlight power of screen can be changed.
27  * Brightness represents color saturation.
28  */
29 class MonitorInfo
30 {
31 public:
32     MonitorInfo(int id, QString name, long backlightMax);
33     MonitorInfo(const MonitorInfo &monitor);
34 
35     bool isBacklightSupported() const;
36     long backlight() const;
37     long backlightMax() const;
38     void setBacklight(const long value);
39 
40     float brightness() const;
41     /**Brightness is a number between 0 and 2.*/
42     void setBrightness(const float percent);
43 
44     int id() const;
45     QString name() const;
46 
47 private:
48     long mBacklightMax;
49     long mBacklight;
50 
51     float mBrightness;
52 
53     QString mName;
54     int mId;
55 };
56 
57 #endif
58 
59