Qtopia - QCop Messages
QCop messages allow applications to communicate with each other.
These messages are sent using QCopEnvelope, and received by connecting
to a QCopChannel.
The channelname of channels within Qtopia all start with "QPE/".
The messagename is a function identifier followed by a list of types
in parentheses. There is no whitespace in the message name.
The variable names shown in this documentation are purely for
information purposes. A message shown as messageName(Type1 varname1, Type2 varname2, Type2 varname3) would be used in program
code as:
QCopEnvelope e(channelname, "messageName(Type1,Type2,Type2)");
e << parameter1 << parameter2 << parameter3;
The System-wide Channels and Messages.
QPE/System
- busy() -- Causes a wait indicator to be shown to the user.
- notBusy() -- Cancels the wait indicator.
- linkChanged(QString) -- Sent whenever a link is changed. It is sent
by FileManager::saveFile() and others, and received by the Launcher.
- applyStyle() -- Sent when user changes style. It is received by
QPEApplication and the application will redraw accordingly.
- quit() -- Terminates the Qtopia environment.
- shutdown() -- Terminates the system.
- restart() -- Restarts the Qtopia environment.
- execute(QString) -- Executes or raises the given application.
- execute(QString,QString) -- Executes or raises the given
application, passing an argument. Note that you should consider
using the QPE/Application/appname channels described
below.
- addAlarm(QDateTime,QCString,QCString,int) -- Internal. See
AlarmServer::addAlarm()
- deleteAlarm(QDateTime,QCString,QCString,int) -- Internal. See
AlarmServer::deleteAlarm()
- setDefaultRotation(int) -- Internal.
- grabKeyboard(QString) -- Internal.
- timeChange(QString) -- Internal.
- clockChange(bool) -- Internal.
- setScreenSaverInterval(int) -- Internal.
- language(QString) -- Internal.
QPE/Sync
- flush() -- Sent at the start of synchronization. Syncable
applications should save any syncable data to disk. Note: this message is currently asynchronous, but it may become synchronous in the future; this will require a slight modification of your code. We recommend responding fairly quickly to this message since the sync server does not wait long.
- reload() -- Sent at the end of synchronization. Syncable
applications should reload any syncable data from disk.
QPE/TaskBar
- message(QString) -- Internal. See Global::statusMessage()
- showInputMethod() -- Internal.
- hideInputMethod() -- Internal.
- reloadInputMethods() -- Internal.
- reloadApplets() -- Internal.
QPE/Card
- stabChanged() -- Sent when /var/run/stab,
/var/state/pcmcia/stab, or /var/lib/pcmcia/stab may have
changed.
- netUp() -- Sent when a network connection is running.
- netDown() -- Sent when a network connection is available, but not
running.
- netUnavailable() -- Sent when a network connection is not
available.
Qt/Tray
This channel allows Qt applications (not just Qtopia applications) to
show system-tray status in a cross-platform manner, but it is not
currently supported. See TaskbarAppletInterface for a more powerful
alternative for system tray applications.
- popup(int,QPoint)
- remove(int)
- setIcon(int,QPixmap)
- setToolTip(int,QString)
- doubleClicked(int,QPoint)
- clicked(int,QPoint)
The Application Channel
Each application listens on a channel called
QPE/Application/appname, where appname is
the executable name (the application identifier). Standard messages on
this channel are:
QPE/Application/appname
- setDocument(QString) -- Internal. Causes the setDocument(const
QString&) slot of the main document
widget to be called.
- nextView() -- Applications connected to hardware buttons will
receive this message if they are already visible.
- raise() -- Internal. Causes the the main document widget and the
current modal widget to be raised.
- quit() -- Internal. Terminates the application.
- quitIfInvisible() -- Internal. Terminates the application if it is
not shown.
The QPE/Application/appname channel has a special
property: when messages are sent to these channels via QCopEnvelope,
the message is delivered even if the application is not yet running
(the application is run and the message is then sent).
Application-specific Channels
Applications also respond to messages specific to the application.
Such messages in the base Qtopia applications are:
QPE/Application/helpbrowser
- showFile(QString file) -- Send this message to have the Help
Browser show a file. The file may be an absolute filename or
relative to the system HTML documentation directory
($QPEDIR/help/html).
QPE/Application/datebook
- alarm(QDateTime,int) -- Internal. Causes the Calendar application
to sound alarms.
Copyright © 2001-2002 Trolltech | Trademarks
| Qtopia version 1.5.0
|