66 void _tryNextStrategy();
69 QList<StrategyEntry> _strategies;
70 int _currentIndex = -1;
71 QString _successfulStrategy;
std::function< bool()> Strategy
Strategy action - returns true on success.
void onEnter() override
Override to perform actions on state entry.
int strategyCount() const
Get the total number of strategies.
void strategyFailed(const QString &name)
Emitted when a strategy fails and moving to next.
QString successfulStrategy() const
Get the name of the strategy that succeeded.
void tryingStrategy(const QString &name, int index, int total)
Emitted when trying a strategy.
void strategySucceeded(const QString &name)
Emitted when a strategy succeeds.
void addStrategy(const QString &name, Strategy action)
int currentStrategyIndex() const
Get the current strategy index being tried.
QString stateName() const