SyntaxTutor
Educational app designed to help compiler students understand LL(1) and SLR(1) parsing algorithms.
 
Loading...
Searching...
No Matches
TutorialManager Class Reference

Manages interactive tutorials by highlighting UI elements and guiding the user. More...

#include <tutorialmanager.h>

Inheritance diagram for TutorialManager:
Collaboration diagram for TutorialManager:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TutorialManager()

TutorialManager::TutorialManager ( QWidget * rootWindow)

Constructs a TutorialManager for a given window.

Parameters
rootWindowThe main application window used for relative positioning.

Member Function Documentation

◆ addStep()

void TutorialManager::addStep ( QWidget * target,
const QString & htmlText )

Adds a new step to the tutorial sequence.

Parameters
targetThe widget to highlight during the step.
htmlTextThe instructional HTML message for the step.

◆ clearSteps()

void TutorialManager::clearSteps ( )

Clears all steps in the tutorial.

Here is the call graph for this function:

◆ eventFilter()

bool TutorialManager::eventFilter ( QObject * obj,
QEvent * ev )
overrideprotected

Intercepts UI events to handle overlay behavior.

◆ finishLL1()

void TutorialManager::finishLL1 ( )

Ends the LL(1) tutorial sequence and emits its corresponding signal.

Here is the call graph for this function:

◆ finishSLR1()

void TutorialManager::finishSLR1 ( )

Ends the SLR(1) tutorial sequence and emits its corresponding signal.

Here is the call graph for this function:

◆ hideOverlay()

void TutorialManager::hideOverlay ( )

Hides the tutorial overlay immediately.

Here is the caller graph for this function:

◆ ll1Finished

void TutorialManager::ll1Finished ( )
signal

Emitted when the LL(1) tutorial ends.

Here is the caller graph for this function:

◆ nextStep

void TutorialManager::nextStep ( )
slot

Advances to the next tutorial step.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRootWindow()

void TutorialManager::setRootWindow ( QWidget * newRoot)

Sets the root window (used for repositioning the overlay).

Parameters
newRootThe new main window to reference.
Here is the call graph for this function:

◆ slr1Finished

void TutorialManager::slr1Finished ( )
signal

Emitted when the SLR(1) tutorial ends.

Here is the caller graph for this function:

◆ start()

void TutorialManager::start ( )

Starts the tutorial from the beginning.

Here is the call graph for this function:

◆ stepStarted

void TutorialManager::stepStarted ( int index)
signal

Emitted when a new tutorial step starts.

Parameters
indexIndex of the current step.
Here is the caller graph for this function:

◆ tutorialFinished

void TutorialManager::tutorialFinished ( )
signal

Emitted when the full tutorial is finished.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: