summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstate.h
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan.vatra@kdab.com>2014-06-23 15:54:24 +0300
committerBogDan Vatra <bogdan@kde.org>2014-06-25 16:24:47 +0200
commitdd70e2cb0f84bee434f2f7fb69a26732214ce690 (patch)
tree25f519e280bebee75c925a9c934a989ad52841b1 /src/corelib/statemachine/qstate.h
parent7fa584254c3ed17b65211c6ae8e05bea66393d93 (diff)
Emit a notifications when childMode, initial and errorState are changed.
In order to properly use QState object in QML we need to know when these properties are changed. Change-Id: I37f8295e5201686a52d448cc42db331a8f8e792f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/corelib/statemachine/qstate.h')
-rw-r--r--src/corelib/statemachine/qstate.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h
index a5f2509ffb..09c98c30c6 100644
--- a/src/corelib/statemachine/qstate.h
+++ b/src/corelib/statemachine/qstate.h
@@ -58,9 +58,9 @@ class QStatePrivate;
class Q_CORE_EXPORT QState : public QAbstractState
{
Q_OBJECT
- Q_PROPERTY(QAbstractState* initialState READ initialState WRITE setInitialState)
- Q_PROPERTY(QAbstractState* errorState READ errorState WRITE setErrorState)
- Q_PROPERTY(ChildMode childMode READ childMode WRITE setChildMode)
+ Q_PROPERTY(QAbstractState* initialState READ initialState WRITE setInitialState NOTIFY initialStateChanged)
+ Q_PROPERTY(QAbstractState* errorState READ errorState WRITE setErrorState NOTIFY errorStateChanged)
+ Q_PROPERTY(ChildMode childMode READ childMode WRITE setChildMode NOTIFY childModeChanged)
Q_ENUMS(ChildMode RestorePolicy)
public:
enum ChildMode {
@@ -108,6 +108,21 @@ Q_SIGNALS:
QPrivateSignal
#endif
);
+ void childModeChanged(
+#if !defined(Q_QDOC)
+ QPrivateSignal
+#endif
+ );
+ void initialStateChanged(
+#if !defined(Q_QDOC)
+ QPrivateSignal
+#endif
+ );
+ void errorStateChanged(
+#if !defined(Q_QDOC)
+ QPrivateSignal
+#endif
+ );
protected:
void onEntry(QEvent *event);