もくじ
Qtopiaアプリケーション間で相互にメッセージをやり取りできるコマンド「QCopメッセージ」のページです.
一行コメント
Qtopiaのページの説明の訳
- 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 File Manager::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)
- QPE/System
- 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.
上記に載っていないメッセージ
QPE/Network
- 接続
- qcop QPE/Network 'start(QString,QString)' configurefile password # LANなどでは引数不要
- qcop QPE/Network 'connectRequest(QString,QString)' appname somemessage
- 切断(切断するかどうか問い合わせ−はい/いいえ)
- qcop QPE/Network 'stop()' # 問い合わせなし
- qcop QPE/Network 'disconnectRequest()'
- ネットワークが接続しているようにみせる
- qcop QPE/Network 'up()'
QPE/System
- システム再起動
- qcop QPE/System 'restart()'
- ディスクトップ再構築
- qcop QPE/System 'linkChanged(QString)'
- スクリーンセイバー停止
- qcop QPE/System 'setScreenSaverMode(int)' 0
- スクリーンセイバー再開
- qcop QPE/System 'setScreenSaverMode(int)' 3
- LCDを消す
- qcop QPE/System 'setBlankLCD(int)' 1
- LCDをつける
- qcop QPE/System 'setBlankLCD(int)' 0
- 縦横回転
- qcop QPE/System 'rotateChanged(QString)' # 引数不明
QPE/Application
- 日時指定でカレンダーを起動する
- qcop QPE/Application/datebook "showDay(int,int,int)" 2002 1 1
- Netfornt3.0でファイルを指定して起動する
- qcop QPE/System 'execute(QString,QString)' netfront3 file
- シンクロナイズ(PCリンク)開始
- qcop QPE/Application/qtsamba "invokeSync()"
ターミナルで使う
- 上記コマンドを単にうてばよい
- 例えば,ターミナルでネットワーク接続したいなら
$ qcop QPE/Network 'connectRequest()'
- 例えば,ターミナルでネットワーク接続したいなら
関連リンク
QPE/Network choicesChanged()
QPE/Network 2received(const QCString &, const QByteArray &)
networkMessage( const QCString &, const QByteArray &)
QPE/Network
up()
needed()
chooseNet()
start()
close()
down()
ensureMonitor()
setNetState()
available()
progress(QString,int)
failed()
update()
show()
repaint()
updateToggle()
setStatus()
clear()
hide()
text()
netFailed()
QPE/System volumeChange(bool)
QPE/Application/clock setDialyEnabled(int)
QPE/TaskBar reloadApplets()
QPE/System setBacklight(int)