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"
23const int TIMER_INTERVAL = 1;
26 m_tutorialDlg (tutorialDlg)
32void 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 ();
53void 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 ()));
63void 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;
97void TutorialStateContext::slotTimeout()
99 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateContext::slotTimeout";
101 completeRequestedStateTransitionIfExists();
106 return m_tutorialDlg;
Tutorial using a strategy like a comic strip with decision points deciding which panels appear.
Axis points panel discusses axis point digitization.
Checklist wizard panel for lines discusses the checklist wizard, and returns to TRANSITION_STATE_SEGM...
Checklist wizard panel for points discusses the checklist wizard, and returns to TRANSITION_STATE_POI...
Color filter panel discusses the curve-specific color filtering.
void requestDelayedStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
void requestImmediateStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
TutorialStateContext(TutorialDlg &tutorialDlg)
Single constructor.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.
Curve selection panel discusses how to select a curve, and perform setup on the selected curve.
Curve type state/panel lets user select the curve type (lines or points)
Introduction state/panel is the first panel the user sees.
Point match panel discusses the matching of points in curves without lines.
Segment fill panel discusses the digitization of points along curve lines.