summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorsandman <sandman>2002-11-30 16:46:36 (UTC)
committer sandman <sandman>2002-11-30 16:46:36 (UTC)
commitfe672fd88ead7a987d66f03439eb860e67aeaca6 (patch) (unidiff)
tree99c97ac69ee929dd43d5f54faa901c62af6a8f03 /library/qpeapplication.cpp
parentcfb09f9ae7b710b3079320f3b268c45c3fae8979 (diff)
downloadopie-fe672fd88ead7a987d66f03439eb860e67aeaca6.zip
opie-fe672fd88ead7a987d66f03439eb860e67aeaca6.tar.gz
opie-fe672fd88ead7a987d66f03439eb860e67aeaca6.tar.bz2
Additional #include that is needed for some toolchains
(read: glibc include files)
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index c8e6e74..c782837 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1,408 +1,409 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the 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** $Id$ 19** $Id$
20** 20**
21**********************************************************************/ 21**********************************************************************/
22#define QTOPIA_INTERNAL_LANGLIST 22#define QTOPIA_INTERNAL_LANGLIST
23#include <stdlib.h> 23#include <stdlib.h>
24#include <unistd.h> 24#include <unistd.h>
25#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
25#include <qfile.h> 26#include <qfile.h>
26#ifdef Q_WS_QWS 27#ifdef Q_WS_QWS
27#ifndef QT_NO_COP 28#ifndef QT_NO_COP
28#if QT_VERSION <= 231 29#if QT_VERSION <= 231
29#define private public 30#define private public
30#define sendLocally processEvent 31#define sendLocally processEvent
31#include "qcopenvelope_qws.h" 32#include "qcopenvelope_qws.h"
32#undef private 33#undef private
33#else 34#else
34#include "qcopenvelope_qws.h" 35#include "qcopenvelope_qws.h"
35#endif 36#endif
36#endif 37#endif
37#include <qwindowsystem_qws.h> 38#include <qwindowsystem_qws.h>
38#endif 39#endif
39#include <qtextstream.h> 40#include <qtextstream.h>
40#include <qpalette.h> 41#include <qpalette.h>
41#include <qbuffer.h> 42#include <qbuffer.h>
42#include <qptrdict.h> 43#include <qptrdict.h>
43#include <qregexp.h> 44#include <qregexp.h>
44#include <qdir.h> 45#include <qdir.h>
45#include <qlabel.h> 46#include <qlabel.h>
46#include <qdialog.h> 47#include <qdialog.h>
47#include <qdragobject.h> 48#include <qdragobject.h>
48#include <qtextcodec.h> 49#include <qtextcodec.h>
49#include <qevent.h> 50#include <qevent.h>
50#include <qtooltip.h> 51#include <qtooltip.h>
51#include <qsignal.h> 52#include <qsignal.h>
52#include "qpeapplication.h" 53#include "qpeapplication.h"
53#include "qpestyle.h" 54#include "qpestyle.h"
54#include "styleinterface.h" 55#include "styleinterface.h"
55#if QT_VERSION >= 300 56#if QT_VERSION >= 300
56#include <qstylefactory.h> 57#include <qstylefactory.h>
57#else 58#else
58#include <qplatinumstyle.h> 59#include <qplatinumstyle.h>
59#include <qwindowsstyle.h> 60#include <qwindowsstyle.h>
60#include <qmotifstyle.h> 61#include <qmotifstyle.h>
61#include <qmotifplusstyle.h> 62#include <qmotifplusstyle.h>
62#include "lightstyle.h" 63#include "lightstyle.h"
63 64
64#include <qpe/qlibrary.h> 65#include <qpe/qlibrary.h>
65#endif 66#endif
66#include "global.h" 67#include "global.h"
67#include "resource.h" 68#include "resource.h"
68#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 69#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
69#include "qutfcodec.h" 70#include "qutfcodec.h"
70#endif 71#endif
71#include "config.h" 72#include "config.h"
72#include "network.h" 73#include "network.h"
73#ifdef QWS 74#ifdef QWS
74#include "fontmanager.h" 75#include "fontmanager.h"
75#endif 76#endif
76 77
77#include "alarmserver.h" 78#include "alarmserver.h"
78#include "applnk.h" 79#include "applnk.h"
79#include "qpemenubar.h" 80#include "qpemenubar.h"
80#include "textcodecinterface.h" 81#include "textcodecinterface.h"
81#include "imagecodecinterface.h" 82#include "imagecodecinterface.h"
82 83
83#include <unistd.h> 84#include <unistd.h>
84#include <sys/file.h> 85#include <sys/file.h>
85#include <sys/ioctl.h> 86#include <sys/ioctl.h>
86#include <sys/soundcard.h> 87#include <sys/soundcard.h>
87 88
88 89
89class QPEApplicationData 90class QPEApplicationData
90{ 91{
91public: 92public:
92 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ), 93 QPEApplicationData() : presstimer( 0 ), presswidget( 0 ), rightpressed( FALSE ),
93 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ), 94 kbgrabber( 0 ), kbregrab( FALSE ), notbusysent( FALSE ), preloaded( FALSE ),
94 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ), 95 forceshow( FALSE ), nomaximize( FALSE ), qpe_main_widget( 0 ),
95 keep_running( TRUE ) 96 keep_running( TRUE )
96 { 97 {
97 qcopq.setAutoDelete( TRUE ); 98 qcopq.setAutoDelete( TRUE );
98 } 99 }
99 100
100 int presstimer; 101 int presstimer;
101 QWidget* presswidget; 102 QWidget* presswidget;
102 QPoint presspos; 103 QPoint presspos;
103bool rightpressed : 104bool rightpressed :
104 1; // AEH why not use uint foobar :1; if it's tt style -zecke 105 1; // AEH why not use uint foobar :1; if it's tt style -zecke
105 int kbgrabber; 106 int kbgrabber;
106bool kbregrab : 107bool kbregrab :
107 1; 108 1;
108bool notbusysent : 109bool notbusysent :
109 1; 110 1;
110 QString appName; 111 QString appName;
111 struct QCopRec 112 struct QCopRec
112 { 113 {
113 QCopRec( const QCString &ch, const QCString &msg, 114 QCopRec( const QCString &ch, const QCString &msg,
114 const QByteArray &d ) : 115 const QByteArray &d ) :
115 channel( ch ), message( msg ), data( d ) 116 channel( ch ), message( msg ), data( d )
116 { } 117 { }
117 118
118 QCString channel; 119 QCString channel;
119 QCString message; 120 QCString message;
120 QByteArray data; 121 QByteArray data;
121 }; 122 };
122bool preloaded : 123bool preloaded :
123 1; 124 1;
124bool forceshow : 125bool forceshow :
125 1; 126 1;
126bool nomaximize : 127bool nomaximize :
127 1; 128 1;
128 QWidget* qpe_main_widget; 129 QWidget* qpe_main_widget;
129bool keep_running : 130bool keep_running :
130 1; 131 1;
131 QList<QCopRec> qcopq; 132 QList<QCopRec> qcopq;
132 133
133 void enqueueQCop( const QCString &ch, const QCString &msg, 134 void enqueueQCop( const QCString &ch, const QCString &msg,
134 const QByteArray &data ) 135 const QByteArray &data )
135 { 136 {
136 qcopq.append( new QCopRec( ch, msg, data ) ); 137 qcopq.append( new QCopRec( ch, msg, data ) );
137 } 138 }
138 void sendQCopQ() 139 void sendQCopQ()
139 { 140 {
140 QCopRec * r; 141 QCopRec * r;
141#ifndef QT_NO_COP 142#ifndef QT_NO_COP
142 143
143 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it ) 144 for ( QListIterator<QCopRec> it( qcopq ); ( r = it.current() ); ++it )
144 QCopChannel::sendLocally( r->channel, r->message, r->data ); 145 QCopChannel::sendLocally( r->channel, r->message, r->data );
145#endif 146#endif
146 147
147 qcopq.clear(); 148 qcopq.clear();
148 } 149 }
149 static void show_mx(QWidget* mw, bool nomaximize) 150 static void show_mx(QWidget* mw, bool nomaximize)
150 { 151 {
151 if ( mw->layout() && mw->inherits("QDialog") ) { 152 if ( mw->layout() && mw->inherits("QDialog") ) {
152 QPEApplication::showDialog((QDialog*)mw, nomaximize); 153 QPEApplication::showDialog((QDialog*)mw, nomaximize);
153 } 154 }
154 else { 155 else {
155#ifdef Q_WS_QWS 156#ifdef Q_WS_QWS
156 if ( !nomaximize ) 157 if ( !nomaximize )
157 mw->showMaximized(); 158 mw->showMaximized();
158 else 159 else
159#endif 160#endif
160 161
161 mw->show(); 162 mw->show();
162 } 163 }
163 } 164 }
164 static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) 165 static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ )
165 { 166 {
166 /* 167 /*
167 // This works but disable it for now until it is safe to apply 168 // This works but disable it for now until it is safe to apply
168 // What is does is scan the .desktop files of all the apps for 169 // What is does is scan the .desktop files of all the apps for
169 // the applnk that has the corresponding argv[0] as this program 170 // the applnk that has the corresponding argv[0] as this program
170 // then it uses the name stored in the .desktop file as the caption 171 // then it uses the name stored in the .desktop file as the caption
171 // for the main widget. This saves duplicating translations for 172 // for the main widget. This saves duplicating translations for
172 // the app name in the program and in the .desktop files. 173 // the app name in the program and in the .desktop files.
173 174
174 AppLnkSet apps( appsPath ); 175 AppLnkSet apps( appsPath );
175 176
176 QList<AppLnk> appsList = apps.children(); 177 QList<AppLnk> appsList = apps.children();
177 for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { 178 for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) {
178 if ( (*it)->exec() == appName ) { 179 if ( (*it)->exec() == appName ) {
179 mw->setCaption( (*it)->name() ); 180 mw->setCaption( (*it)->name() );
180 return TRUE; 181 return TRUE;
181 } 182 }
182 } 183 }
183 */ 184 */
184 return FALSE; 185 return FALSE;
185 } 186 }
186 187
187 188
188 void show(QWidget* mw, bool nomax) 189 void show(QWidget* mw, bool nomax)
189 { 190 {
190 setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" ); 191 setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" );
191 nomaximize = nomax; 192 nomaximize = nomax;
192 qpe_main_widget = mw; 193 qpe_main_widget = mw;
193#ifndef QT_NO_COP 194#ifndef QT_NO_COP
194 195
195 sendQCopQ(); 196 sendQCopQ();
196#endif 197#endif
197 198
198 if ( preloaded ) { 199 if ( preloaded ) {
199 if (forceshow) 200 if (forceshow)
200 show_mx(mw, nomax); 201 show_mx(mw, nomax);
201 } 202 }
202 else if ( keep_running ) { 203 else if ( keep_running ) {
203 show_mx(mw, nomax); 204 show_mx(mw, nomax);
204 } 205 }
205 } 206 }
206 207
207 void loadTextCodecs() 208 void loadTextCodecs()
208 { 209 {
209 QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; 210 QString path = QPEApplication::qpeDir() + "/plugins/textcodecs";
210 QDir dir( path, "lib*.so" ); 211 QDir dir( path, "lib*.so" );
211 QStringList list = dir.entryList(); 212 QStringList list = dir.entryList();
212 QStringList::Iterator it; 213 QStringList::Iterator it;
213 for ( it = list.begin(); it != list.end(); ++it ) { 214 for ( it = list.begin(); it != list.end(); ++it ) {
214 TextCodecInterface *iface = 0; 215 TextCodecInterface *iface = 0;
215 QLibrary *lib = new QLibrary( path + "/" + *it ); 216 QLibrary *lib = new QLibrary( path + "/" + *it );
216 if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 217 if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
217 QValueList<int> mibs = iface->mibEnums(); 218 QValueList<int> mibs = iface->mibEnums();
218 for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { 219 for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) {
219 (void)iface->createForMib(*i); 220 (void)iface->createForMib(*i);
220 // ### it exists now; need to remember if we can delete it 221 // ### it exists now; need to remember if we can delete it
221 } 222 }
222 } 223 }
223 else { 224 else {
224 lib->unload(); 225 lib->unload();
225 delete lib; 226 delete lib;
226 } 227 }
227 } 228 }
228 } 229 }
229 230
230 void loadImageCodecs() 231 void loadImageCodecs()
231 { 232 {
232 QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; 233 QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs";
233 QDir dir( path, "lib*.so" ); 234 QDir dir( path, "lib*.so" );
234 QStringList list = dir.entryList(); 235 QStringList list = dir.entryList();
235 QStringList::Iterator it; 236 QStringList::Iterator it;
236 for ( it = list.begin(); it != list.end(); ++it ) { 237 for ( it = list.begin(); it != list.end(); ++it ) {
237 ImageCodecInterface *iface = 0; 238 ImageCodecInterface *iface = 0;
238 QLibrary *lib = new QLibrary( path + "/" + *it ); 239 QLibrary *lib = new QLibrary( path + "/" + *it );
239 if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { 240 if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
240 QStringList formats = iface->keys(); 241 QStringList formats = iface->keys();
241 for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { 242 for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) {
242 (void)iface->installIOHandler(*i); 243 (void)iface->installIOHandler(*i);
243 // ### it exists now; need to remember if we can delete it 244 // ### it exists now; need to remember if we can delete it
244 } 245 }
245 } 246 }
246 else { 247 else {
247 lib->unload(); 248 lib->unload();
248 delete lib; 249 delete lib;
249 } 250 }
250 } 251 }
251 } 252 }
252 QString styleName; 253 QString styleName;
253 QString decorationName; 254 QString decorationName;
254}; 255};
255 256
256class ResourceMimeFactory : public QMimeSourceFactory 257class ResourceMimeFactory : public QMimeSourceFactory
257{ 258{
258public: 259public:
259 ResourceMimeFactory() 260 ResourceMimeFactory()
260 { 261 {
261 setFilePath( Global::helpPath() ); 262 setFilePath( Global::helpPath() );
262 setExtensionType( "html", "text/html;charset=UTF-8" ); 263 setExtensionType( "html", "text/html;charset=UTF-8" );
263 } 264 }
264 265
265 const QMimeSource* data( const QString& abs_name ) const 266 const QMimeSource* data( const QString& abs_name ) const
266 { 267 {
267 const QMimeSource * r = QMimeSourceFactory::data( abs_name ); 268 const QMimeSource * r = QMimeSourceFactory::data( abs_name );
268 if ( !r ) { 269 if ( !r ) {
269 int sl = abs_name.length(); 270 int sl = abs_name.length();
270 do { 271 do {
271 sl = abs_name.findRev( '/', sl - 1 ); 272 sl = abs_name.findRev( '/', sl - 1 );
272 QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name; 273 QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name;
273 int dot = name.findRev( '.' ); 274 int dot = name.findRev( '.' );
274 if ( dot >= 0 ) 275 if ( dot >= 0 )
275 name = name.left( dot ); 276 name = name.left( dot );
276 QImage img = Resource::loadImage( name ); 277 QImage img = Resource::loadImage( name );
277 if ( !img.isNull() ) 278 if ( !img.isNull() )
278 r = new QImageDrag( img ); 279 r = new QImageDrag( img );
279 } 280 }
280 while ( !r && sl > 0 ); 281 while ( !r && sl > 0 );
281 } 282 }
282 return r; 283 return r;
283 } 284 }
284}; 285};
285 286
286static int muted = 0; 287static int muted = 0;
287static int micMuted = 0; 288static int micMuted = 0;
288 289
289static void setVolume( int t = 0, int percent = -1 ) 290static void setVolume( int t = 0, int percent = -1 )
290{ 291{
291 switch ( t ) { 292 switch ( t ) {
292 case 0: { 293 case 0: {
293 Config cfg( "qpe" ); 294 Config cfg( "qpe" );
294 cfg.setGroup( "Volume" ); 295 cfg.setGroup( "Volume" );
295 if ( percent < 0 ) 296 if ( percent < 0 )
296 percent = cfg.readNumEntry( "VolumePercent", 50 ); 297 percent = cfg.readNumEntry( "VolumePercent", 50 );
297 int fd = 0; 298 int fd = 0;
298 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { 299 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
299 int vol = muted ? 0 : percent; 300 int vol = muted ? 0 : percent;
300 // set both channels to same volume 301 // set both channels to same volume
301 vol |= vol << 8; 302 vol |= vol << 8;
302 ioctl( fd, MIXER_WRITE( 0 ), &vol ); 303 ioctl( fd, MIXER_WRITE( 0 ), &vol );
303 ::close( fd ); 304 ::close( fd );
304 } 305 }
305 } 306 }
306 break; 307 break;
307 } 308 }
308} 309}
309 310
310static void setMic( int t = 0, int percent = -1 ) 311static void setMic( int t = 0, int percent = -1 )
311{ 312{
312 switch ( t ) { 313 switch ( t ) {
313 case 0: { 314 case 0: {
314 Config cfg( "qpe" ); 315 Config cfg( "qpe" );
315 cfg.setGroup( "Volume" ); 316 cfg.setGroup( "Volume" );
316 if ( percent < 0 ) 317 if ( percent < 0 )
317 percent = cfg.readNumEntry( "Mic", 50 ); 318 percent = cfg.readNumEntry( "Mic", 50 );
318 319
319 int fd = 0; 320 int fd = 0;
320 int mic = micMuted ? 0 : percent; 321 int mic = micMuted ? 0 : percent;
321 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { 322 if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
322 ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic ); 323 ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic );
323 ::close( fd ); 324 ::close( fd );
324 } 325 }
325 } 326 }
326 break; 327 break;
327 } 328 }
328} 329}
329 330
330 331
331/*! 332/*!
332 \class QPEApplication qpeapplication.h 333 \class QPEApplication qpeapplication.h
333 \brief The QPEApplication class implements various system services 334 \brief The QPEApplication class implements various system services
334 that are available to all Qtopia applications. 335 that are available to all Qtopia applications.
335 336
336 Simply by using QPEApplication instead of QApplication, a standard Qt 337 Simply by using QPEApplication instead of QApplication, a standard Qt
337 application becomes a Qtopia application. It automatically follows 338 application becomes a Qtopia application. It automatically follows
338 style changes, quits and raises, and in the 339 style changes, quits and raises, and in the
339 case of \link docwidget.html document-oriented\endlink applications, 340 case of \link docwidget.html document-oriented\endlink applications,
340 changes the currently displayed document in response to the environment. 341 changes the currently displayed document in response to the environment.
341 342
342 To create a \link docwidget.html document-oriented\endlink 343 To create a \link docwidget.html document-oriented\endlink
343 application use showMainDocumentWidget(); to create a 344 application use showMainDocumentWidget(); to create a
344 non-document-oriented application use showMainWidget(). The 345 non-document-oriented application use showMainWidget(). The
345 keepRunning() function indicates whether the application will 346 keepRunning() function indicates whether the application will
346 continue running after it's processed the last \link qcop.html 347 continue running after it's processed the last \link qcop.html
347 QCop\endlink message. This can be changed using setKeepRunning(). 348 QCop\endlink message. This can be changed using setKeepRunning().
348 349
349 A variety of signals are emitted when certain events occur, for 350 A variety of signals are emitted when certain events occur, for
350 example, timeChanged(), clockChanged(), weekChanged(), 351 example, timeChanged(), clockChanged(), weekChanged(),
351 dateFormatChanged() and volumeChanged(). If the application receives 352 dateFormatChanged() and volumeChanged(). If the application receives
352 a \link qcop.html QCop\endlink message on the application's 353 a \link qcop.html QCop\endlink message on the application's
353 QPE/Application/\e{appname} channel, the appMessage() signal is 354 QPE/Application/\e{appname} channel, the appMessage() signal is
354 emitted. There are also flush() and reload() signals, which 355 emitted. There are also flush() and reload() signals, which
355 are emitted when synching begins and ends respectively - upon these 356 are emitted when synching begins and ends respectively - upon these
356 signals, the application should save and reload any data 357 signals, the application should save and reload any data
357 files that are involved in synching. Most of these signals will initially 358 files that are involved in synching. Most of these signals will initially
358 be received and unfiltered through the appMessage() signal. 359 be received and unfiltered through the appMessage() signal.
359 360
360 This class also provides a set of useful static functions. The 361 This class also provides a set of useful static functions. The
361 qpeDir() and documentDir() functions return the respective paths. 362 qpeDir() and documentDir() functions return the respective paths.
362 The grabKeyboard() and ungrabKeyboard() functions are used to 363 The grabKeyboard() and ungrabKeyboard() functions are used to
363 control whether the application takes control of the device's 364 control whether the application takes control of the device's
364 physical buttons (e.g. application launch keys). The stylus' mode of 365 physical buttons (e.g. application launch keys). The stylus' mode of
365 operation is set with setStylusOperation() and retrieved with 366 operation is set with setStylusOperation() and retrieved with
366 stylusOperation(). There are also setInputMethodHint() and 367 stylusOperation(). There are also setInputMethodHint() and
367 inputMethodHint() functions. 368 inputMethodHint() functions.
368 369
369 \ingroup qtopiaemb 370 \ingroup qtopiaemb
370*/ 371*/
371 372
372/*! 373/*!
373 \fn void QPEApplication::clientMoused() 374 \fn void QPEApplication::clientMoused()
374 375
375 \internal 376 \internal
376*/ 377*/
377 378
378/*! 379/*!
379 \fn void QPEApplication::timeChanged(); 380 \fn void QPEApplication::timeChanged();
380 This signal is emitted when the time changes outside the normal 381 This signal is emitted when the time changes outside the normal
381 passage of time, i.e. if the time is set backwards or forwards. 382 passage of time, i.e. if the time is set backwards or forwards.
382*/ 383*/
383 384
384/*! 385/*!
385 \fn void QPEApplication::clockChanged( bool ampm ); 386 \fn void QPEApplication::clockChanged( bool ampm );
386 387
387 This signal is emitted when the user changes the clock's style. If 388 This signal is emitted when the user changes the clock's style. If
388 \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, 389 \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise,
389 they want a 24-hour clock. 390 they want a 24-hour clock.
390*/ 391*/
391 392
392/*! 393/*!
393 \fn void QPEApplication::volumeChanged( bool muted ) 394 \fn void QPEApplication::volumeChanged( bool muted )
394 395
395 This signal is emitted whenever the mute state is changed. If \a 396 This signal is emitted whenever the mute state is changed. If \a
396 muted is TRUE, then sound output has been muted. 397 muted is TRUE, then sound output has been muted.
397*/ 398*/
398 399
399/*! 400/*!
400 \fn void QPEApplication::weekChanged( bool startOnMonday ) 401 \fn void QPEApplication::weekChanged( bool startOnMonday )
401 402
402 This signal is emitted if the week start day is changed. If \a 403 This signal is emitted if the week start day is changed. If \a
403 startOnMonday is TRUE then the first day of the week is Monday; if 404 startOnMonday is TRUE then the first day of the week is Monday; if
404 \a startOnMonday is FALSE then the first day of the week is 405 \a startOnMonday is FALSE then the first day of the week is
405 Sunday. 406 Sunday.
406*/ 407*/
407 408
408/*! 409/*!