1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QHISTORYSTATE_P_H
5#define QHISTORYSTATE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "private/qabstractstate_p.h"
19
20#include <QtCore/qlist.h>
21
22#include <QtStateMachine/qabstracttransition.h>
23#include <QtStateMachine/qhistorystate.h>
24#include <QtCore/private/qproperty_p.h>
25#include <private/qstatemachineglobal_p.h>
26
27QT_REQUIRE_CONFIG(statemachine);
28
29QT_BEGIN_NAMESPACE
30
31class QHistoryStatePrivate : public QAbstractStatePrivate
32{
33 Q_DECLARE_PUBLIC(QHistoryState)
34
35public:
36 QHistoryStatePrivate();
37
38 static QHistoryStatePrivate *get(QHistoryState *q)
39 { return q->d_func(); }
40
41 void setDefaultTransition(QAbstractTransition* transition)
42 {
43 q_func()->setDefaultTransition(transition);
44 }
45 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QHistoryStatePrivate,
46 QAbstractTransition*, defaultTransition,
47 &QHistoryStatePrivate::setDefaultTransition, nullptr);
48
49 void historyTypeChanged()
50 {
51 emit q_func()->historyTypeChanged(QHistoryState::QPrivateSignal());
52 }
53 Q_OBJECT_BINDABLE_PROPERTY(QHistoryStatePrivate, QHistoryState::HistoryType,
54 historyType, &QHistoryStatePrivate::historyTypeChanged);
55
56 QList<QAbstractState*> configuration;
57};
58
59QT_END_NAMESPACE
60
61#endif // QHISTORYSTATE_P_H
62

source code of qtscxml/src/statemachine/qhistorystate_p.h