9 #include <QGraphicsPixmapItem> 10 #include <QGraphicsScene> 11 #include <QGraphicsView> 12 #include "TutorialButton.h" 13 #include "TutorialDlg.h" 14 #include "TutorialStateContext.h" 15 #include "TutorialStateCurveType.h" 24 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveType::begin ()";
29 m_text0 =
createTextItem (tr (
"The next steps depend on how the curves\n" 30 "are drawn, in terms of lines and points."),
33 "with lines (with or without\n" 34 "points) then click on\n" 38 "without lines and only\n" 39 "with points, then click on\n" 46 context().tutorialDlg().scene());
49 connect (m_previous, SIGNAL (signalTriggered ()),
this, SLOT (
slotPrevious ()));
52 context().tutorialDlg().scene());
54 backgroundSize.height () / 3.0 - m_nextLines->
size ().height () / 2.0));
55 connect (m_nextLines, SIGNAL (signalTriggered ()),
this, SLOT (
slotNextCurves ()));
58 context().tutorialDlg().scene());
60 backgroundSize.height () * 2.0 / 3.0 - m_nextPoints->
size ().height () / 2.0));
61 connect (m_nextPoints, SIGNAL (signalTriggered ()),
this, SLOT (
slotNextLines ()));
66 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveType::end ()";
96 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveType::slotNextCurves";
103 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveType::slotNextLines";
110 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveType::slotNextCurves";
One state manages one panel of the tutorial.
virtual void begin()
Transition into this state.
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
void slotNextCurves()
Slot called when next button for curves is triggered.
TutorialStateContext & context()
Context class for the tutorial state machine.
void slotNextLines()
Slot called when next button for lines is triggered.
QGraphicsTextItem * createTextItem(const QString &text, const QPoint &pos)
Factory method for text items.
virtual void end()
Transition out of this state.
QGraphicsTextItem * createTitle(const QString &text)
Factory method for title items.
void slotPrevious()
Slot called to return to previous panel.
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
TutorialStateCurveType(TutorialStateContext &context)
Single constructor.
QSize backgroundSize() const
Make geometry available for layout.
Context class for tutorial state machine.
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin...
void requestDelayedStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.