summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Unidiff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 8158128..8af568d 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -13,24 +13,25 @@
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#include "startmenu.h" 21#include "startmenu.h"
22#include "inputmethods.h" 22#include "inputmethods.h"
23#include "runningappbar.h" 23#include "runningappbar.h"
24#include "systray.h" 24#include "systray.h"
25#include "calibrate.h"
25#include "wait.h" 26#include "wait.h"
26#include "appicons.h" 27#include "appicons.h"
27 28
28#include "taskbar.h" 29#include "taskbar.h"
29#include "desktop.h" 30#include "desktop.h"
30 31
31#include <qpe/qpeapplication.h> 32#include <qpe/qpeapplication.h>
32#include <qpe/qcopenvelope_qws.h> 33#include <qpe/qcopenvelope_qws.h>
33#include <qpe/global.h> 34#include <qpe/global.h>
34 35
35#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ ) 36#if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ )
36#include <qpe/custom.h> 37#include <qpe/custom.h>
@@ -72,30 +73,33 @@ using namespace Opie;
72#include "../launcher/apps.h" 73#include "../launcher/apps.h"
73#undef APP 74#undef APP
74#endif // SINGLE_APP 75#endif // SINGLE_APP
75 76
76static Global::Command builtins[] = { 77static Global::Command builtins[] = {
77 78
78#ifdef SINGLE_APP 79#ifdef SINGLE_APP
79#define APP(a,b,c,d) { a, new##b, c }, 80#define APP(a,b,c,d) { a, new##b, c },
80#include "../launcher/apps.h" 81#include "../launcher/apps.h"
81#undef APP 82#undef APP
82#endif 83#endif
83 84
85#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX)
86 { "calibrate", TaskBar::calibrate, 1, 0 },
87#endif
84#if !defined(QT_QWS_CASSIOPEIA) 88#if !defined(QT_QWS_CASSIOPEIA)
85 { "shutdown", Global::shutdown, 1, 0 }, 89 { "shutdown", Global::shutdown, 1, 0 },
86// { "run", run, 1, 0 }, 90// { "run", run, 1, 0 },
87#endif 91#endif
88 92
89 { 0, 0, 0, 0 }, 93 { 0, TaskBar::calibrate, 0, 0 },
90}; 94};
91 95
92static bool initNumLock() 96static bool initNumLock()
93{ 97{
94#ifdef QPE_INITIAL_NUMLOCK_STATE 98#ifdef QPE_INITIAL_NUMLOCK_STATE
95 QPE_INITIAL_NUMLOCK_STATE 99 QPE_INITIAL_NUMLOCK_STATE
96#endif 100#endif
97 return FALSE; 101 return FALSE;
98} 102}
99 103
100class LockKeyState : public QWidget 104class LockKeyState : public QWidget
101{ 105{
@@ -293,24 +297,35 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
293 else if ( msg == "toggleMenu()" ) { 297 else if ( msg == "toggleMenu()" ) {
294 if ( sm-> launchMenu-> isVisible ( )) 298 if ( sm-> launchMenu-> isVisible ( ))
295 sm-> launch ( ); 299 sm-> launch ( );
296 else { 300 else {
297 QCopEnvelope e ( "QPE/System", "toggleApplicationMenu()" ); 301 QCopEnvelope e ( "QPE/System", "toggleApplicationMenu()" );
298 } 302 }
299 } 303 }
300 else if ( msg == "toggleStartMenu()" ) { 304 else if ( msg == "toggleStartMenu()" ) {
301 sm-> launch ( ); 305 sm-> launch ( );
302 } 306 }
303} 307}
304 308
309QWidget *TaskBar::calibrate(bool)
310{
311#ifdef Q_WS_QWS
312 Calibrate *c = new Calibrate;
313 c->show();
314 return c;
315#else
316 return 0;
317#endif
318}
319
305void TaskBar::toggleNumLockState() 320void TaskBar::toggleNumLockState()
306{ 321{
307 if ( lockState ) lockState->toggleNumLockState(); 322 if ( lockState ) lockState->toggleNumLockState();
308} 323}
309 324
310void TaskBar::toggleCapsLockState() 325void TaskBar::toggleCapsLockState()
311{ 326{
312 if ( lockState ) lockState->toggleCapsLockState(); 327 if ( lockState ) lockState->toggleCapsLockState();
313} 328}
314 329
315void TaskBar::toggleSymbolInput() 330void TaskBar::toggleSymbolInput()
316{ 331{