tdebacklightdevice.h
00001 /* This file is part of the TDE libraries 00002 Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net> 00003 (C) 2013 Golubev Alexander <fatzer2@gmail.com> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef _TDEBACKLIGHTDEVICE_H 00021 #define _TDEBACKLIGHTDEVICE_H 00022 00023 #include "tdegenericdevice.h" 00024 #include "tdehwcommontypes.h" 00025 00026 class TDECORE_EXPORT TDEBacklightDevice : public TDEGenericDevice 00027 { 00028 public: 00033 TDEBacklightDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null); 00034 00038 ~TDEBacklightDevice(); 00039 00043 TDEDisplayPowerLevel::TDEDisplayPowerLevel powerLevel(); 00044 00048 int brightnessSteps(); 00049 00053 double brightnessPercent(); 00054 00058 bool canSetBrightness(); 00059 00063 int rawBrightness(); 00064 00068 void setRawBrightness(int br); 00069 00070 protected: 00075 void internalSetPowerLevel(TDEDisplayPowerLevel::TDEDisplayPowerLevel pl); 00076 00081 void internalSetMaximumRawBrightness(int br); 00082 00087 void internalSetCurrentRawBrightness(int br); 00088 00089 private: 00090 TDEDisplayPowerLevel::TDEDisplayPowerLevel m_powerLevel; 00091 int m_currentBrightness; 00092 int m_maximumBrightness; 00093 00094 friend class TDEHardwareDevices; 00095 }; 00096 00097 #endif // _TDEBACKLIGHTDEVICE_H