summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.h
Unidiff
Diffstat (limited to 'core/launcher/desktop.h') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h
index 1f8daa0..6cb7ab2 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -24,8 +24,9 @@
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 29
29#include <qwidget.h> 30#include <qwidget.h>
30#include <qdatetime.h> 31#include <qdatetime.h>
31 32
@@ -47,15 +48,14 @@ public:
47 ~DesktopApplication(); 48 ~DesktopApplication();
48 49
49 static void switchLCD ( bool on ); // only for togglePower in Desktop 50 static void switchLCD ( bool on ); // only for togglePower in Desktop
50 51
52 static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar
53
51signals: 54signals:
52 void menu(); 55 void menu();
53 void home(); 56 void home();
54 void datebook();
55 void contacts();
56 void launch(); 57 void launch();
57 void email();
58 void backlight(); 58 void backlight();
59 void power(); 59 void power();
60 void symbol(); 60 void symbol();
61 void numLockStateToggle(); 61 void numLockStateToggle();
@@ -71,15 +71,24 @@ protected:
71 void shutdown(); 71 void shutdown();
72 void restart(); 72 void restart();
73 73
74public slots: 74public slots:
75 virtual void desktopMessage ( const QCString &msg, const QByteArray &data );
76 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 );
77 void rereadVolumes();
77 78
78protected slots: 79protected slots:
79 void shutdown( ShutdownImpl::Type ); 80 void shutdown( ShutdownImpl::Type );
80 void apmTimeout(); 81 void apmTimeout();
81 void sendCard(); 82 void sendHeldAction ( );
83
84protected:
85 virtual bool eventFilter ( QObject *o, QEvent *e );
86 void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat );
87
88private:
89 static DesktopApplication *me ( );
90
82private: 91private:
83 void reloadPowerWarnSettings(); 92 void reloadPowerWarnSettings();
84 DesktopPowerAlerter *pa; 93 DesktopPowerAlerter *pa;
85 PowerStatus *m_ps, *m_ps_last; 94 PowerStatus *m_ps, *m_ps_last;
@@ -89,8 +98,15 @@ private:
89 QTimer * m_timer; 98 QTimer * m_timer;
90 int m_powerVeryLow; 99 int m_powerVeryLow;
91 int m_powerCritical; 100 int m_powerCritical;
92 int m_currentPowerLevel; 101 int m_currentPowerLevel;
102
103 const Opie::ODeviceButton *m_last_button;
104 QTimer *m_button_timer;
105
106 bool m_keyclick_sound : 1;
107 bool m_screentap_sound : 1;
108 bool m_alarm_sound : 1;
93}; 109};
94 110
95 111
96class Desktop : public QWidget 112class Desktop : public QWidget
@@ -104,28 +120,16 @@ public:
104 120
105 void show(); 121 void show();
106 void checkMemory(); 122 void checkMemory();
107 123
108 void keyClick();
109 void screenClick();
110 static void soundAlarm();
111
112public slots: 124public slots:
113 void raiseDatebook();
114 void raiseContacts();
115 void raiseMenu();
116 void raiseLauncher();
117 void raiseEmail();
118 void execAutoStart(); 125 void execAutoStart();
119 void togglePower(); 126 void togglePower();
120 void toggleLight(); 127 void toggleLight();
121 void toggleNumLockState(); 128 void toggleNumLockState();
122 void toggleCapsLockState(); 129 void toggleCapsLockState();
123 void toggleSymbolInput(); 130 void toggleSymbolInput();
124 void terminateServers(); 131 void terminateServers();
125 void rereadVolumes();
126
127 void home ( );
128 132
129protected: 133protected:
130 void executeOrModify( const QString& appLnkFile ); 134 void executeOrModify( const QString& appLnkFile );
131 void styleChange( QStyle & ); 135 void styleChange( QStyle & );
@@ -143,9 +147,8 @@ private:
143 TransferServer *transferServer; 147 TransferServer *transferServer;
144 PackageSlave *packageSlave; 148 PackageSlave *packageSlave;
145 149
146 QDateTime suspendTime; 150 QDateTime suspendTime;
147 bool keyclick, touchclick, alarmsound;
148}; 151};
149 152
150 153
151#endif // __DESKTOP_H__ 154#endif // __DESKTOP_H__