diff options
author | BogDan Vatra <bogdan.vatra@kdab.com> | 2014-06-21 15:03:03 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2014-06-25 16:24:56 +0200 |
commit | 8429c6a5a249b2e8d2b24c721bf10593c07484b3 (patch) | |
tree | 2ca46f0d5f82bb3bf1d9fb71adc00aad1152d3c0 /src/corelib/statemachine/qhistorystate.h | |
parent | dd70e2cb0f84bee434f2f7fb69a26732214ce690 (diff) |
Emit a notifications when defaultState and historyType are changed.
In order to properly use QHistoryState object in QML we need to know
when these properties are changed.
Change-Id: I28c783436410c84bc64a919ac18c183f7a5eb9ad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/corelib/statemachine/qhistorystate.h')
-rw-r--r-- | src/corelib/statemachine/qhistorystate.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/corelib/statemachine/qhistorystate.h b/src/corelib/statemachine/qhistorystate.h index 62278ac47a..024c7e4b1f 100644 --- a/src/corelib/statemachine/qhistorystate.h +++ b/src/corelib/statemachine/qhistorystate.h @@ -53,8 +53,8 @@ class QHistoryStatePrivate; class Q_CORE_EXPORT QHistoryState : public QAbstractState { Q_OBJECT - Q_PROPERTY(QAbstractState* defaultState READ defaultState WRITE setDefaultState) - Q_PROPERTY(HistoryType historyType READ historyType WRITE setHistoryType) + Q_PROPERTY(QAbstractState* defaultState READ defaultState WRITE setDefaultState NOTIFY defaultStateChanged) + Q_PROPERTY(HistoryType historyType READ historyType WRITE setHistoryType NOTIFY historyTypeChanged) Q_ENUMS(HistoryType) public: enum HistoryType { @@ -72,6 +72,18 @@ public: HistoryType historyType() const; void setHistoryType(HistoryType type); +Q_SIGNALS: + void defaultStateChanged( +#if !defined(Q_QDOC) + QPrivateSignal +#endif + ); + void historyTypeChanged( +#if !defined(Q_QDOC) + QPrivateSignal +#endif + ); + protected: void onEntry(QEvent *event); void onExit(QEvent *event); |