Manages interactive tutorials by highlighting UI elements and guiding the user. More...
#include <tutorialmanager.h>
Public Slots | |
void | nextStep () |
Advances to the next tutorial step. | |
Signals | |
void | stepStarted (int index) |
Emitted when a new tutorial step starts. | |
void | tutorialFinished () |
Emitted when the full tutorial is finished. | |
void | ll1Finished () |
Emitted when the LL(1) tutorial ends. | |
void | slr1Finished () |
Emitted when the SLR(1) tutorial ends. | |
Public Member Functions | |
TutorialManager (QWidget *rootWindow) | |
Constructs a TutorialManager for a given window. | |
void | addStep (QWidget *target, const QString &htmlText) |
Adds a new step to the tutorial sequence. | |
void | start () |
Starts the tutorial from the beginning. | |
void | setRootWindow (QWidget *newRoot) |
Sets the root window (used for repositioning the overlay). | |
void | clearSteps () |
Clears all steps in the tutorial. | |
void | hideOverlay () |
Hides the tutorial overlay immediately. | |
void | finishLL1 () |
Ends the LL(1) tutorial sequence and emits its corresponding signal. | |
void | finishSLR1 () |
Ends the SLR(1) tutorial sequence and emits its corresponding signal. | |
Protected Member Functions | |
bool | eventFilter (QObject *obj, QEvent *ev) override |
Intercepts UI events to handle overlay behavior. | |
Manages interactive tutorials by highlighting UI elements and guiding the user.
This class implements a step-by-step overlay system that visually highlights widgets and shows textual instructions to guide the user through the interface. It supports multiple tutorials (e.g., for LL(1) and SLR(1) modes), with custom steps and signals for tutorial completion.
TutorialManager::TutorialManager | ( | QWidget * | rootWindow | ) |
Constructs a TutorialManager for a given window.
rootWindow | The main application window used for relative positioning. |
void TutorialManager::addStep | ( | QWidget * | target, |
const QString & | htmlText ) |
Adds a new step to the tutorial sequence.
target | The widget to highlight during the step. |
htmlText | The instructional HTML message for the step. |
void TutorialManager::clearSteps | ( | ) |
Clears all steps in the tutorial.
|
overrideprotected |
Intercepts UI events to handle overlay behavior.
void TutorialManager::finishLL1 | ( | ) |
Ends the LL(1) tutorial sequence and emits its corresponding signal.
void TutorialManager::finishSLR1 | ( | ) |
Ends the SLR(1) tutorial sequence and emits its corresponding signal.
void TutorialManager::hideOverlay | ( | ) |
Hides the tutorial overlay immediately.
|
signal |
Emitted when the LL(1) tutorial ends.
|
slot |
Advances to the next tutorial step.
void TutorialManager::setRootWindow | ( | QWidget * | newRoot | ) |
Sets the root window (used for repositioning the overlay).
newRoot | The new main window to reference. |
|
signal |
Emitted when the SLR(1) tutorial ends.
void TutorialManager::start | ( | ) |
Starts the tutorial from the beginning.
|
signal |
Emitted when a new tutorial step starts.
index | Index of the current step. |
|
signal |
Emitted when the full tutorial is finished.