Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 6ed78e842caa17fd5c94d65d685685e0 > files > 155

qtscxml5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtscxml-overview.qdoc -->
  <title>Qt SCXML Overview | Qt SCXML 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtscxml-index.html">Qt SCXML</a></td><td >Qt SCXML Overview</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtscxml-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#data-models">Data Models</a></li>
<li class="level1"><a href="#qt-scxml-compiler">Qt SCXML Compiler</a></li>
<li class="level1"><a href="#logging-categories">Logging Categories</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt SCXML Overview</h1>
<span class="subtitle"></span>
<!-- $$$qtscxml-overview.html-description -->
<div class="descr"> <a name="details"></a>
<p>The Qt SCXML module provides classes for embedding state machines created from State Chart XML (SCXML) files in Qt applications. The SCXML files can be created using any suitable tool, such as a text editor or a simulator, as long as they comply to the <a href="http://www.w3.org/TR/scxml/">SCXML Specification</a>, with the restrictions and extensions described in <a href="qtscxml-scxml-compliance.html">SCXML Compliance</a>.</p>
<p>Parts of the application logic can be replaced with an encapsulated SCXML file. This enables creating a clear division between the application logic and the user interface implementation by using Qt Quick or Qt Widgets.</p>
<p>The Qt SCXML module differs from the State Machine framework in the Qt Core module in that Qt SCXML provides a <i>conforming processor</i> that can parse and process <i>conforming SCXML documents</i>. In Qt SCXML, state machines are read from separate SCXML files and integrated to Qt applications by instantiating the <a href="qscxmlstatemachine.html">QScxmlStateMachine</a> class and loading an SCXML file dynamically or by using the Qt SCXML Compiler to generate a subclass of <a href="qscxmlstatemachine.html">QScxmlStateMachine</a> that is instantiated. The communication with the SCXML document is provided by the signals and methods of the <a href="qscxmlstatemachine.html">QScxmlStateMachine</a> class.</p>
<p>The basic state machine concepts, <i>state</i>, <i>transition</i>, and <i>event</i> are based on those in the SCXML Specification. State charts provide a graphical way of modeling how a system reacts to stimuli. This is done by defining the possible states that the system can be in, and how the system can move from one state to another (transitions between states). A key characteristic of event-driven systems (such as Qt applications) is that behavior often depends not only on the last or current event, but also the events that preceded it. With state charts, this information is easy to express.</p>
<p>Qt SCXML integrates tightly with Qt's meta-object system; for example, transitions between states can be triggered by signals, and states can be configured to set properties and invoke methods on QObjects. Qt's event system is used to drive the state machines.</p>
<p>The state graph in Qt SCXML is hierarchical. States can be nested inside other states, and the current configuration of the state machine consists of the set of states that are currently active.</p>
<a name="data-models"></a>
<h2 id="data-models">Data Models</h2>
<p>Qt SCXML supports the null data model, which must be supported by conforming SCXML processors, and the ECMAScript data model. In addition, Qt SCXML provices its own C++ data model that is implemented by the <a href="qscxmlcppdatamodel.html">QScxmlCppDataModel</a> class. The class enables writing C++ code for <i>expr</i> attributes and <code>&lt;script&gt;</code> elements. The <i>data part</i> of the data model is backed by a subclass of <a href="qscxmlcppdatamodel.html">QScxmlCppDataModel</a>, for which the Qt SCXML compiler will generate the dispatch methods.</p>
<a name="qt-scxml-compiler"></a>
<h2 id="qt-scxml-compiler">Qt SCXML Compiler</h2>
<p>The Qt SCXML Compiler, <code>qscxmlc</code>, reads an .scxml file and produces C++ source and header files that contain a class that implements a state machine as defined in SCXML. For more information about using the compiler, see <a href="qscxmlc.html">Using the Qt SCXML Compiler (qscxmlc)</a>.</p>
<p>Both the dynamically created and the compiled state machines behave in the same way, have the same properties, states, data model, and so on. They only differ in the way they are instantiated. For more information, see <a href="qtscxml-instantiating-state-machines.html">Instantiating State Machines</a> and <a href="examples-qtscxml.html">Qt SCXML Examples</a>.</p>
<a name="logging-categories"></a>
<h2 id="logging-categories">Logging Categories</h2>
<p>The Qt SCXML module exports the following logging categories:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Logging Category</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td >qscxmlLog</td><td >Enables Qt SCXML module log</td></tr>
<tr valign="top" class="even"><td >scxmlLog</td><td >Enables log of SCXML documents</td></tr>
</table></div>
</div>
<!-- @@@qtscxml-overview.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    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. </p>
</div>
</body>
</html>