#include <GuardedTransition.h>
|
| using | Guard = std::function< bool()> |
| |
|
| bool | eventTest (QEvent *event) override |
| | Override to check guard before allowing transition.
|
| |
A transition that only fires if a guard predicate returns true Useful for conditional transitions based on runtime state
Definition at line 9 of file GuardedTransition.h.
◆ Guard
◆ GuardedTransition() [1/2]
template<typename Func >
| GuardedTransition::GuardedTransition |
( |
const typename QtPrivate::FunctionPointer< Func >::Object * |
sender, |
|
|
Func |
signalFn, |
|
|
QAbstractState * |
target, |
|
|
Guard |
guard |
|
) |
| |
|
inline |
Create a guarded transition
- Parameters
-
| sender | Object that emits the signal |
| signal | Signal that triggers the transition |
| target | Target state |
| guard | Predicate that must return true for transition to fire |
Definition at line 23 of file GuardedTransition.h.
◆ GuardedTransition() [2/2]
template<typename Func >
| GuardedTransition::GuardedTransition |
( |
const typename QtPrivate::FunctionPointer< Func >::Object * |
sender, |
|
|
Func |
signalFn, |
|
|
Guard |
guard |
|
) |
| |
|
inline |
Create a guarded transition without target (set later)
- Parameters
-
| sender | Object that emits the signal |
| signal | Signal that triggers the transition |
| guard | Predicate that must return true for transition to fire |
Definition at line 38 of file GuardedTransition.h.
◆ eventTest()
| bool GuardedTransition::eventTest |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
◆ guard()
| Guard GuardedTransition::guard |
( |
| ) |
const |
|
inline |
◆ setGuard()
| void GuardedTransition::setGuard |
( |
Guard |
guard | ) |
|
|
inline |
The documentation for this class was generated from the following files: