summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power/light.cpp
authorsandman <sandman>2002-10-28 23:46:23 (UTC)
committer sandman <sandman>2002-10-28 23:46:23 (UTC)
commit4251429b30aaf4175c74f714ee01d59368c950f4 (patch) (side-by-side diff)
tree717fb8fd8f17780c86b4bca84acd490f3191d0bf /core/settings/light-and-power/light.cpp
parenta775c3be38fc7fbd5d120e7e3c1dd3a80a250293 (diff)
downloadopie-4251429b30aaf4175c74f714ee01d59368c950f4.zip
opie-4251429b30aaf4175c74f714ee01d59368c950f4.tar.gz
opie-4251429b30aaf4175c74f714ee01d59368c950f4.tar.bz2
- some minor UI fixes
- parameters for sensor light range were reversed - added reasonable calibration default values (at least on my 3870) - l&p now automatically shows the 'right' (Batt/AC) tab when started
Diffstat (limited to 'core/settings/light-and-power/light.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 2ea0356..c0ba60b 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -28,34 +28,18 @@
#include "settings.h"
-#include <qpe/global.h>
-#include <qpe/fontmanager.h>
#include <qpe/config.h>
-#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/power.h>
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
-#include <qlabel.h>
#include <qcheckbox.h>
-#include <qradiobutton.h>
#include <qtabwidget.h>
#include <qslider.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qmessagebox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
#include <qspinbox.h>
#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qdir.h>
-#if QT_VERSION >= 300
-#include <qstylefactory.h>
-#endif
#include <opie/odevice.h>
@@ -124,10 +108,14 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) );
criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) );
- if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online )
+ if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
connect ( brightness, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int )));
- else
+ tabs-> setCurrentPage ( 0 );
+ }
+ else {
connect ( brightness_ac_3, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int )));
+ tabs-> setCurrentPage ( 1 );
+ }
}
LightSettings::~LightSettings ( )