9 #include <QGraphicsPixmapItem> 10 #include <QGraphicsScene> 11 #include <QGraphicsView> 12 #include "TutorialButton.h" 13 #include "TutorialDlg.h" 14 #include "TutorialStateCurveSelection.h" 15 #include "TutorialStateContext.h" 24 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveSelection::begin ()";
29 m_text0 =
createTextItem (tr (
"After the axis points have been created, a\n" 30 "curve is selected to receive curve points.\n" 31 "Step 1 - click on Curve, Point Match, Color\n" 32 "Picker or Segment Fill buttons."),
34 m_text1 =
createTextItem (tr (
"Step 2 - Select the desired curve name. If\n" 35 "that curve name has not been created yet,\n" 36 "use the menu option Settings / Curve Names\n" 39 m_text2 =
createTextItem (tr (
"Step 3 - Change the background from the\n" 40 "original image to the filtered image\n" 41 "produced for the current curve, using the\n" 42 "menu option View / Background / Filtered\n" 43 "Image. This filtering enables the powerful\n" 44 "automated algorithms discussed later in\n" 47 m_text3 =
createTextItem (tr (
"If the current curve is no longer visible\n" 48 "in the filtered image, then change the\n" 49 "current Color Filter settings. In the figure,\n" 50 "the orange points have disappeared."),
56 context().tutorialDlg().scene());
59 connect (m_previous, SIGNAL (signalTriggered ()),
this, SLOT (
slotPrevious ()));
62 context().tutorialDlg().scene());
63 m_colorFilter->
setGeometry (QPoint (backgroundSize.width () / 2.0 - m_colorFilter->
size ().width () / 2,
64 backgroundSize.height () -
buttonMargin () - m_colorFilter->
size ().height ()));
65 connect (m_colorFilter, SIGNAL (signalTriggered ()),
this, SLOT (
slotColorFilter ()));
68 context().tutorialDlg().scene());
71 connect (m_next, SIGNAL (signalTriggered ()),
this, SLOT (
slotNext ()));
76 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveSelection::end ()";
109 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveSelection::slotColorFilter";
116 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveSelection::slotNextCurves";
123 LOG4CPP_INFO_S ((*mainCat)) <<
"TutorialStateCurveSelection::slotPrevious";
One state manages one panel of the tutorial.
virtual void end()
Transition out of this state.
TutorialStateCurveSelection(TutorialStateContext &context)
Single constructor.
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
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.
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.
void slotNext()
Slot called when next button is triggered.
Context class for tutorial state machine.
void slotColorFilter()
Slot called when settings button is triggered.
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.
virtual void begin()
Transition into this state.