Qt API | Qtopia API | Qtopia Documentation | ![]() |
The QPEApplication class implements various system services that are available to all Qtopia applications. More...
#include <qtopia/qpeapplication.h>
Inherits QApplication.
Simply by using QPEApplication instead of QApplication, a standard Qt application becomes a Qtopia application. It automatically follows style changes, quits and raises, and in the case of document-oriented applications, changes the currently displayed document in response to the environment.
To create a document-oriented application use showMainDocumentWidget(); to create a non-document-oriented application use showMainWidget(). The keepRunning() function indicates whether the application will continue running after it's processed the last QCop message. This can be changed using setKeepRunning().
A variety of signals are emitted when certain events occur, for example, timeChanged(), clockChanged(), weekChanged(), dateFormatChanged() and volumeChanged(). If the application receives a QCop message on the application's QPE/Application/appname channel, the appMessage() signal is emitted. There are also flush() and reload() signals, which are emitted when synching begins and ends respectively - upon these signals, the application should save and reload any data files that are involved in synching. Most of these signals will initially be received and unfiltered through the appMessage() signal.
This class also provides a set of useful static functions. The qpeDir() and documentDir() functions return the respective paths. The grabKeyboard() and ungrabKeyboard() functions are used to control whether the application takes control of the device's physical buttons (e.g. application launch keys). The stylus' mode of operation is set with setStylusOperation() and retrieved with stylusOperation(). There are also setInputMethodHint() and inputMethodHint() functions.
See also Qtopia Classes.
See also inputMethodHint() and setInputMethodHint().
See also setStylusOperation() and stylusOperation().
Currently, this is only used internally.
For applications, t should be the default, GuiClient. Only the Qtopia server passes GuiServer.
This signal is emitted when a message is received on this application's QPE/Application/appname QCop channel.
The slot to which you connect this signal uses msg and data in the following way:
void MyWidget::receive( const QCString& msg, const QByteArray& data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "someMessage(int,int,int)" ) { int a,b,c; stream >> a >> b >> c; ... } else if ( msg == "otherMessage(QString)" ) { ... } }
Note that messages received here may be processed by qpe application and emitted as signals, such as flush() and reload().
This signal is emitted whenever a category is added, removed or edited. Note, on Qtopia 1.5.0, this signal is never emitted.
This signal is emitted when the user changes the clock's style. If ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, they want a 24-hour clock.
Warning: if you use the TimeString functions, you should use TimeString::connectChange() instead.
See also dateFormatChanged().
This signal is emitted whenever the date format is changed.
Warning: if you use the TimeString functions, you should use TimeString::connectChange() instead.
See also clockChanged().
Shows and calls exec() on dialog. An heuristic approach is taken to determine the size and maximization of the dialog.
nomax forces it to not be maximized.
See also ungrabKeyboard().
See also setInputMethodHint() and InputMethodHint.
See also setKeepRunning().
This signal is emitted whenever an AppLnk or DocLnk is stored, removed or edited. linkFile contains the name of the link that is being modified.
See also inputMethodHint() and InputMethodHint.
See also keepRunning().
See also stylusOperation() and StylusMode.
This method temporarily overrides the current global screen saver with the screenSaverHint hint, allowing applications to control screensaver activation during their execution.
See also screenSaverHint.
Shows dialog. An heuristic approach is taken to determine the size and maximization of the dialog.
nomax forces it to not be maximized.
This calls designates the application as a document-oriented application.
The mw widget must have this slot: setDocument(const QString&).
See also showMainWidget().
See also showMainDocumentWidget().
See also setStylusOperation() and StylusMode.
This signal is emitted when the time changes outside the normal passage of time, i.e. if the time is set backwards or forwards.
If the application offers the TimeMonitor service, it will get the QCop message that causes this signal even if it is not running, thus allowing it to update any alarms or other time-related records.
This signal is emitted whenever the mute state is changed. If muted is TRUE, then sound output has been muted.
This signal is emitted if the week start day is changed. If startOnMonday is TRUE then the first day of the week is Monday; if startOnMonday is FALSE then the first day of the week is Sunday.
This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.
Copyright © 2001-2002 Trolltech | Trademarks | Qtopia version 1.7.0
|