ステートチャートの作成

Qt Creator を使用して、ステートマシンを組み込んだアプリケーションを作成できます。ファイル・ウィザードは、ボイラープレート・コードを含むステート・チャート XML(SCXML)ファイルを作成し、SCXML エディターを使って編集することができます。のクラスを使用して、SCXML エディタを使用して編集できます。 Qt SCXMLモジュールのクラスを使用して、ファイルから作成されたステートマシンを Qt アプリケーションに埋め込むことができます。

SCXMLエディタ

状態図を作成するには

  1. File >New File >Files and Classes >Modeling >State Chart >Choose を選択して空の状態図を作成し、SCXML エディタで開きます。
  2. 状態をCommon States ビュー(1)から状態エディタ(2)にドラッグします。
  3. 子状態を初期状態にドラッグして複合状態を作成するか、ツールボタン(3)を使用して選択状態とそのターゲット状態からの遷移を作成します。
  4. エディタまたはStructure ビュー(5)で状態を選択し、Attributes ビュー(6)でその属性を編集します。
  5. トランジション・ライン(4)を選択して、エッジ・ポイントを追加します。
  6. イベントの発生や送信を行うには、コンテキストメニューのコマンドを使用して、<onentry><onexit> 要素の状態や遷移に実行可能なコンテンツを追加します。

SCXML ステートチャートの編集も参照してください

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.