Go to the documentation of this file.
9 #include <QGraphicsPixmapItem>
10 #include <QGraphicsScene>
11 #include <QGraphicsView>
21 m_background (nullptr),
27 m_colorFilter (nullptr),
42 m_text0 =
createTextItem (tr (
"After the axis points have been created, a\n"
43 "curve is selected to receive curve points.\n"
44 "Step 1 - click on Curve, Point Match, Color\n"
45 "Picker or Segment Fill buttons."),
47 m_text1 =
createTextItem (tr (
"Step 2 - Select the desired curve name. If\n"
48 "that curve name has not been created yet,\n"
49 "use the menu option Settings / Curve Names\n"
52 m_text2 =
createTextItem (tr (
"Step 3 - Change the background from the\n"
53 "original image to the filtered image\n"
54 "produced for the current curve, using the\n"
55 "menu option View / Background / Filtered\n"
56 "Image. This filtering enables the powerful\n"
57 "automated algorithms discussed later in\n"
60 m_text3 =
createTextItem (tr (
"If the current curve is no longer visible\n"
61 "in the filtered image, then change the\n"
62 "current Color Filter settings. In the figure,\n"
63 "the orange points have disappeared."),
69 context().tutorialDlg().scene());
72 connect (m_previous, SIGNAL (signalTriggered ()),
this, SLOT (
slotPrevious ()));
75 context().tutorialDlg().scene());
76 m_colorFilter->
setGeometry (QPoint (qFloor (backgroundSize.width () / 2.0 - m_colorFilter->
size ().width () / 2),
77 qFloor (backgroundSize.height () -
buttonMargin () - m_colorFilter->
size ().height ())));
78 connect (m_colorFilter, SIGNAL (signalTriggered ()),
this, SLOT (
slotColorFilter ()));
81 context().tutorialDlg().scene());
84 connect (m_next, SIGNAL (signalTriggered ()),
this, SLOT (
slotNext ()));
TutorialStateContext & context()
Context class for the tutorial state machine.
Context class for tutorial state machine.
QGraphicsTextItem * createTextItem(const QString &text, const QPoint &pos)
Factory method for text items.
TutorialStateCurveSelection(TutorialStateContext &context)
Single constructor.
virtual void end()
Transition out of this state.
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
One state manages one panel of the tutorial.
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin.
#define LOG4CPP_INFO_S(logger)
void requestDelayedStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.
void slotNext()
Slot called when next button is triggered.
log4cpp::Category * mainCat
QGraphicsTextItem * createTitle(const QString &text)
Factory method for title items.
QSize backgroundSize() const
Make geometry available for layout.
virtual void begin()
Transition into this state.
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
void slotPrevious()
Slot called to return to previous panel.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.
void slotColorFilter()
Slot called when settings button is triggered.