1 #include "EngaugeAssert.h"
4 #include "TutorialDlg.h"
5 #include "TutorialStateAbstractBase.h"
6 #include "TutorialStateAxisPoints.h"
7 #include "TutorialStateChecklistWizardLines.h"
8 #include "TutorialStateChecklistWizardPoints.h"
9 #include "TutorialStateColorFilter.h"
10 #include "TutorialStateContext.h"
11 #include "TutorialStateCurveSelection.h"
12 #include "TutorialStateCurveType.h"
13 #include "TutorialStateIntroduction.h"
14 #include "TutorialStatePointMatch.h"
15 #include "TutorialStateSegmentFill.h"
17 const int TIMER_INTERVAL = 1;
20 m_tutorialDlg (tutorialDlg)
26 void TutorialStateContext::createStates ()
28 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createStates";
40 ENGAUGE_ASSERT (m_states.size () == NUM_TUTORIAL_STATES);
42 m_currentState = NUM_TUTORIAL_STATES;
44 completeRequestedStateTransitionIfExists ();
47 void TutorialStateContext::createTimer ()
49 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createTimer";
51 m_timer =
new QTimer ();
52 m_timer->setInterval (TIMER_INTERVAL);
53 m_timer->setSingleShot (
true);
54 connect (m_timer, SIGNAL (timeout ()),
this, SLOT (slotTimeout ()));
57 void TutorialStateContext::completeRequestedStateTransitionIfExists ()
59 if (m_currentState != m_requestedState) {
63 if (m_currentState != NUM_TUTORIAL_STATES) {
66 m_states [m_currentState]->end ();
70 m_currentState = m_requestedState;
71 m_states [m_requestedState]->begin ();
77 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestDelayedStateTransition";
79 m_requestedState = tutorialState;
86 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestImmediateStateTransition";
88 m_requestedState = tutorialState;
91 void TutorialStateContext::slotTimeout()
93 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::slotTimeout";
95 completeRequestedStateTransitionIfExists();
100 return m_tutorialDlg;
Point match panel discusses the matching of points in curves without lines.
Curve type state/panel lets user select the curve type (lines or points)
void requestImmediateStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
Checklist wizard panel for lines discusses the checklist wizard, and returns to TRANSITION_STATE_SEGM...
Color filter panel discusses the curve-specific color filtering.
Axis points panel discusses axis point digitization.
Tutorial using a strategy like a comic strip with decision points deciding which panels appear...
Curve selection panel discusses how to select a curve, and perform setup on the selected curve...
TutorialStateContext(TutorialDlg &tutorialDlg)
Single constructor.
Checklist wizard panel for points discusses the checklist wizard, and returns to TRANSITION_STATE_POI...
Segment fill panel discusses the digitization of points along curve lines.
Introduction state/panel is the first panel the user sees.
void requestDelayedStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.