9 #include <QGraphicsPixmapItem> 10 #include <QGraphicsScene> 11 #include <QGraphicsView> 12 #include "TutorialButton.h" 13 #include "TutorialDlg.h" 14 #include "TutorialStateAxisPoints.h" 15 #include "TutorialStateContext.h" 24 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateAxisPoints::begin ()";
30 "define the coordinates. Step 1 -\n" 31 "Click on the Axis Points button"),
33 m_text1 =
createTextItem (tr (
"Step 2 - Click on an axis or grid\n" 34 "line with known coordinates. An axis\n" 35 "point appears, with a dialog window\n" 36 "for entering the axis point's\n" 39 m_text2 =
createTextItem (tr (
"Step 3 - Enter the two coordinates\n" 40 "of the axis point and then click Ok.\n" 41 "Repeat steps 2 and 3 twice more\n" 42 "until three axis points are created"),
48 context().tutorialDlg().scene());
51 connect (m_previous, SIGNAL (signalTriggered ()),
this, SLOT (
slotPrevious ()));
54 context().tutorialDlg().scene());
57 connect (m_next, SIGNAL (signalTriggered ()),
this, SLOT (
slotNext ()));
62 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateAxisPoints::end ()";
90 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateAxisPoints::slotNextCurves";
97 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateAxisPoints::slotPrevious";
One state manages one panel of the tutorial.
void slotNext()
Slot called when next button is triggered.
virtual void begin()
Transition into this state.
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
TutorialStateAxisPoints(TutorialStateContext &context)
Single constructor.
void slotPrevious()
Slot called to return to previous panel.
TutorialStateContext & context()
Context class for the tutorial state machine.
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.
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
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.