author | sandman <sandman> | 2002-12-29 18:41:55 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-29 18:41:55 (UTC) |
commit | 7c3dceb16d9007e2c36b2b83e2a499cda3411138 (patch) (side-by-side diff) | |
tree | 78a0945be9233099ca7e5e4e01d8b78364f009cb | |
parent | f8673391881545af514054babe47fdc162770a72 (diff) | |
download | opie-7c3dceb16d9007e2c36b2b83e2a499cda3411138.zip opie-7c3dceb16d9007e2c36b2b83e2a499cda3411138.tar.gz opie-7c3dceb16d9007e2c36b2b83e2a499cda3411138.tar.bz2 |
Power warning changes:
- interval can now be in the range (0 [Never] ... 300 [5min] )
- some code cleanup in the launcher
-rw-r--r-- | core/launcher/desktop.cpp | 22 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 20 |
3 files changed, 29 insertions, 15 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index fa9736f..03a23dc 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -1,537 +1,535 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "desktop.h" #include "info.h" #include "launcher.h" #include "qcopbridge.h" #include "shutdownimpl.h" #include "startmenu.h" #include "taskbar.h" #include "transferserver.h" #include "irserver.h" #include "packageslave.h" #include "screensaver.h" #include <qpe/applnk.h> #include <qpe/mimetype.h> #include <qpe/password.h> #include <qpe/config.h> #include <qpe/power.h> #include <qpe/timeconversion.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/network.h> #include <qpe/global.h> #if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ ) #include <qpe/custom.h> #endif #include <opie/odevice.h> #include <qgfx_qws.h> #include <qmainwindow.h> #include <qmessagebox.h> #include <qtimer.h> #include <qwindowsystem_qws.h> #include <qvaluelist.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> using namespace Opie; class QCopKeyRegister { public: QCopKeyRegister() : keyCode( 0 ) { } QCopKeyRegister( int k, const QCString &c, const QCString &m ) : keyCode( k ), channel( c ), message( m ) { } int getKeyCode() const { return keyCode; } QCString getChannel() const { return channel; } QCString getMessage() const { return message; } private: int keyCode; QCString channel, message; }; typedef QValueList<QCopKeyRegister> KeyRegisterList; KeyRegisterList keyRegisterList; static Desktop* qpedesktop = 0; static int loggedin = 0; static void login( bool at_poweron ) { if ( !loggedin ) { Global::terminateBuiltin( "calibrate" ); Password::authenticate( at_poweron ); loggedin = 1; QCopEnvelope e( "QPE/Desktop", "unlocked()" ); } } bool Desktop::screenLocked() { return loggedin == 0; } /* Priority is number of alerts that are needed to pop up alert. */ class DesktopPowerAlerter : public QMessageBox { public: DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) : QMessageBox( tr( "Battery Status" ), "Low Battery", QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, QMessageBox::NoButton, QMessageBox::NoButton, parent, name, FALSE ) { currentPriority = INT_MAX; alertCount = 0; } void alert( const QString &text, int priority ); void hideEvent( QHideEvent * ); private: int currentPriority; int alertCount; }; void DesktopPowerAlerter::alert( const QString &text, int priority ) { alertCount++; if ( alertCount < priority ) return ; if ( priority > currentPriority ) return ; currentPriority = priority; setText( text ); show(); } void DesktopPowerAlerter::hideEvent( QHideEvent *e ) { QMessageBox::hideEvent( e ); alertCount = 0; currentPriority = INT_MAX; } void DesktopApplication::switchLCD ( bool on ) { if ( qApp ) { DesktopApplication *dapp = (DesktopApplication *) qApp; if ( dapp-> m_screensaver ) { if ( on ) { dapp-> m_screensaver-> setDisplayState ( true ); dapp-> m_screensaver-> setBacklight ( -3 ); } else { dapp-> m_screensaver-> setDisplayState ( false ); } } } } DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) : QPEApplication( argc, argv, appType ) { - - Config cfg( "apm" ); - cfg.setGroup( "Warnings" ); - //cfg.readNumEntry( "checkinterval", 10000 ) - m_powerVeryLow = cfg.readNumEntry( "powerverylow", 10 ); - m_powerCritical = cfg.readNumEntry( "powercritical", 5 ); - m_ps = new PowerStatus; m_ps_last = new PowerStatus; pa = new DesktopPowerAlerter( 0 ); - m_timer = new QTimer( this ); - connect( m_timer, SIGNAL( timeout() ), this, SLOT( apmTimeout() ) ); - m_timer->start( 5000 ); + m_apm_timer = new QTimer ( this ); + connect ( m_apm_timer, SIGNAL( timeout ( )), this, SLOT( apmTimeout ( ))); + reloadPowerWarnSettings ( ); m_last_button = 0; m_button_timer = new QTimer ( ); connect ( m_button_timer, SIGNAL( timeout ( )), this, SLOT( sendHeldAction ( ))); channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); channel = new QCopChannel( "QPE/Launcher", this ); connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), this, SLOT( launcherMessage( const QCString&, const QByteArray& ) ) ); m_screensaver = new OpieScreenSaver ( ); m_screensaver-> setInterval ( -1 ); QWSServer::setScreenSaver( m_screensaver ); rereadVolumes(); connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); apmTimeout ( ); grabKeyboard ( ); } DesktopApplication::~DesktopApplication() { ungrabKeyboard ( ); delete m_ps; delete m_ps_last; delete pa; } void DesktopApplication::apmTimeout() { qpedesktop->checkMemory(); // in case no events are being generated *m_ps_last = *m_ps; *m_ps = PowerStatusManager::readStatus(); if ( m_ps-> acStatus ( ) != m_ps_last-> acStatus ( )) m_screensaver-> powerStatusChanged ( *m_ps ); if ( m_ps-> acStatus ( ) != PowerStatus::Online ) { int bat = m_ps-> batteryPercentRemaining ( ); if ( bat < m_ps_last-> batteryPercentRemaining ( )) { if ( bat <= m_powerCritical ) pa->alert( tr( "Battery level is critical!\nKeep power off until power restored!" ), 1 ); else if ( bat <= m_powerVeryLow ) pa->alert( tr( "Battery is running very low." ), 2 ); } if ( m_ps-> backupBatteryStatus ( ) == PowerStatus::VeryLow ) pa->alert( tr( "The Back-up battery is very low.\nPlease charge the back-up battery." ), 2 ); } } void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) { QDataStream stream ( data, IO_ReadOnly ); if ( msg == "setScreenSaverInterval(int)" ) { int time; stream >> time; m_screensaver-> setInterval( time ); } else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { int t1, t2, t3; stream >> t1 >> t2 >> t3; m_screensaver-> setIntervals( t1, t2, t3 ); } else if ( msg == "setBacklight(int)" ) { int bright; stream >> bright; m_screensaver-> setBacklight( bright ); } else if ( msg == "setScreenSaverMode(int)" ) { int mode; stream >> mode; m_screensaver-> setMode ( mode ); } else if ( msg == "reloadPowerWarnSettings()" ) { reloadPowerWarnSettings(); } else if ( msg == "setDisplayState(int)" ) { int state; stream >> state; m_screensaver-> setDisplayState ( state != 0 ); } else if ( msg == "suspend()" ) { emit power(); } else if ( msg == "sendBusinessCard()" ) { QString card = ::getenv ( "HOME" ); card += "/Applications/addressbook/businesscard.vcf"; if ( QFile::exists( card ) ) { QCopEnvelope e ( "QPE/Obex", "send(QString,QString,QString)" ); QString mimetype = "text/x-vCard"; e << tr( "business card" ) << card << mimetype; } } } void DesktopApplication::reloadPowerWarnSettings() { Config cfg( "apm" ); cfg.setGroup( "Warnings" ); - // m_timer->changeInterval( cfg.readNumEntry( "checkinterval", 10000 ) ); + int iv = cfg. readNumEntry ( "checkinterval", 10000 ); + + m_apm_timer-> stop ( ); + if ( iv ) + m_apm_timer-> start ( iv ); + m_powerVeryLow = cfg.readNumEntry( "powerverylow", 10 ); m_powerCritical = cfg.readNumEntry( "powervcritical", 5 ); } enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown; void DesktopApplication::launcherMessage( const QCString & msg, const QByteArray & data ) { QDataStream stream ( data, IO_ReadOnly ); if ( msg == "deviceButton(int,int,int)" ) { int keycode, press, autoRepeat; stream >> keycode >> press >> autoRepeat; const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( keycode ); if ( db ) checkButtonAction ( db, keycode, press, autoRepeat ); } else if ( msg == "keyRegister(int,QCString,QCString)" ) { int k; QCString c, m; stream >> k >> c >> m; keyRegisterList.append ( QCopKeyRegister ( k, c, m )); } } void DesktopApplication::sendHeldAction ( ) { if ( m_last_button ) { m_last_button-> heldAction ( ). send ( ); m_last_button = 0; } } -void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int keycode, bool press, bool autoRepeat ) +void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat ) { if ( db ) { if ( !press && !autoRepeat && m_button_timer-> isActive ( )) { m_button_timer-> stop ( ); if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) { db-> pressedAction ( ). send ( ); } } else if ( press && !autoRepeat ) { m_button_timer-> stop ( ); if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) { m_last_button = db; m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true ); } } } } bool DesktopApplication::eventFilter ( QObject *o, QEvent *e ) { if ( e-> type ( ) == QEvent::KeyPress || e-> type ( ) == QEvent::KeyRelease ) { QKeyEvent *ke = (QKeyEvent *) e; const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( )); if ( db ) { checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )); return true; } } return QPEApplication::eventFilter ( o, e ); } #ifdef Q_WS_QWS bool DesktopApplication::qwsEventFilter( QWSEvent *e ) { qpedesktop->checkMemory(); if ( e->type == QWSEvent::Key ) { QWSKeyEvent * ke = (QWSKeyEvent *) e; ushort keycode = ke-> simpleData. keycode; if ( !loggedin && keycode != Key_F34 ) return true; bool press = ke-> simpleData. is_press; bool autoRepeat = ke-> simpleData. is_auto_repeat; if ( !keyboardGrabbed ( )) { // app that registers key/message to be sent back to the app, when it doesn't have focus, // when user presses key, unless keyboard has been requested from app. // will not send multiple repeats if user holds key // i.e. one shot if ( keycode != 0 && press && !autoRepeat ) { for ( KeyRegisterList::Iterator it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { if (( *it ). getKeyCode ( ) == keycode ) { QCopEnvelope (( *it ). getChannel ( ), ( *it ). getMessage ( )); return true; } } } } if ( keycode == HardKey_Suspend ) { if ( press ) emit power ( ); return true; } else if ( keycode == HardKey_Backlight ) { if ( press ) emit backlight ( ); return true; } else if ( keycode == Key_F32 ) { if ( press ) QCopEnvelope e( "QPE/Desktop", "startSync()" ); return true; } else if ( keycode == Key_F31 && !ke-> simpleData. modifiers ) { // Symbol Key -> show Unicode IM if ( press ) emit symbol ( ); return true; } else if ( keycode == Key_NumLock ) { if ( press ) emit numLockStateToggle ( ); } else if ( keycode == Key_CapsLock ) { if ( press ) emit capsLockStateToggle(); } if (( press && !autoRepeat ) || ( !press && autoRepeat )) { if ( m_keyclick_sound ) ODevice::inst ( )-> keySound ( ); } } else if ( e-> type == QWSEvent::Mouse ) { QWSMouseEvent * me = ( QWSMouseEvent * ) e; static bool up = true; if ( me-> simpleData. state & LeftButton ) { if ( up ) { up = false; if ( m_screentap_sound ) ODevice::inst ( ) -> touchSound ( ); } } else { up = true; } } return QPEApplication::qwsEventFilter ( e ); } #endif #if defined(QPE_HAVE_MEMALERTER) QPE_MEMALERTER_IMPL #endif //=========================================================================== Desktop::Desktop() : QWidget( 0, 0, WStyle_Tool | WStyle_Customize ), qcopBridge( 0 ), transferServer( 0 ), packageSlave( 0 ) { qpedesktop = this; // bg = new Info( this ); tb = new TaskBar; launcher = new Launcher( 0, 0, WStyle_Customize | QWidget::WGroupLeader ); connect( launcher, SIGNAL( busy() ), tb, SLOT( startWait() ) ); connect( launcher, SIGNAL( notBusy( const QString& ) ), tb, SLOT( stopWait( const QString& ) ) ); int displayw = qApp->desktop() ->width(); int displayh = qApp->desktop() ->height(); QSize sz = tb->sizeHint(); setGeometry( 0, displayh - sz.height(), displayw, sz.height() ); tb->setGeometry( 0, displayh - sz.height(), displayw, sz.height() ); tb->show(); launcher->showMaximized(); launcher->show(); launcher->raise(); #if defined(QPE_HAVE_MEMALERTER) initMemalerter(); #endif // start services startTransferServer(); ( void ) new IrServer( this ); packageSlave = new PackageSlave( this ); qApp->installEventFilter( this ); qApp-> setMainWidget ( launcher ); } void Desktop::show() { login( TRUE ); QWidget::show(); } Desktop::~Desktop() { delete launcher; delete tb; delete qcopBridge; delete transferServer; } bool Desktop::recoverMemory() { return tb->recoverMemory(); } void Desktop::checkMemory() { diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index 6cb7ab2..db0173e 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -1,155 +1,155 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef __DESKTOP_H__ #define __DESKTOP_H__ #include "shutdownimpl.h" #include <qpe/qpeapplication.h> #include <opie/odevicebutton.h> #include <qwidget.h> #include <qdatetime.h> class Background; class Launcher; class TaskBar; class PowerStatus; class QCopBridge; class TransferServer; class DesktopPowerAlerter; class PackageSlave; class OpieScreenSaver; class DesktopApplication : public QPEApplication { Q_OBJECT public: DesktopApplication( int& argc, char **argv, Type t ); ~DesktopApplication(); static void switchLCD ( bool on ); // only for togglePower in Desktop static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar signals: void menu(); void home(); void launch(); void backlight(); void power(); void symbol(); void numLockStateToggle(); void capsLockStateToggle(); void prepareForRestart(); protected: #ifdef Q_WS_QWS bool qwsEventFilter( QWSEvent * ); #endif void shutdown(); void restart(); public slots: virtual void systemMessage ( const QCString &msg, const QByteArray &data ); virtual void launcherMessage ( const QCString &msg, const QByteArray &data ); void rereadVolumes(); protected slots: void shutdown ( ShutdownImpl::Type ); void apmTimeout ( ); void sendHeldAction ( ); protected: virtual bool eventFilter ( QObject *o, QEvent *e ); void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); private: static DesktopApplication *me ( ); private: void reloadPowerWarnSettings(); DesktopPowerAlerter *pa; PowerStatus *m_ps, *m_ps_last; QTimer *cardSendTimer; QCopChannel *channel; OpieScreenSaver *m_screensaver; - QTimer * m_timer; + QTimer * m_apm_timer; int m_powerVeryLow; int m_powerCritical; int m_currentPowerLevel; const Opie::ODeviceButton *m_last_button; QTimer *m_button_timer; bool m_keyclick_sound : 1; bool m_screentap_sound : 1; bool m_alarm_sound : 1; }; class Desktop : public QWidget { Q_OBJECT public: Desktop(); ~Desktop(); static bool screenLocked(); void show(); void checkMemory(); public slots: void execAutoStart(); void togglePower(); void toggleLight(); void toggleNumLockState(); void toggleCapsLockState(); void toggleSymbolInput(); void terminateServers(); protected: void executeOrModify( const QString& appLnkFile ); void styleChange( QStyle & ); void timerEvent( QTimerEvent *e ); QWidget *bg; Launcher *launcher; TaskBar *tb; private: void startTransferServer(); bool recoverMemory(); QCopBridge *qcopBridge; TransferServer *transferServer; PackageSlave *packageSlave; QDateTime suspendTime; }; #endif // __DESKTOP_H__ diff --git a/core/settings/light-and-power/lightsettingsbase.ui b/core/settings/light-and-power/lightsettingsbase.ui index 309b95d..b583b5c 100644 --- a/core/settings/light-and-power/lightsettingsbase.ui +++ b/core/settings/light-and-power/lightsettingsbase.ui @@ -1,206 +1,206 @@ <!DOCTYPE UI><UI> <class>LightSettingsBase</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>LightSettingsBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>371</width> + <width>367</width> <height>532</height> </rect> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>7</hsizetype> <vsizetype>5</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>caption</name> <string>Light and Power Settings</string> </property> <property stdset="1"> <name>sizeGripEnabled</name> <bool>false</bool> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <vbox> <property stdset="1"> <name>margin</name> <number>3</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget> <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>tabs</cstring> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>on Battery</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget> <class>QGroupBox</class> <property stdset="1"> <name>name</name> <cstring>GroupBox3</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> <property stdset="1"> <name>title</name> <string>General Settings</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <grid> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget row="1" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>interval_lightoff</cstring> </property> <property stdset="1"> <name>suffix</name> <string> sec</string> </property> <property stdset="1"> <name>specialValueText</name> <string>never</string> </property> <property stdset="1"> <name>buttonSymbols</name> <enum>PlusMinus</enum> </property> <property stdset="1"> <name>maxValue</name> <number>3600</number> </property> <property stdset="1"> <name>minValue</name> <number>0</number> </property> <property stdset="1"> <name>lineStep</name> <number>10</number> </property> </widget> <widget row="1" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_2</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>3</hsizetype> <vsizetype>1</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>Light off after</string> </property> </widget> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_3</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>3</hsizetype> <vsizetype>1</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>Dim light after</string> </property> </widget> <widget row="0" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>interval_dim</cstring> </property> <property stdset="1"> <name>suffix</name> <string> sec</string> </property> <property stdset="1"> <name>specialValueText</name> <string>never</string> </property> <property stdset="1"> <name>buttonSymbols</name> <enum>PlusMinus</enum> </property> <property stdset="1"> <name>maxValue</name> <number>3600</number> </property> <property stdset="1"> <name>minValue</name> <number>0</number> </property> <property stdset="1"> <name>lineStep</name> <number>10</number> </property> </widget> <widget row="2" column="1" > @@ -873,354 +873,370 @@ <name>pixmap</name> <pixmap>image1</pixmap> </property> <property stdset="1"> <name>scaledContents</name> <bool>false</bool> </property> </widget> </hbox> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout10</cstring> </property> <property> <name>layoutSpacing</name> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>auto_brightness_ac_3</cstring> </property> <property stdset="1"> <name>text</name> <string>Use Light Sensor</string> </property> <property> <name>whatsThis</name> <string>By sensing the ambient light where you are using your device, the screen light can be adjusted automatically. The brightness setting still affects the average brightness.</string> </property> </widget> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>CalibrateLightSensorAC</cstring> </property> <property stdset="1"> <name>text</name> <string>Calibrate</string> </property> <property> <name>whatsThis</name> <string>Advanced settings for light sensor handling</string> </property> </widget> </hbox> </widget> </vbox> </widget> <spacer> <property> <name>name</name> <cstring>Spacer5</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Warnings</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget> <class>QGroupBox</class> <property stdset="1"> <name>name</name> <cstring>GroupBox5</cstring> </property> <property stdset="1"> <name>title</name> <string>Warnings</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <grid> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>3</hsizetype> <vsizetype>5</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>Low power warning interval</string> </property> <property stdset="1"> <name>alignment</name> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property> <name>wordwrap</name> </property> </widget> <widget row="1" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>lowSpinBox</cstring> </property> <property stdset="1"> <name>suffix</name> <string> %</string> </property> <property stdset="1"> <name>buttonSymbols</name> <enum>PlusMinus</enum> </property> <property stdset="1"> <name>maxValue</name> <number>80</number> </property> <property stdset="1"> <name>minValue</name> <number>2</number> </property> <property> <name>whatsThis</name> <string>At what battery level should the low power warning pop up</string> </property> </widget> <widget row="0" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>warnintervalBox</cstring> </property> <property stdset="1"> <name>suffix</name> <string> sec</string> </property> <property stdset="1"> + <name>specialValueText</name> + <string>never</string> + </property> + <property stdset="1"> + <name>wrapping</name> + <bool>true</bool> + </property> + <property stdset="1"> <name>buttonSymbols</name> <enum>PlusMinus</enum> </property> <property stdset="1"> <name>maxValue</name> - <number>60</number> + <number>300</number> </property> <property stdset="1"> <name>minValue</name> + <number>0</number> + </property> + <property stdset="1"> + <name>lineStep</name> + <number>5</number> + </property> + <property stdset="1"> + <name>value</name> <number>5</number> </property> <property> <name>whatsThis</name> <string>how often should be checked for low power. This determines the rate popups occure in low power situations</string> </property> </widget> <widget row="2" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>criticalSpinBox</cstring> </property> <property stdset="1"> <name>prefix</name> <string></string> </property> <property stdset="1"> <name>suffix</name> <string> %</string> </property> <property stdset="1"> <name>buttonSymbols</name> <enum>PlusMinus</enum> </property> <property stdset="1"> <name>maxValue</name> <number>80</number> </property> <property stdset="1"> <name>minValue</name> <number>2</number> </property> <property> <name>whatsThis</name> <string>At what battery level should the critical power warning pop up</string> </property> </widget> <widget row="1" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>1</hsizetype> <vsizetype>5</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>very low battery warning at</string> </property> </widget> <widget row="2" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>1</hsizetype> <vsizetype>5</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>critical power warning at</string> </property> </widget> </grid> </widget> <spacer> <property> <name>name</name> <cstring>Spacer1</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> </widget> </vbox> </widget> <images> <image> <name>image0</name> <data format="XPM.GZ" length="424">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022130543251d2e253d856405bffcbc54105b19c856360003103711c4354b324b364b06719340dcb434b36488ac1e1a2020a6acac8c2ea60cc54862606ea232b218541b5810452c3111432c510f550c22886a1e482c115d0c2c88e6168818babaa4a42462c48082cae8e68102011a06b5d65c004336518f</data> </image> <image> <name>image1</name> <data format="XPM.GZ" length="439">789c6d8ec10ac2300c86ef7b8ad0ff36a4730777111f41f1288887b4b3e8610a3a0f22bebb6dd3d54d0ca5cdffe54f9aaaa4dd764d6555dc7beecf96ec896f54b68fae7bee0fab57a1ea86fc5950ad6685d2646973bd1c43ce3ec73c46903648e79a5624443a27d20cd2b9382704747e124382f11a7c5e30b364b957b331866331b3800c38f70282121c7c628367c098c1e0eb03121ccd4b46fcb0f80b26bb4833987f76b6d6f274de5fe6a1a031d30969f55e161fe4715f7b</data> </image> <image> <name>image2</name> <data format="XPM.GZ" length="424">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523234530022130543251d2e253d856405bffcbc54105b19c856360003103711c4354b344b314b04719340dcb434b31488ac1e1a2020a6acac8c2ea60cc54862606ea232b218541b5810452c3111432c510f550c22886a1e482c115d0c2c88e6168818babaa4a42462c48082cae8e68102011a06b5d65c0041d3518e</data> </image> </images> <connections> <connection> <sender>CalibrateLightSensor</sender> <signal>clicked()</signal> <receiver>LightSettingsBase</receiver> <slot>calibrateSensor()</slot> </connection> <connection> <sender>CalibrateLightSensorAC</sender> <signal>clicked()</signal> <receiver>LightSettingsBase</receiver> <slot>calibrateSensorAC()</slot> </connection> <slot access="public">calibrateSensor()</slot> <slot access="public">calibrateSensorAC()</slot> </connections> <tabstops> <tabstop>interval_dim</tabstop> <tabstop>interval_lightoff</tabstop> <tabstop>interval_suspend</tabstop> <tabstop>LcdOffOnly</tabstop> <tabstop>brightness</tabstop> <tabstop>auto_brightness</tabstop> <tabstop>CalibrateLightSensor</tabstop> <tabstop>tabs</tabstop> <tabstop>interval_lightoff_ac_3</tabstop> <tabstop>interval_suspend_ac_3</tabstop> <tabstop>interval_dim_ac_3</tabstop> <tabstop>LcdOffOnly_2_3</tabstop> <tabstop>brightness_ac_3</tabstop> <tabstop>auto_brightness_ac_3</tabstop> <tabstop>CalibrateLightSensorAC</tabstop> <tabstop>lowSpinBox</tabstop> <tabstop>warnintervalBox</tabstop> <tabstop>criticalSpinBox</tabstop> </tabstops> </UI> |