-rw-r--r-- | core/launcher/desktop.cpp | 34 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 | ||||
-rw-r--r-- | core/settings/light-and-power/lightsettingsbase.ui | 20 |
3 files changed, 35 insertions, 21 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 | |||
@@ -82,360 +82,358 @@ public: | |||
82 | { | 82 | { |
83 | return message; | 83 | return message; |
84 | } | 84 | } |
85 | 85 | ||
86 | private: | 86 | private: |
87 | int keyCode; | 87 | int keyCode; |
88 | QCString channel, message; | 88 | QCString channel, message; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | typedef QValueList<QCopKeyRegister> KeyRegisterList; | 91 | typedef QValueList<QCopKeyRegister> KeyRegisterList; |
92 | KeyRegisterList keyRegisterList; | 92 | KeyRegisterList keyRegisterList; |
93 | 93 | ||
94 | static Desktop* qpedesktop = 0; | 94 | static Desktop* qpedesktop = 0; |
95 | static int loggedin = 0; | 95 | static int loggedin = 0; |
96 | static void login( bool at_poweron ) | 96 | static void login( bool at_poweron ) |
97 | { | 97 | { |
98 | if ( !loggedin ) { | 98 | if ( !loggedin ) { |
99 | Global::terminateBuiltin( "calibrate" ); | 99 | Global::terminateBuiltin( "calibrate" ); |
100 | Password::authenticate( at_poweron ); | 100 | Password::authenticate( at_poweron ); |
101 | loggedin = 1; | 101 | loggedin = 1; |
102 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); | 102 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | bool Desktop::screenLocked() | 106 | bool Desktop::screenLocked() |
107 | { | 107 | { |
108 | return loggedin == 0; | 108 | return loggedin == 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | /* | 111 | /* |
112 | Priority is number of alerts that are needed to pop up | 112 | Priority is number of alerts that are needed to pop up |
113 | alert. | 113 | alert. |
114 | */ | 114 | */ |
115 | class DesktopPowerAlerter : public QMessageBox | 115 | class DesktopPowerAlerter : public QMessageBox |
116 | { | 116 | { |
117 | public: | 117 | public: |
118 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) | 118 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) |
119 | : QMessageBox( tr( "Battery Status" ), "Low Battery", | 119 | : QMessageBox( tr( "Battery Status" ), "Low Battery", |
120 | QMessageBox::Critical, | 120 | QMessageBox::Critical, |
121 | QMessageBox::Ok | QMessageBox::Default, | 121 | QMessageBox::Ok | QMessageBox::Default, |
122 | QMessageBox::NoButton, QMessageBox::NoButton, | 122 | QMessageBox::NoButton, QMessageBox::NoButton, |
123 | parent, name, FALSE ) | 123 | parent, name, FALSE ) |
124 | { | 124 | { |
125 | currentPriority = INT_MAX; | 125 | currentPriority = INT_MAX; |
126 | alertCount = 0; | 126 | alertCount = 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | void alert( const QString &text, int priority ); | 129 | void alert( const QString &text, int priority ); |
130 | void hideEvent( QHideEvent * ); | 130 | void hideEvent( QHideEvent * ); |
131 | private: | 131 | private: |
132 | int currentPriority; | 132 | int currentPriority; |
133 | int alertCount; | 133 | int alertCount; |
134 | }; | 134 | }; |
135 | 135 | ||
136 | void DesktopPowerAlerter::alert( const QString &text, int priority ) | 136 | void DesktopPowerAlerter::alert( const QString &text, int priority ) |
137 | { | 137 | { |
138 | alertCount++; | 138 | alertCount++; |
139 | if ( alertCount < priority ) | 139 | if ( alertCount < priority ) |
140 | return ; | 140 | return ; |
141 | if ( priority > currentPriority ) | 141 | if ( priority > currentPriority ) |
142 | return ; | 142 | return ; |
143 | currentPriority = priority; | 143 | currentPriority = priority; |
144 | setText( text ); | 144 | setText( text ); |
145 | show(); | 145 | show(); |
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | void DesktopPowerAlerter::hideEvent( QHideEvent *e ) | 149 | void DesktopPowerAlerter::hideEvent( QHideEvent *e ) |
150 | { | 150 | { |
151 | QMessageBox::hideEvent( e ); | 151 | QMessageBox::hideEvent( e ); |
152 | alertCount = 0; | 152 | alertCount = 0; |
153 | currentPriority = INT_MAX; | 153 | currentPriority = INT_MAX; |
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | void DesktopApplication::switchLCD ( bool on ) | 157 | void DesktopApplication::switchLCD ( bool on ) |
158 | { | 158 | { |
159 | if ( qApp ) { | 159 | if ( qApp ) { |
160 | DesktopApplication *dapp = (DesktopApplication *) qApp; | 160 | DesktopApplication *dapp = (DesktopApplication *) qApp; |
161 | 161 | ||
162 | if ( dapp-> m_screensaver ) { | 162 | if ( dapp-> m_screensaver ) { |
163 | if ( on ) { | 163 | if ( on ) { |
164 | dapp-> m_screensaver-> setDisplayState ( true ); | 164 | dapp-> m_screensaver-> setDisplayState ( true ); |
165 | dapp-> m_screensaver-> setBacklight ( -3 ); | 165 | dapp-> m_screensaver-> setBacklight ( -3 ); |
166 | } | 166 | } |
167 | else { | 167 | else { |
168 | dapp-> m_screensaver-> setDisplayState ( false ); | 168 | dapp-> m_screensaver-> setDisplayState ( false ); |
169 | } | 169 | } |
170 | } | 170 | } |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | 174 | ||
175 | DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) | 175 | DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) |
176 | : QPEApplication( argc, argv, appType ) | 176 | : QPEApplication( argc, argv, appType ) |
177 | { | 177 | { |
178 | |||
179 | Config cfg( "apm" ); | ||
180 | cfg.setGroup( "Warnings" ); | ||
181 | //cfg.readNumEntry( "checkinterval", 10000 ) | ||
182 | m_powerVeryLow = cfg.readNumEntry( "powerverylow", 10 ); | ||
183 | m_powerCritical = cfg.readNumEntry( "powercritical", 5 ); | ||
184 | |||
185 | m_ps = new PowerStatus; | 178 | m_ps = new PowerStatus; |
186 | m_ps_last = new PowerStatus; | 179 | m_ps_last = new PowerStatus; |
187 | pa = new DesktopPowerAlerter( 0 ); | 180 | pa = new DesktopPowerAlerter( 0 ); |
188 | 181 | ||
189 | m_timer = new QTimer( this ); | 182 | m_apm_timer = new QTimer ( this ); |
190 | connect( m_timer, SIGNAL( timeout() ), this, SLOT( apmTimeout() ) ); | 183 | connect ( m_apm_timer, SIGNAL( timeout ( )), this, SLOT( apmTimeout ( ))); |
191 | m_timer->start( 5000 ); | 184 | reloadPowerWarnSettings ( ); |
192 | 185 | ||
193 | m_last_button = 0; | 186 | m_last_button = 0; |
194 | m_button_timer = new QTimer ( ); | 187 | m_button_timer = new QTimer ( ); |
195 | connect ( m_button_timer, SIGNAL( timeout ( )), this, SLOT( sendHeldAction ( ))); | 188 | connect ( m_button_timer, SIGNAL( timeout ( )), this, SLOT( sendHeldAction ( ))); |
196 | 189 | ||
197 | channel = new QCopChannel( "QPE/System", this ); | 190 | channel = new QCopChannel( "QPE/System", this ); |
198 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), | 191 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), |
199 | this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); | 192 | this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); |
200 | 193 | ||
201 | channel = new QCopChannel( "QPE/Launcher", this ); | 194 | channel = new QCopChannel( "QPE/Launcher", this ); |
202 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), | 195 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), |
203 | this, SLOT( launcherMessage( const QCString&, const QByteArray& ) ) ); | 196 | this, SLOT( launcherMessage( const QCString&, const QByteArray& ) ) ); |
204 | 197 | ||
205 | m_screensaver = new OpieScreenSaver ( ); | 198 | m_screensaver = new OpieScreenSaver ( ); |
206 | m_screensaver-> setInterval ( -1 ); | 199 | m_screensaver-> setInterval ( -1 ); |
207 | QWSServer::setScreenSaver( m_screensaver ); | 200 | QWSServer::setScreenSaver( m_screensaver ); |
208 | 201 | ||
209 | rereadVolumes(); | 202 | rereadVolumes(); |
210 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); | 203 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); |
211 | 204 | ||
212 | apmTimeout ( ); | 205 | apmTimeout ( ); |
213 | 206 | ||
214 | grabKeyboard ( ); | 207 | grabKeyboard ( ); |
215 | } | 208 | } |
216 | 209 | ||
217 | 210 | ||
218 | DesktopApplication::~DesktopApplication() | 211 | DesktopApplication::~DesktopApplication() |
219 | { | 212 | { |
220 | ungrabKeyboard ( ); | 213 | ungrabKeyboard ( ); |
221 | 214 | ||
222 | delete m_ps; | 215 | delete m_ps; |
223 | delete m_ps_last; | 216 | delete m_ps_last; |
224 | delete pa; | 217 | delete pa; |
225 | } | 218 | } |
226 | 219 | ||
227 | void DesktopApplication::apmTimeout() | 220 | void DesktopApplication::apmTimeout() |
228 | { | 221 | { |
229 | qpedesktop->checkMemory(); // in case no events are being generated | 222 | qpedesktop-> checkMemory ( ); // in case no events are being generated |
230 | 223 | ||
231 | *m_ps_last = *m_ps; | 224 | *m_ps_last = *m_ps; |
232 | *m_ps = PowerStatusManager::readStatus(); | 225 | *m_ps = PowerStatusManager::readStatus(); |
233 | 226 | ||
234 | if ( m_ps-> acStatus ( ) != m_ps_last-> acStatus ( )) | 227 | if ( m_ps-> acStatus ( ) != m_ps_last-> acStatus ( )) |
235 | m_screensaver-> powerStatusChanged ( *m_ps ); | 228 | m_screensaver-> powerStatusChanged ( *m_ps ); |
236 | 229 | ||
237 | if ( m_ps-> acStatus ( ) != PowerStatus::Online ) { | 230 | if ( m_ps-> acStatus ( ) != PowerStatus::Online ) { |
238 | int bat = m_ps-> batteryPercentRemaining ( ); | 231 | int bat = m_ps-> batteryPercentRemaining ( ); |
239 | 232 | ||
240 | if ( bat < m_ps_last-> batteryPercentRemaining ( )) { | 233 | if ( bat < m_ps_last-> batteryPercentRemaining ( )) { |
241 | if ( bat <= m_powerCritical ) | 234 | if ( bat <= m_powerCritical ) |
242 | pa->alert( tr( "Battery level is critical!\nKeep power off until power restored!" ), 1 ); | 235 | pa->alert( tr( "Battery level is critical!\nKeep power off until power restored!" ), 1 ); |
243 | else if ( bat <= m_powerVeryLow ) | 236 | else if ( bat <= m_powerVeryLow ) |
244 | pa->alert( tr( "Battery is running very low." ), 2 ); | 237 | pa->alert( tr( "Battery is running very low." ), 2 ); |
245 | } | 238 | } |
246 | if ( m_ps-> backupBatteryStatus ( ) == PowerStatus::VeryLow ) | 239 | if ( m_ps-> backupBatteryStatus ( ) == PowerStatus::VeryLow ) |
247 | pa->alert( tr( "The Back-up battery is very low.\nPlease charge the back-up battery." ), 2 ); | 240 | pa->alert( tr( "The Back-up battery is very low.\nPlease charge the back-up battery." ), 2 ); |
248 | } | 241 | } |
249 | } | 242 | } |
250 | 243 | ||
251 | 244 | ||
252 | void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) | 245 | void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) |
253 | { | 246 | { |
254 | QDataStream stream ( data, IO_ReadOnly ); | 247 | QDataStream stream ( data, IO_ReadOnly ); |
255 | 248 | ||
256 | if ( msg == "setScreenSaverInterval(int)" ) { | 249 | if ( msg == "setScreenSaverInterval(int)" ) { |
257 | int time; | 250 | int time; |
258 | stream >> time; | 251 | stream >> time; |
259 | m_screensaver-> setInterval( time ); | 252 | m_screensaver-> setInterval( time ); |
260 | } | 253 | } |
261 | else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { | 254 | else if ( msg == "setScreenSaverIntervals(int,int,int)" ) { |
262 | int t1, t2, t3; | 255 | int t1, t2, t3; |
263 | stream >> t1 >> t2 >> t3; | 256 | stream >> t1 >> t2 >> t3; |
264 | m_screensaver-> setIntervals( t1, t2, t3 ); | 257 | m_screensaver-> setIntervals( t1, t2, t3 ); |
265 | } | 258 | } |
266 | else if ( msg == "setBacklight(int)" ) { | 259 | else if ( msg == "setBacklight(int)" ) { |
267 | int bright; | 260 | int bright; |
268 | stream >> bright; | 261 | stream >> bright; |
269 | m_screensaver-> setBacklight( bright ); | 262 | m_screensaver-> setBacklight( bright ); |
270 | } | 263 | } |
271 | else if ( msg == "setScreenSaverMode(int)" ) { | 264 | else if ( msg == "setScreenSaverMode(int)" ) { |
272 | int mode; | 265 | int mode; |
273 | stream >> mode; | 266 | stream >> mode; |
274 | m_screensaver-> setMode ( mode ); | 267 | m_screensaver-> setMode ( mode ); |
275 | } | 268 | } |
276 | else if ( msg == "reloadPowerWarnSettings()" ) { | 269 | else if ( msg == "reloadPowerWarnSettings()" ) { |
277 | reloadPowerWarnSettings(); | 270 | reloadPowerWarnSettings(); |
278 | } | 271 | } |
279 | else if ( msg == "setDisplayState(int)" ) { | 272 | else if ( msg == "setDisplayState(int)" ) { |
280 | int state; | 273 | int state; |
281 | stream >> state; | 274 | stream >> state; |
282 | m_screensaver-> setDisplayState ( state != 0 ); | 275 | m_screensaver-> setDisplayState ( state != 0 ); |
283 | } | 276 | } |
284 | else if ( msg == "suspend()" ) { | 277 | else if ( msg == "suspend()" ) { |
285 | emit power(); | 278 | emit power(); |
286 | } | 279 | } |
287 | else if ( msg == "sendBusinessCard()" ) { | 280 | else if ( msg == "sendBusinessCard()" ) { |
288 | QString card = ::getenv ( "HOME" ); | 281 | QString card = ::getenv ( "HOME" ); |
289 | card += "/Applications/addressbook/businesscard.vcf"; | 282 | card += "/Applications/addressbook/businesscard.vcf"; |
290 | 283 | ||
291 | if ( QFile::exists( card ) ) { | 284 | if ( QFile::exists( card ) ) { |
292 | QCopEnvelope e ( "QPE/Obex", "send(QString,QString,QString)" ); | 285 | QCopEnvelope e ( "QPE/Obex", "send(QString,QString,QString)" ); |
293 | QString mimetype = "text/x-vCard"; | 286 | QString mimetype = "text/x-vCard"; |
294 | e << tr( "business card" ) << card << mimetype; | 287 | e << tr( "business card" ) << card << mimetype; |
295 | } | 288 | } |
296 | } | 289 | } |
297 | } | 290 | } |
298 | 291 | ||
299 | void DesktopApplication::reloadPowerWarnSettings() | 292 | void DesktopApplication::reloadPowerWarnSettings ( ) |
300 | { | 293 | { |
301 | Config cfg( "apm" ); | 294 | Config cfg ( "apm" ); |
302 | cfg.setGroup( "Warnings" ); | 295 | cfg. setGroup ( "Warnings" ); |
303 | 296 | ||
304 | // m_timer->changeInterval( cfg.readNumEntry( "checkinterval", 10000 ) ); | 297 | int iv = cfg. readNumEntry ( "checkinterval", 10000 ); |
305 | m_powerVeryLow = cfg.readNumEntry( "powerverylow", 10 ); | 298 | |
306 | m_powerCritical = cfg.readNumEntry( "powervcritical", 5 ); | 299 | m_apm_timer-> stop ( ); |
300 | if ( iv ) | ||
301 | m_apm_timer-> start ( iv ); | ||
302 | |||
303 | m_powerVeryLow = cfg. readNumEntry ( "powerverylow", 10 ); | ||
304 | m_powerCritical = cfg. readNumEntry ( "powervcritical", 5 ); | ||
307 | } | 305 | } |
308 | 306 | ||
309 | 307 | ||
310 | enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown; | 308 | enum MemState { Unknown, VeryLow, Low, Normal } memstate = Unknown; |
311 | 309 | ||
312 | 310 | ||
313 | void DesktopApplication::launcherMessage( const QCString & msg, const QByteArray & data ) | 311 | void DesktopApplication::launcherMessage( const QCString & msg, const QByteArray & data ) |
314 | { | 312 | { |
315 | QDataStream stream ( data, IO_ReadOnly ); | 313 | QDataStream stream ( data, IO_ReadOnly ); |
316 | 314 | ||
317 | if ( msg == "deviceButton(int,int,int)" ) { | 315 | if ( msg == "deviceButton(int,int,int)" ) { |
318 | int keycode, press, autoRepeat; | 316 | int keycode, press, autoRepeat; |
319 | stream >> keycode >> press >> autoRepeat; | 317 | stream >> keycode >> press >> autoRepeat; |
320 | 318 | ||
321 | const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( keycode ); | 319 | const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( keycode ); |
322 | 320 | ||
323 | if ( db ) | 321 | if ( db ) |
324 | checkButtonAction ( db, keycode, press, autoRepeat ); | 322 | checkButtonAction ( db, keycode, press, autoRepeat ); |
325 | } | 323 | } |
326 | else if ( msg == "keyRegister(int,QCString,QCString)" ) { | 324 | else if ( msg == "keyRegister(int,QCString,QCString)" ) { |
327 | int k; | 325 | int k; |
328 | QCString c, m; | 326 | QCString c, m; |
329 | stream >> k >> c >> m; | 327 | stream >> k >> c >> m; |
330 | 328 | ||
331 | keyRegisterList.append ( QCopKeyRegister ( k, c, m )); | 329 | keyRegisterList.append ( QCopKeyRegister ( k, c, m )); |
332 | } | 330 | } |
333 | } | 331 | } |
334 | 332 | ||
335 | void DesktopApplication::sendHeldAction ( ) | 333 | void DesktopApplication::sendHeldAction ( ) |
336 | { | 334 | { |
337 | if ( m_last_button ) { | 335 | if ( m_last_button ) { |
338 | m_last_button-> heldAction ( ). send ( ); | 336 | m_last_button-> heldAction ( ). send ( ); |
339 | m_last_button = 0; | 337 | m_last_button = 0; |
340 | } | 338 | } |
341 | } | 339 | } |
342 | 340 | ||
343 | 341 | ||
344 | 342 | ||
345 | void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int keycode, bool press, bool autoRepeat ) | 343 | void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat ) |
346 | { | 344 | { |
347 | if ( db ) { | 345 | if ( db ) { |
348 | if ( !press && !autoRepeat && m_button_timer-> isActive ( )) { | 346 | if ( !press && !autoRepeat && m_button_timer-> isActive ( )) { |
349 | m_button_timer-> stop ( ); | 347 | m_button_timer-> stop ( ); |
350 | if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) { | 348 | if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) { |
351 | db-> pressedAction ( ). send ( ); | 349 | db-> pressedAction ( ). send ( ); |
352 | } | 350 | } |
353 | } | 351 | } |
354 | else if ( press && !autoRepeat ) { | 352 | else if ( press && !autoRepeat ) { |
355 | m_button_timer-> stop ( ); | 353 | m_button_timer-> stop ( ); |
356 | 354 | ||
357 | if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) { | 355 | if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) { |
358 | m_last_button = db; | 356 | m_last_button = db; |
359 | m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true ); | 357 | m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true ); |
360 | } | 358 | } |
361 | } | 359 | } |
362 | } | 360 | } |
363 | } | 361 | } |
364 | 362 | ||
365 | bool DesktopApplication::eventFilter ( QObject *o, QEvent *e ) | 363 | bool DesktopApplication::eventFilter ( QObject *o, QEvent *e ) |
366 | { | 364 | { |
367 | if ( e-> type ( ) == QEvent::KeyPress || e-> type ( ) == QEvent::KeyRelease ) { | 365 | if ( e-> type ( ) == QEvent::KeyPress || e-> type ( ) == QEvent::KeyRelease ) { |
368 | QKeyEvent *ke = (QKeyEvent *) e; | 366 | QKeyEvent *ke = (QKeyEvent *) e; |
369 | 367 | ||
370 | const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( )); | 368 | const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( )); |
371 | 369 | ||
372 | if ( db ) { | 370 | if ( db ) { |
373 | checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )); | 371 | checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( )); |
374 | return true; | 372 | return true; |
375 | } | 373 | } |
376 | } | 374 | } |
377 | return QPEApplication::eventFilter ( o, e ); | 375 | return QPEApplication::eventFilter ( o, e ); |
378 | } | 376 | } |
379 | 377 | ||
380 | #ifdef Q_WS_QWS | 378 | #ifdef Q_WS_QWS |
381 | 379 | ||
382 | bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | 380 | bool DesktopApplication::qwsEventFilter( QWSEvent *e ) |
383 | { | 381 | { |
384 | qpedesktop->checkMemory(); | 382 | qpedesktop->checkMemory(); |
385 | 383 | ||
386 | if ( e->type == QWSEvent::Key ) { | 384 | if ( e->type == QWSEvent::Key ) { |
387 | QWSKeyEvent * ke = (QWSKeyEvent *) e; | 385 | QWSKeyEvent * ke = (QWSKeyEvent *) e; |
388 | ushort keycode = ke-> simpleData. keycode; | 386 | ushort keycode = ke-> simpleData. keycode; |
389 | 387 | ||
390 | if ( !loggedin && keycode != Key_F34 ) | 388 | if ( !loggedin && keycode != Key_F34 ) |
391 | return true; | 389 | return true; |
392 | 390 | ||
393 | bool press = ke-> simpleData. is_press; | 391 | bool press = ke-> simpleData. is_press; |
394 | bool autoRepeat = ke-> simpleData. is_auto_repeat; | 392 | bool autoRepeat = ke-> simpleData. is_auto_repeat; |
395 | 393 | ||
396 | if ( !keyboardGrabbed ( )) { | 394 | if ( !keyboardGrabbed ( )) { |
397 | // app that registers key/message to be sent back to the app, when it doesn't have focus, | 395 | // app that registers key/message to be sent back to the app, when it doesn't have focus, |
398 | // when user presses key, unless keyboard has been requested from app. | 396 | // when user presses key, unless keyboard has been requested from app. |
399 | // will not send multiple repeats if user holds key | 397 | // will not send multiple repeats if user holds key |
400 | // i.e. one shot | 398 | // i.e. one shot |
401 | 399 | ||
402 | if ( keycode != 0 && press && !autoRepeat ) { | 400 | if ( keycode != 0 && press && !autoRepeat ) { |
403 | for ( KeyRegisterList::Iterator it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { | 401 | for ( KeyRegisterList::Iterator it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { |
404 | if (( *it ). getKeyCode ( ) == keycode ) { | 402 | if (( *it ). getKeyCode ( ) == keycode ) { |
405 | QCopEnvelope (( *it ). getChannel ( ), ( *it ). getMessage ( )); | 403 | QCopEnvelope (( *it ). getChannel ( ), ( *it ). getMessage ( )); |
406 | return true; | 404 | return true; |
407 | } | 405 | } |
408 | } | 406 | } |
409 | } | 407 | } |
410 | } | 408 | } |
411 | 409 | ||
412 | if ( keycode == HardKey_Suspend ) { | 410 | if ( keycode == HardKey_Suspend ) { |
413 | if ( press ) | 411 | if ( press ) |
414 | emit power ( ); | 412 | emit power ( ); |
415 | return true; | 413 | return true; |
416 | } | 414 | } |
417 | else if ( keycode == HardKey_Backlight ) { | 415 | else if ( keycode == HardKey_Backlight ) { |
418 | if ( press ) | 416 | if ( press ) |
419 | emit backlight ( ); | 417 | emit backlight ( ); |
420 | return true; | 418 | return true; |
421 | } | 419 | } |
422 | else if ( keycode == Key_F32 ) { | 420 | else if ( keycode == Key_F32 ) { |
423 | if ( press ) | 421 | if ( press ) |
424 | QCopEnvelope e( "QPE/Desktop", "startSync()" ); | 422 | QCopEnvelope e( "QPE/Desktop", "startSync()" ); |
425 | return true; | 423 | return true; |
426 | } | 424 | } |
427 | else if ( keycode == Key_F31 && !ke-> simpleData. modifiers ) { // Symbol Key -> show Unicode IM | 425 | else if ( keycode == Key_F31 && !ke-> simpleData. modifiers ) { // Symbol Key -> show Unicode IM |
428 | if ( press ) | 426 | if ( press ) |
429 | emit symbol ( ); | 427 | emit symbol ( ); |
430 | return true; | 428 | return true; |
431 | } | 429 | } |
432 | else if ( keycode == Key_NumLock ) { | 430 | else if ( keycode == Key_NumLock ) { |
433 | if ( press ) | 431 | if ( press ) |
434 | emit numLockStateToggle ( ); | 432 | emit numLockStateToggle ( ); |
435 | } | 433 | } |
436 | else if ( keycode == Key_CapsLock ) { | 434 | else if ( keycode == Key_CapsLock ) { |
437 | if ( press ) | 435 | if ( press ) |
438 | emit capsLockStateToggle(); | 436 | emit capsLockStateToggle(); |
439 | } | 437 | } |
440 | if (( press && !autoRepeat ) || ( !press && autoRepeat )) { | 438 | if (( press && !autoRepeat ) || ( !press && autoRepeat )) { |
441 | if ( m_keyclick_sound ) | 439 | if ( m_keyclick_sound ) |
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 | |||
@@ -2,154 +2,154 @@ | |||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef __DESKTOP_H__ | 21 | #ifndef __DESKTOP_H__ |
22 | #define __DESKTOP_H__ | 22 | #define __DESKTOP_H__ |
23 | 23 | ||
24 | 24 | ||
25 | #include "shutdownimpl.h" | 25 | #include "shutdownimpl.h" |
26 | 26 | ||
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <opie/odevicebutton.h> | 28 | #include <opie/odevicebutton.h> |
29 | 29 | ||
30 | #include <qwidget.h> | 30 | #include <qwidget.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | 32 | ||
33 | class Background; | 33 | class Background; |
34 | class Launcher; | 34 | class Launcher; |
35 | class TaskBar; | 35 | class TaskBar; |
36 | class PowerStatus; | 36 | class PowerStatus; |
37 | class QCopBridge; | 37 | class QCopBridge; |
38 | class TransferServer; | 38 | class TransferServer; |
39 | class DesktopPowerAlerter; | 39 | class DesktopPowerAlerter; |
40 | class PackageSlave; | 40 | class PackageSlave; |
41 | class OpieScreenSaver; | 41 | class OpieScreenSaver; |
42 | 42 | ||
43 | class DesktopApplication : public QPEApplication | 43 | class DesktopApplication : public QPEApplication |
44 | { | 44 | { |
45 | Q_OBJECT | 45 | Q_OBJECT |
46 | public: | 46 | public: |
47 | DesktopApplication( int& argc, char **argv, Type t ); | 47 | DesktopApplication( int& argc, char **argv, Type t ); |
48 | ~DesktopApplication(); | 48 | ~DesktopApplication(); |
49 | 49 | ||
50 | static void switchLCD ( bool on ); // only for togglePower in Desktop | 50 | static void switchLCD ( bool on ); // only for togglePower in Desktop |
51 | 51 | ||
52 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar | 52 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar |
53 | 53 | ||
54 | signals: | 54 | signals: |
55 | void menu(); | 55 | void menu(); |
56 | void home(); | 56 | void home(); |
57 | void launch(); | 57 | void launch(); |
58 | void backlight(); | 58 | void backlight(); |
59 | void power(); | 59 | void power(); |
60 | void symbol(); | 60 | void symbol(); |
61 | void numLockStateToggle(); | 61 | void numLockStateToggle(); |
62 | void capsLockStateToggle(); | 62 | void capsLockStateToggle(); |
63 | void prepareForRestart(); | 63 | void prepareForRestart(); |
64 | 64 | ||
65 | protected: | 65 | protected: |
66 | #ifdef Q_WS_QWS | 66 | #ifdef Q_WS_QWS |
67 | 67 | ||
68 | bool qwsEventFilter( QWSEvent * ); | 68 | bool qwsEventFilter( QWSEvent * ); |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | void shutdown(); | 71 | void shutdown(); |
72 | void restart(); | 72 | void restart(); |
73 | 73 | ||
74 | public slots: | 74 | public slots: |
75 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); | 75 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); |
76 | virtual void launcherMessage ( const QCString &msg, const QByteArray &data ); | 76 | virtual void launcherMessage ( const QCString &msg, const QByteArray &data ); |
77 | void rereadVolumes(); | 77 | void rereadVolumes(); |
78 | 78 | ||
79 | protected slots: | 79 | protected slots: |
80 | void shutdown ( ShutdownImpl::Type ); | 80 | void shutdown ( ShutdownImpl::Type ); |
81 | void apmTimeout ( ); | 81 | void apmTimeout ( ); |
82 | void sendHeldAction ( ); | 82 | void sendHeldAction ( ); |
83 | 83 | ||
84 | protected: | 84 | protected: |
85 | virtual bool eventFilter ( QObject *o, QEvent *e ); | 85 | virtual bool eventFilter ( QObject *o, QEvent *e ); |
86 | void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); | 86 | void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); |
87 | 87 | ||
88 | private: | 88 | private: |
89 | static DesktopApplication *me ( ); | 89 | static DesktopApplication *me ( ); |
90 | 90 | ||
91 | private: | 91 | private: |
92 | void reloadPowerWarnSettings(); | 92 | void reloadPowerWarnSettings(); |
93 | DesktopPowerAlerter *pa; | 93 | DesktopPowerAlerter *pa; |
94 | PowerStatus *m_ps, *m_ps_last; | 94 | PowerStatus *m_ps, *m_ps_last; |
95 | QTimer *cardSendTimer; | 95 | QTimer *cardSendTimer; |
96 | QCopChannel *channel; | 96 | QCopChannel *channel; |
97 | OpieScreenSaver *m_screensaver; | 97 | OpieScreenSaver *m_screensaver; |
98 | QTimer * m_timer; | 98 | QTimer * m_apm_timer; |
99 | int m_powerVeryLow; | 99 | int m_powerVeryLow; |
100 | int m_powerCritical; | 100 | int m_powerCritical; |
101 | int m_currentPowerLevel; | 101 | int m_currentPowerLevel; |
102 | 102 | ||
103 | const Opie::ODeviceButton *m_last_button; | 103 | const Opie::ODeviceButton *m_last_button; |
104 | QTimer *m_button_timer; | 104 | QTimer *m_button_timer; |
105 | 105 | ||
106 | bool m_keyclick_sound : 1; | 106 | bool m_keyclick_sound : 1; |
107 | bool m_screentap_sound : 1; | 107 | bool m_screentap_sound : 1; |
108 | bool m_alarm_sound : 1; | 108 | bool m_alarm_sound : 1; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | 111 | ||
112 | class Desktop : public QWidget | 112 | class Desktop : public QWidget |
113 | { | 113 | { |
114 | Q_OBJECT | 114 | Q_OBJECT |
115 | public: | 115 | public: |
116 | Desktop(); | 116 | Desktop(); |
117 | ~Desktop(); | 117 | ~Desktop(); |
118 | 118 | ||
119 | static bool screenLocked(); | 119 | static bool screenLocked(); |
120 | 120 | ||
121 | void show(); | 121 | void show(); |
122 | void checkMemory(); | 122 | void checkMemory(); |
123 | 123 | ||
124 | public slots: | 124 | public slots: |
125 | void execAutoStart(); | 125 | void execAutoStart(); |
126 | void togglePower(); | 126 | void togglePower(); |
127 | void toggleLight(); | 127 | void toggleLight(); |
128 | void toggleNumLockState(); | 128 | void toggleNumLockState(); |
129 | void toggleCapsLockState(); | 129 | void toggleCapsLockState(); |
130 | void toggleSymbolInput(); | 130 | void toggleSymbolInput(); |
131 | void terminateServers(); | 131 | void terminateServers(); |
132 | 132 | ||
133 | protected: | 133 | protected: |
134 | void executeOrModify( const QString& appLnkFile ); | 134 | void executeOrModify( const QString& appLnkFile ); |
135 | void styleChange( QStyle & ); | 135 | void styleChange( QStyle & ); |
136 | void timerEvent( QTimerEvent *e ); | 136 | void timerEvent( QTimerEvent *e ); |
137 | 137 | ||
138 | QWidget *bg; | 138 | QWidget *bg; |
139 | Launcher *launcher; | 139 | Launcher *launcher; |
140 | TaskBar *tb; | 140 | TaskBar *tb; |
141 | 141 | ||
142 | private: | 142 | private: |
143 | void startTransferServer(); | 143 | void startTransferServer(); |
144 | bool recoverMemory(); | 144 | bool recoverMemory(); |
145 | 145 | ||
146 | QCopBridge *qcopBridge; | 146 | QCopBridge *qcopBridge; |
147 | TransferServer *transferServer; | 147 | TransferServer *transferServer; |
148 | PackageSlave *packageSlave; | 148 | PackageSlave *packageSlave; |
149 | 149 | ||
150 | QDateTime suspendTime; | 150 | QDateTime suspendTime; |
151 | }; | 151 | }; |
152 | 152 | ||
153 | 153 | ||
154 | #endif // __DESKTOP_H__ | 154 | #endif // __DESKTOP_H__ |
155 | 155 | ||
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,110 +1,110 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>LightSettingsBase</class> | 2 | <class>LightSettingsBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>LightSettingsBase</cstring> | 7 | <cstring>LightSettingsBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>371</width> | 14 | <width>367</width> |
15 | <height>532</height> | 15 | <height>532</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>sizePolicy</name> | 19 | <name>sizePolicy</name> |
20 | <sizepolicy> | 20 | <sizepolicy> |
21 | <hsizetype>7</hsizetype> | 21 | <hsizetype>7</hsizetype> |
22 | <vsizetype>5</vsizetype> | 22 | <vsizetype>5</vsizetype> |
23 | </sizepolicy> | 23 | </sizepolicy> |
24 | </property> | 24 | </property> |
25 | <property stdset="1"> | 25 | <property stdset="1"> |
26 | <name>caption</name> | 26 | <name>caption</name> |
27 | <string>Light and Power Settings</string> | 27 | <string>Light and Power Settings</string> |
28 | </property> | 28 | </property> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>sizeGripEnabled</name> | 30 | <name>sizeGripEnabled</name> |
31 | <bool>false</bool> | 31 | <bool>false</bool> |
32 | </property> | 32 | </property> |
33 | <property> | 33 | <property> |
34 | <name>layoutMargin</name> | 34 | <name>layoutMargin</name> |
35 | </property> | 35 | </property> |
36 | <property> | 36 | <property> |
37 | <name>layoutSpacing</name> | 37 | <name>layoutSpacing</name> |
38 | </property> | 38 | </property> |
39 | <vbox> | 39 | <vbox> |
40 | <property stdset="1"> | 40 | <property stdset="1"> |
41 | <name>margin</name> | 41 | <name>margin</name> |
42 | <number>3</number> | 42 | <number>3</number> |
43 | </property> | 43 | </property> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>spacing</name> | 45 | <name>spacing</name> |
46 | <number>3</number> | 46 | <number>3</number> |
47 | </property> | 47 | </property> |
48 | <widget> | 48 | <widget> |
49 | <class>QTabWidget</class> | 49 | <class>QTabWidget</class> |
50 | <property stdset="1"> | 50 | <property stdset="1"> |
51 | <name>name</name> | 51 | <name>name</name> |
52 | <cstring>tabs</cstring> | 52 | <cstring>tabs</cstring> |
53 | </property> | 53 | </property> |
54 | <property> | 54 | <property> |
55 | <name>layoutMargin</name> | 55 | <name>layoutMargin</name> |
56 | </property> | 56 | </property> |
57 | <property> | 57 | <property> |
58 | <name>layoutSpacing</name> | 58 | <name>layoutSpacing</name> |
59 | </property> | 59 | </property> |
60 | <widget> | 60 | <widget> |
61 | <class>QWidget</class> | 61 | <class>QWidget</class> |
62 | <property stdset="1"> | 62 | <property stdset="1"> |
63 | <name>name</name> | 63 | <name>name</name> |
64 | <cstring>tab</cstring> | 64 | <cstring>tab</cstring> |
65 | </property> | 65 | </property> |
66 | <attribute> | 66 | <attribute> |
67 | <name>title</name> | 67 | <name>title</name> |
68 | <string>on Battery</string> | 68 | <string>on Battery</string> |
69 | </attribute> | 69 | </attribute> |
70 | <vbox> | 70 | <vbox> |
71 | <property stdset="1"> | 71 | <property stdset="1"> |
72 | <name>margin</name> | 72 | <name>margin</name> |
73 | <number>5</number> | 73 | <number>5</number> |
74 | </property> | 74 | </property> |
75 | <property stdset="1"> | 75 | <property stdset="1"> |
76 | <name>spacing</name> | 76 | <name>spacing</name> |
77 | <number>3</number> | 77 | <number>3</number> |
78 | </property> | 78 | </property> |
79 | <widget> | 79 | <widget> |
80 | <class>QGroupBox</class> | 80 | <class>QGroupBox</class> |
81 | <property stdset="1"> | 81 | <property stdset="1"> |
82 | <name>name</name> | 82 | <name>name</name> |
83 | <cstring>GroupBox3</cstring> | 83 | <cstring>GroupBox3</cstring> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>enabled</name> | 86 | <name>enabled</name> |
87 | <bool>true</bool> | 87 | <bool>true</bool> |
88 | </property> | 88 | </property> |
89 | <property stdset="1"> | 89 | <property stdset="1"> |
90 | <name>title</name> | 90 | <name>title</name> |
91 | <string>General Settings</string> | 91 | <string>General Settings</string> |
92 | </property> | 92 | </property> |
93 | <property> | 93 | <property> |
94 | <name>layoutMargin</name> | 94 | <name>layoutMargin</name> |
95 | </property> | 95 | </property> |
96 | <property> | 96 | <property> |
97 | <name>layoutSpacing</name> | 97 | <name>layoutSpacing</name> |
98 | </property> | 98 | </property> |
99 | <grid> | 99 | <grid> |
100 | <property stdset="1"> | 100 | <property stdset="1"> |
101 | <name>margin</name> | 101 | <name>margin</name> |
102 | <number>5</number> | 102 | <number>5</number> |
103 | </property> | 103 | </property> |
104 | <property stdset="1"> | 104 | <property stdset="1"> |
105 | <name>spacing</name> | 105 | <name>spacing</name> |
106 | <number>3</number> | 106 | <number>3</number> |
107 | </property> | 107 | </property> |
108 | <widget row="1" column="1" > | 108 | <widget row="1" column="1" > |
109 | <class>QSpinBox</class> | 109 | <class>QSpinBox</class> |
110 | <property stdset="1"> | 110 | <property stdset="1"> |
@@ -969,201 +969,217 @@ | |||
969 | <property stdset="1"> | 969 | <property stdset="1"> |
970 | <name>margin</name> | 970 | <name>margin</name> |
971 | <number>5</number> | 971 | <number>5</number> |
972 | </property> | 972 | </property> |
973 | <property stdset="1"> | 973 | <property stdset="1"> |
974 | <name>spacing</name> | 974 | <name>spacing</name> |
975 | <number>3</number> | 975 | <number>3</number> |
976 | </property> | 976 | </property> |
977 | <widget> | 977 | <widget> |
978 | <class>QGroupBox</class> | 978 | <class>QGroupBox</class> |
979 | <property stdset="1"> | 979 | <property stdset="1"> |
980 | <name>name</name> | 980 | <name>name</name> |
981 | <cstring>GroupBox5</cstring> | 981 | <cstring>GroupBox5</cstring> |
982 | </property> | 982 | </property> |
983 | <property stdset="1"> | 983 | <property stdset="1"> |
984 | <name>title</name> | 984 | <name>title</name> |
985 | <string>Warnings</string> | 985 | <string>Warnings</string> |
986 | </property> | 986 | </property> |
987 | <property> | 987 | <property> |
988 | <name>layoutMargin</name> | 988 | <name>layoutMargin</name> |
989 | </property> | 989 | </property> |
990 | <property> | 990 | <property> |
991 | <name>layoutSpacing</name> | 991 | <name>layoutSpacing</name> |
992 | </property> | 992 | </property> |
993 | <grid> | 993 | <grid> |
994 | <property stdset="1"> | 994 | <property stdset="1"> |
995 | <name>margin</name> | 995 | <name>margin</name> |
996 | <number>5</number> | 996 | <number>5</number> |
997 | </property> | 997 | </property> |
998 | <property stdset="1"> | 998 | <property stdset="1"> |
999 | <name>spacing</name> | 999 | <name>spacing</name> |
1000 | <number>3</number> | 1000 | <number>3</number> |
1001 | </property> | 1001 | </property> |
1002 | <widget row="0" column="0" > | 1002 | <widget row="0" column="0" > |
1003 | <class>QLabel</class> | 1003 | <class>QLabel</class> |
1004 | <property stdset="1"> | 1004 | <property stdset="1"> |
1005 | <name>name</name> | 1005 | <name>name</name> |
1006 | <cstring>TextLabel1</cstring> | 1006 | <cstring>TextLabel1</cstring> |
1007 | </property> | 1007 | </property> |
1008 | <property stdset="1"> | 1008 | <property stdset="1"> |
1009 | <name>sizePolicy</name> | 1009 | <name>sizePolicy</name> |
1010 | <sizepolicy> | 1010 | <sizepolicy> |
1011 | <hsizetype>3</hsizetype> | 1011 | <hsizetype>3</hsizetype> |
1012 | <vsizetype>5</vsizetype> | 1012 | <vsizetype>5</vsizetype> |
1013 | </sizepolicy> | 1013 | </sizepolicy> |
1014 | </property> | 1014 | </property> |
1015 | <property stdset="1"> | 1015 | <property stdset="1"> |
1016 | <name>text</name> | 1016 | <name>text</name> |
1017 | <string>Low power warning interval</string> | 1017 | <string>Low power warning interval</string> |
1018 | </property> | 1018 | </property> |
1019 | <property stdset="1"> | 1019 | <property stdset="1"> |
1020 | <name>alignment</name> | 1020 | <name>alignment</name> |
1021 | <set>WordBreak|AlignVCenter|AlignLeft</set> | 1021 | <set>WordBreak|AlignVCenter|AlignLeft</set> |
1022 | </property> | 1022 | </property> |
1023 | <property> | 1023 | <property> |
1024 | <name>wordwrap</name> | 1024 | <name>wordwrap</name> |
1025 | </property> | 1025 | </property> |
1026 | </widget> | 1026 | </widget> |
1027 | <widget row="1" column="1" > | 1027 | <widget row="1" column="1" > |
1028 | <class>QSpinBox</class> | 1028 | <class>QSpinBox</class> |
1029 | <property stdset="1"> | 1029 | <property stdset="1"> |
1030 | <name>name</name> | 1030 | <name>name</name> |
1031 | <cstring>lowSpinBox</cstring> | 1031 | <cstring>lowSpinBox</cstring> |
1032 | </property> | 1032 | </property> |
1033 | <property stdset="1"> | 1033 | <property stdset="1"> |
1034 | <name>suffix</name> | 1034 | <name>suffix</name> |
1035 | <string> %</string> | 1035 | <string> %</string> |
1036 | </property> | 1036 | </property> |
1037 | <property stdset="1"> | 1037 | <property stdset="1"> |
1038 | <name>buttonSymbols</name> | 1038 | <name>buttonSymbols</name> |
1039 | <enum>PlusMinus</enum> | 1039 | <enum>PlusMinus</enum> |
1040 | </property> | 1040 | </property> |
1041 | <property stdset="1"> | 1041 | <property stdset="1"> |
1042 | <name>maxValue</name> | 1042 | <name>maxValue</name> |
1043 | <number>80</number> | 1043 | <number>80</number> |
1044 | </property> | 1044 | </property> |
1045 | <property stdset="1"> | 1045 | <property stdset="1"> |
1046 | <name>minValue</name> | 1046 | <name>minValue</name> |
1047 | <number>2</number> | 1047 | <number>2</number> |
1048 | </property> | 1048 | </property> |
1049 | <property> | 1049 | <property> |
1050 | <name>whatsThis</name> | 1050 | <name>whatsThis</name> |
1051 | <string>At what battery level should the low power warning pop up</string> | 1051 | <string>At what battery level should the low power warning pop up</string> |
1052 | </property> | 1052 | </property> |
1053 | </widget> | 1053 | </widget> |
1054 | <widget row="0" column="1" > | 1054 | <widget row="0" column="1" > |
1055 | <class>QSpinBox</class> | 1055 | <class>QSpinBox</class> |
1056 | <property stdset="1"> | 1056 | <property stdset="1"> |
1057 | <name>name</name> | 1057 | <name>name</name> |
1058 | <cstring>warnintervalBox</cstring> | 1058 | <cstring>warnintervalBox</cstring> |
1059 | </property> | 1059 | </property> |
1060 | <property stdset="1"> | 1060 | <property stdset="1"> |
1061 | <name>suffix</name> | 1061 | <name>suffix</name> |
1062 | <string> sec</string> | 1062 | <string> sec</string> |
1063 | </property> | 1063 | </property> |
1064 | <property stdset="1"> | 1064 | <property stdset="1"> |
1065 | <name>specialValueText</name> | ||
1066 | <string>never</string> | ||
1067 | </property> | ||
1068 | <property stdset="1"> | ||
1069 | <name>wrapping</name> | ||
1070 | <bool>true</bool> | ||
1071 | </property> | ||
1072 | <property stdset="1"> | ||
1065 | <name>buttonSymbols</name> | 1073 | <name>buttonSymbols</name> |
1066 | <enum>PlusMinus</enum> | 1074 | <enum>PlusMinus</enum> |
1067 | </property> | 1075 | </property> |
1068 | <property stdset="1"> | 1076 | <property stdset="1"> |
1069 | <name>maxValue</name> | 1077 | <name>maxValue</name> |
1070 | <number>60</number> | 1078 | <number>300</number> |
1071 | </property> | 1079 | </property> |
1072 | <property stdset="1"> | 1080 | <property stdset="1"> |
1073 | <name>minValue</name> | 1081 | <name>minValue</name> |
1082 | <number>0</number> | ||
1083 | </property> | ||
1084 | <property stdset="1"> | ||
1085 | <name>lineStep</name> | ||
1086 | <number>5</number> | ||
1087 | </property> | ||
1088 | <property stdset="1"> | ||
1089 | <name>value</name> | ||
1074 | <number>5</number> | 1090 | <number>5</number> |
1075 | </property> | 1091 | </property> |
1076 | <property> | 1092 | <property> |
1077 | <name>whatsThis</name> | 1093 | <name>whatsThis</name> |
1078 | <string>how often should be checked for low power. This determines the rate popups occure in low power situations</string> | 1094 | <string>how often should be checked for low power. This determines the rate popups occure in low power situations</string> |
1079 | </property> | 1095 | </property> |
1080 | </widget> | 1096 | </widget> |
1081 | <widget row="2" column="1" > | 1097 | <widget row="2" column="1" > |
1082 | <class>QSpinBox</class> | 1098 | <class>QSpinBox</class> |
1083 | <property stdset="1"> | 1099 | <property stdset="1"> |
1084 | <name>name</name> | 1100 | <name>name</name> |
1085 | <cstring>criticalSpinBox</cstring> | 1101 | <cstring>criticalSpinBox</cstring> |
1086 | </property> | 1102 | </property> |
1087 | <property stdset="1"> | 1103 | <property stdset="1"> |
1088 | <name>prefix</name> | 1104 | <name>prefix</name> |
1089 | <string></string> | 1105 | <string></string> |
1090 | </property> | 1106 | </property> |
1091 | <property stdset="1"> | 1107 | <property stdset="1"> |
1092 | <name>suffix</name> | 1108 | <name>suffix</name> |
1093 | <string> %</string> | 1109 | <string> %</string> |
1094 | </property> | 1110 | </property> |
1095 | <property stdset="1"> | 1111 | <property stdset="1"> |
1096 | <name>buttonSymbols</name> | 1112 | <name>buttonSymbols</name> |
1097 | <enum>PlusMinus</enum> | 1113 | <enum>PlusMinus</enum> |
1098 | </property> | 1114 | </property> |
1099 | <property stdset="1"> | 1115 | <property stdset="1"> |
1100 | <name>maxValue</name> | 1116 | <name>maxValue</name> |
1101 | <number>80</number> | 1117 | <number>80</number> |
1102 | </property> | 1118 | </property> |
1103 | <property stdset="1"> | 1119 | <property stdset="1"> |
1104 | <name>minValue</name> | 1120 | <name>minValue</name> |
1105 | <number>2</number> | 1121 | <number>2</number> |
1106 | </property> | 1122 | </property> |
1107 | <property> | 1123 | <property> |
1108 | <name>whatsThis</name> | 1124 | <name>whatsThis</name> |
1109 | <string>At what battery level should the critical power warning pop up</string> | 1125 | <string>At what battery level should the critical power warning pop up</string> |
1110 | </property> | 1126 | </property> |
1111 | </widget> | 1127 | </widget> |
1112 | <widget row="1" column="0" > | 1128 | <widget row="1" column="0" > |
1113 | <class>QLabel</class> | 1129 | <class>QLabel</class> |
1114 | <property stdset="1"> | 1130 | <property stdset="1"> |
1115 | <name>name</name> | 1131 | <name>name</name> |
1116 | <cstring>TextLabel2</cstring> | 1132 | <cstring>TextLabel2</cstring> |
1117 | </property> | 1133 | </property> |
1118 | <property stdset="1"> | 1134 | <property stdset="1"> |
1119 | <name>sizePolicy</name> | 1135 | <name>sizePolicy</name> |
1120 | <sizepolicy> | 1136 | <sizepolicy> |
1121 | <hsizetype>1</hsizetype> | 1137 | <hsizetype>1</hsizetype> |
1122 | <vsizetype>5</vsizetype> | 1138 | <vsizetype>5</vsizetype> |
1123 | </sizepolicy> | 1139 | </sizepolicy> |
1124 | </property> | 1140 | </property> |
1125 | <property stdset="1"> | 1141 | <property stdset="1"> |
1126 | <name>text</name> | 1142 | <name>text</name> |
1127 | <string>very low battery warning at</string> | 1143 | <string>very low battery warning at</string> |
1128 | </property> | 1144 | </property> |
1129 | </widget> | 1145 | </widget> |
1130 | <widget row="2" column="0" > | 1146 | <widget row="2" column="0" > |
1131 | <class>QLabel</class> | 1147 | <class>QLabel</class> |
1132 | <property stdset="1"> | 1148 | <property stdset="1"> |
1133 | <name>name</name> | 1149 | <name>name</name> |
1134 | <cstring>TextLabel3</cstring> | 1150 | <cstring>TextLabel3</cstring> |
1135 | </property> | 1151 | </property> |
1136 | <property stdset="1"> | 1152 | <property stdset="1"> |
1137 | <name>sizePolicy</name> | 1153 | <name>sizePolicy</name> |
1138 | <sizepolicy> | 1154 | <sizepolicy> |
1139 | <hsizetype>1</hsizetype> | 1155 | <hsizetype>1</hsizetype> |
1140 | <vsizetype>5</vsizetype> | 1156 | <vsizetype>5</vsizetype> |
1141 | </sizepolicy> | 1157 | </sizepolicy> |
1142 | </property> | 1158 | </property> |
1143 | <property stdset="1"> | 1159 | <property stdset="1"> |
1144 | <name>text</name> | 1160 | <name>text</name> |
1145 | <string>critical power warning at</string> | 1161 | <string>critical power warning at</string> |
1146 | </property> | 1162 | </property> |
1147 | </widget> | 1163 | </widget> |
1148 | </grid> | 1164 | </grid> |
1149 | </widget> | 1165 | </widget> |
1150 | <spacer> | 1166 | <spacer> |
1151 | <property> | 1167 | <property> |
1152 | <name>name</name> | 1168 | <name>name</name> |
1153 | <cstring>Spacer1</cstring> | 1169 | <cstring>Spacer1</cstring> |
1154 | </property> | 1170 | </property> |
1155 | <property stdset="1"> | 1171 | <property stdset="1"> |
1156 | <name>orientation</name> | 1172 | <name>orientation</name> |
1157 | <enum>Vertical</enum> | 1173 | <enum>Vertical</enum> |
1158 | </property> | 1174 | </property> |
1159 | <property stdset="1"> | 1175 | <property stdset="1"> |
1160 | <name>sizeType</name> | 1176 | <name>sizeType</name> |
1161 | <enum>Expanding</enum> | 1177 | <enum>Expanding</enum> |
1162 | </property> | 1178 | </property> |
1163 | <property> | 1179 | <property> |
1164 | <name>sizeHint</name> | 1180 | <name>sizeHint</name> |
1165 | <size> | 1181 | <size> |
1166 | <width>20</width> | 1182 | <width>20</width> |
1167 | <height>20</height> | 1183 | <height>20</height> |
1168 | </size> | 1184 | </size> |
1169 | </property> | 1185 | </property> |