KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
qsmwatcher_p.h
Go to the documentation of this file.
1/*
2 This file is part of the KDAB State Machine Editor Library.
3
4 SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Kevin Funk <kevin.funk@kdab.com>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR LicenseRef-KDAB-KDStateMachineEditor
8
9 Licensees holding valid commercial KDAB State Machine Editor Library
10 licenses may use this file in accordance with the KDAB State Machine Editor
11 Library License Agreement provided with the Software.
12
13 Contact info@kdab.com if any conditions of this licensing are not clear to you.
14*/
15
16#ifndef QSMWATCHER_H
17#define QSMWATCHER_H
18
19#include <QObject>
20#include <QVector>
21
22QT_BEGIN_NAMESPACE
23class QAbstractState;
24class QAbstractState;
25class QAbstractTransition;
26class QState;
27class QStateMachine;
28QT_END_NAMESPACE
29
30class QSMWatcher : public QObject
31{
32 Q_OBJECT
33
34public:
35 explicit QSMWatcher(QObject *parent = nullptr);
37
38 void setWatchedStateMachine(QStateMachine *machine);
39 QStateMachine *watchedStateMachine() const;
40
41Q_SIGNALS:
42 void stateEntered(QAbstractState *state);
43 void stateExited(QAbstractState *state);
44
45 void transitionTriggered(QAbstractTransition *);
46
47 void watchedStateMachineChanged(QStateMachine *);
48
49private Q_SLOTS:
50 void watchState(QAbstractState *state);
51 void clearWatchedStates();
52
53 void handleStateEntered();
54 void handleStateExited();
55 void handleStateDestroyed();
56 void handleTransitionTriggered();
57
58private:
59 QStateMachine *m_watchedStateMachine;
60 QVector<QAbstractState *> m_watchedStates;
61
62 QAbstractState *m_lastEnteredState;
63 QAbstractState *m_lastExitedState;
64};
65
66#endif // QSMWATCHER_H
void setWatchedStateMachine(QStateMachine *machine)
void stateExited(QAbstractState *state)
QStateMachine * watchedStateMachine() const
void transitionTriggered(QAbstractTransition *)
void watchedStateMachineChanged(QStateMachine *)
void stateEntered(QAbstractState *state)

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor
Generated on Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8