7 #include "EngaugeAssert.h" 10 #include "TutorialDlg.h" 11 #include "TutorialStateAbstractBase.h" 12 #include "TutorialStateAxisPoints.h" 13 #include "TutorialStateChecklistWizardLines.h" 14 #include "TutorialStateChecklistWizardPoints.h" 15 #include "TutorialStateColorFilter.h" 16 #include "TutorialStateContext.h" 17 #include "TutorialStateCurveSelection.h" 18 #include "TutorialStateCurveType.h" 19 #include "TutorialStateIntroduction.h" 20 #include "TutorialStatePointMatch.h" 21 #include "TutorialStateSegmentFill.h" 23 const int TIMER_INTERVAL = 1;
26 m_tutorialDlg (tutorialDlg)
34 qDeleteAll (m_states);
37 void TutorialStateContext::createStates ()
39 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createStates";
51 ENGAUGE_ASSERT (m_states.size () == NUM_TUTORIAL_STATES);
53 m_currentState = NUM_TUTORIAL_STATES;
55 completeRequestedStateTransitionIfExists ();
58 void TutorialStateContext::createTimer ()
60 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createTimer";
62 m_timer =
new QTimer ();
63 m_timer->setInterval (TIMER_INTERVAL);
64 m_timer->setSingleShot (
true);
65 connect (m_timer, SIGNAL (timeout ()),
this, SLOT (slotTimeout ()));
68 void TutorialStateContext::completeRequestedStateTransitionIfExists ()
70 if (m_currentState != m_requestedState) {
74 if (m_currentState != NUM_TUTORIAL_STATES) {
77 m_states [m_currentState]->end ();
81 m_currentState = m_requestedState;
82 m_states [m_requestedState]->begin ();
88 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestDelayedStateTransition";
90 m_requestedState = tutorialState;
97 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestImmediateStateTransition";
99 m_requestedState = tutorialState;
102 void TutorialStateContext::slotTimeout()
104 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::slotTimeout";
106 completeRequestedStateTransitionIfExists();
111 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.
~TutorialStateContext()
Destructor deallocates memory.