-rw-r--r-- | core/launcher/desktop.cpp | 10 | ||||
-rw-r--r-- | core/launcher/desktop.h | 131 | ||||
-rw-r--r-- | core/launcher/main.cpp | 1 |
3 files changed, 72 insertions, 70 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 3546e28..9863187 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -415,7 +415,7 @@ void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & } else if ( msg == "setDisplayState(int)" ) { - int state; - stream >> state; - m_screensaver-> setDisplayState ( state != 0 ); + int state; + stream >> state; + m_screensaver-> setDisplayState ( state != 0 ); } else if ( msg == "suspend()" ) { @@ -476,10 +476,10 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) return TRUE; } - /* menu key now opens application menu/toolbar +// menu key now opens application menu/toolbar if ( ke->simpleData.keycode == Key_F11 ) { if ( press ) emit menu(); return TRUE; } - */ + if ( ke->simpleData.keycode == Key_F12 ) { while ( activePopupWidget() ) diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index 09ffe1c..5de85f4 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -42,47 +42,48 @@ class QPEScreenSaver; class DesktopApplication : public QPEApplication { - Q_OBJECT + Q_OBJECT public: - DesktopApplication( int& argc, char **argv, Type t ); - ~DesktopApplication(); + DesktopApplication( int& argc, char **argv, Type t ); + ~DesktopApplication(); - static void switchLCD ( bool on ); // only for togglePower in Desktop + static void switchLCD ( bool on ); // only for togglePower in Desktop signals: - void home(); - void datebook(); - void contacts(); - void launch(); - void email(); - void backlight(); - void power(); - void symbol(); - void numLockStateToggle(); - void capsLockStateToggle(); - void prepareForRestart(); + void menu(); + void home(); + void datebook(); + void contacts(); + void launch(); + void email(); + void backlight(); + void power(); + void symbol(); + void numLockStateToggle(); + void capsLockStateToggle(); + void prepareForRestart(); protected: #ifdef Q_WS_QWS - bool qwsEventFilter( QWSEvent * ); + bool qwsEventFilter( QWSEvent * ); #endif - void shutdown(); - void restart(); + void shutdown(); + void restart(); public slots: - virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); - virtual void systemMessage ( const QCString &msg, const QByteArray &data ); + virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); + virtual void systemMessage ( const QCString &msg, const QByteArray &data ); protected slots: - void shutdown( ShutdownImpl::Type ); - void psTimeout(); - void sendCard(); + void shutdown( ShutdownImpl::Type ); + void psTimeout(); + void sendCard(); private: - DesktopPowerAlerter *pa; - PowerStatus *ps; - QTimer *cardSendTimer; - QCopChannel *channel; - QPEScreenSaver *m_screensaver; + DesktopPowerAlerter *pa; + PowerStatus *ps; + QTimer *cardSendTimer; + QCopChannel *channel; + QPEScreenSaver *m_screensaver; }; @@ -90,54 +91,54 @@ private: class Desktop : public QWidget { - Q_OBJECT + Q_OBJECT public: - Desktop(); - ~Desktop(); + Desktop(); + ~Desktop(); - static bool screenLocked(); + static bool screenLocked(); - void show(); - void checkMemory(); + void show(); + void checkMemory(); - void keyClick(); - void screenClick(); - static void soundAlarm(); + void keyClick(); + void screenClick(); + static void soundAlarm(); public slots: - void raiseDatebook(); - void raiseContacts(); - void raiseMenu(); - void raiseLauncher(); - void raiseEmail(); - void execAutoStart(); - void togglePower(); - void toggleLight(); - void toggleNumLockState(); - void toggleCapsLockState(); - void toggleSymbolInput(); - void terminateServers(); - void rereadVolumes(); - - void home ( ); + void raiseDatebook(); + void raiseContacts(); + void raiseMenu(); + void raiseLauncher(); + void raiseEmail(); + void execAutoStart(); + void togglePower(); + void toggleLight(); + void toggleNumLockState(); + void toggleCapsLockState(); + void toggleSymbolInput(); + void terminateServers(); + void rereadVolumes(); + + void home ( ); protected: - void executeOrModify( const QString& appLnkFile ); - void styleChange( QStyle & ); - void timerEvent( QTimerEvent *e ); + void executeOrModify( const QString& appLnkFile ); + void styleChange( QStyle & ); + void timerEvent( QTimerEvent *e ); - QWidget *bg; - Launcher *launcher; - TaskBar *tb; + QWidget *bg; + Launcher *launcher; + TaskBar *tb; private: - void startTransferServer(); - bool recoverMemory(); + void startTransferServer(); + bool recoverMemory(); - QCopBridge *qcopBridge; - TransferServer *transferServer; - PackageSlave *packageSlave; + QCopBridge *qcopBridge; + TransferServer *transferServer; + PackageSlave *packageSlave; - QDateTime suspendTime; - bool keyclick, touchclick, alarmsound; + QDateTime suspendTime; + bool keyclick, touchclick, alarmsound; }; diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 762a596..8974ced 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -92,4 +92,5 @@ int initApplication( int argc, char ** argv ) Desktop *d = new Desktop(); + QObject::connect( &a, SIGNAL(menu()), d, SLOT(raiseMenu()) ); QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) ); QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) ); |