00001 /* 00002 This file is part of the OPIE Project 00003 =. Copyright (c) 2002 Maximilian Reiss <harlekin@handhelds.org> 00004 .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 00005 .>+-= 00006 _;:, .> :=|. This file is free software; you can 00007 .> <`_, > . <= redistribute it and/or modify it under 00008 :`=1 )Y*s>-.-- : the terms of the GNU General Public 00009 .="- .-=="i, .._ License as published by the Free Software 00010 - . .-<_> .<> Foundation; either version 2 of the License, 00011 ._= =} : or (at your option) any later version. 00012 .%`+i> _;_. 00013 .i_,=:_. -<s. This file is distributed in the hope that 00014 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 00015 : .. .:, . . . without even the implied warranty of 00016 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 00017 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General 00018 ..}^=.= = ; Public License for more details. 00019 ++= -. .` .: 00020 : = ...= . :.=- You should have received a copy of the GNU 00021 -. .:....=;==+<; General Public License along with this file; 00022 -_. . . )=. = see the file COPYING. If not, write to the 00023 -- :-=` Free Software Foundation, Inc., 00024 59 Temple Place - Suite 330, 00025 Boston, MA 02111-1307, USA. 00026 00027 */ 00028 #ifndef __LIGHT_H__ 00029 #define __LIGHT_H__ 00030 00031 #include "lightsettingsbase.h" 00032 00033 #include <qstringlist.h> 00034 #include <qlistbox.h> 00035 00036 class QTimer; 00037 00038 class LightSettings : public LightSettingsBase 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 LightSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00044 ~LightSettings(); 00045 static QString appName() { return QString::fromLatin1("light-and-power"); } 00046 00047 protected: 00048 virtual void accept(); 00049 virtual void done ( int r ); 00050 00051 protected slots: 00052 virtual void calibrateSensor ( ); 00053 virtual void calibrateSensorAC ( ); 00054 void setBacklight ( int ); 00055 void setContrast ( int ); 00056 void setFrequency ( int ); 00057 void setCloseHingeAction ( int ); 00058 void resetBacklight ( ); 00059 00060 private: 00061 int m_bres; 00062 int m_cres; 00063 int m_oldcontrast; 00064 int m_oldfreq; 00065 QTimer *m_resettimer; 00066 QStringList m_sensordata; 00067 QStringList m_sensordata_ac; 00068 }; 00069 00070 00071 #endif 00072
1.4.2