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)
32 void TutorialStateContext::createStates ()
34 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createStates";
46 ENGAUGE_ASSERT (m_states.size () == NUM_TUTORIAL_STATES);
48 m_currentState = NUM_TUTORIAL_STATES;
50 completeRequestedStateTransitionIfExists ();
53 void TutorialStateContext::createTimer ()
55 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::createTimer";
57 m_timer =
new QTimer ();
58 m_timer->setInterval (TIMER_INTERVAL);
59 m_timer->setSingleShot (
true);
60 connect (m_timer, SIGNAL (timeout ()),
this, SLOT (slotTimeout ()));
63 void TutorialStateContext::completeRequestedStateTransitionIfExists ()
65 if (m_currentState != m_requestedState) {
69 if (m_currentState != NUM_TUTORIAL_STATES) {
72 m_states [m_currentState]->end ();
76 m_currentState = m_requestedState;
77 m_states [m_requestedState]->begin ();
83 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestDelayedStateTransition";
85 m_requestedState = tutorialState;
92 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::requestImmediateStateTransition";
94 m_requestedState = tutorialState;
97 void TutorialStateContext::slotTimeout()
99 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::slotTimeout";
101 completeRequestedStateTransitionIfExists();
106 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.