![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |
![]() |
The QPEApplication class implements various system services that are available to all Qtopia applications. More...
#include <qtopia/qpeapplication.h>
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.
By default, QLineEdit and QMultiLineEdit have the Words hint unless they have a QIntValidator, in which case they have the Number hint. This is appropriate for most cases, including the input of names (new names being added to the user's dictionary). All other widgets default to Normal mode.
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.
Under Qtopia Phone Edition this function does nothing. It is not possible to grab the keyboard under Qtopia Phone Edition.
See also ungrabKeyboard().
See also setInputMethodHint() and InputMethodHint.
See also setInputMethodHint() and InputMethodHint.
See also setMenuLike().
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.
For example, the phone key input method includes support for the names input methods:
The effect in the phone key input method is to modify the binding of phone keys to characters (such as making "@" easier to input), and to add additional "words" to the recognition word lists (such as "www").
If the current input method doesn't understand the hint, it will be ignored.
See also inputMethodHint() and InputMethodHint.
See also keepRunning().
Menu Like dialogs typically have a single list of options, and should accept the dialog when the select key is pressed on the appropriate item, and when a mouse/stylus is used to click on an item - just like menus. Menu Like dialogs should only have one widget accepting key focus.
By marking a dialog as Menu Like Qtopia will map the Back key to reject the dialog and will not map any key to accept the dialog - you must do that yourself.
The default dialog behaviour is to include a cancel menu option in the context menu to reject the dialog and to map the Back key to accept the dialog.
Only modal dialogs can be Menu Like.
See also isMenuLike().
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.
First availability: Qtopia 1.6
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 platform, copyright © 1995-2004 Trolltech, all rights reserved.
Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 2.1.1
|