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
26QT_REQUIRE_CONFIG(statemachine);
27
28QT_BEGIN_NAMESPACE
29
30class QHistoryStatePrivate : public QAbstractStatePrivate
31{
32 Q_DECLARE_PUBLIC(QHistoryState)
33
34public:
35 QHistoryStatePrivate();
36
37 static QHistoryStatePrivate *get(QHistoryState *q)
38 { return q->d_func(); }
39
40 void setDefaultTransition(QAbstractTransition* transition)
41 {
42 q_func()->setDefaultTransition(transition);
43 }
44 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QHistoryStatePrivate,
45 QAbstractTransition*, defaultTransition,
46 &QHistoryStatePrivate::setDefaultTransition, nullptr);
47
48 void historyTypeChanged()
49 {
50 emit q_func()->historyTypeChanged(QHistoryState::QPrivateSignal());
51 }
52 Q_OBJECT_BINDABLE_PROPERTY(QHistoryStatePrivate, QHistoryState::HistoryType,
53 historyType, &QHistoryStatePrivate::historyTypeChanged);
54
55 QList<QAbstractState*> configuration;
56};
57
58QT_END_NAMESPACE
59
60#endif // QHISTORYSTATE_P_H
61

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