Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
TutorialStateIntroduction Class Reference

Introduction state/panel is the first panel the user sees. More...

#include <TutorialStateIntroduction.h>

Inheritance diagram for TutorialStateIntroduction:
Inheritance graph
Collaboration diagram for TutorialStateIntroduction:
Collaboration graph

Public Slots

void slotNext ()
 Slot called when next button is triggered.
 

Public Member Functions

 TutorialStateIntroduction (TutorialStateContext &context)
 Single constructor.
 
virtual void begin ()
 Transition into this state.
 
virtual void end ()
 Transition out of this state.
 
- Public Member Functions inherited from TutorialStateAbstractBase
 TutorialStateAbstractBase (TutorialStateContext &context)
 Single constructor.
 
virtual ~TutorialStateAbstractBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from TutorialStateAbstractBase
int buttonMargin () const
 Buttons are placed up against bottom side, and left or right side, separated by this margin.
 
TutorialStateContextcontext ()
 Context class for the tutorial state machine.
 
QGraphicsPixmapItemcreatePixmapItem (const QString &resource, const QPoint &pos)
 Factory method for pixmap items.
 
QGraphicsTextItem * createTextItem (const QString &text, const QPoint &pos)
 Factory method for text items.
 
QGraphicsTextItem * createTitle (const QString &text)
 Factory method for title items.
 

Detailed Description

Introduction state/panel is the first panel the user sees.

Definition at line 18 of file TutorialStateIntroduction.h.

Constructor & Destructor Documentation

◆ TutorialStateIntroduction()

TutorialStateIntroduction::TutorialStateIntroduction ( TutorialStateContext & context)

Single constructor.

Definition at line 17 of file TutorialStateIntroduction.cpp.

17 :
19 m_title (nullptr),
20 m_background (nullptr),
21 m_text0 (nullptr),
22 m_text1 (nullptr),
23 m_text2 (nullptr),
24 m_next (nullptr)
25{
26 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::TutorialStateIntroduction";
27}
log4cpp::Category * mainCat
Definition Logger.cpp:14
One state manages one panel of the tutorial.
TutorialStateContext & context()
Context class for the tutorial state machine.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

Member Function Documentation

◆ begin()

void TutorialStateIntroduction::begin ( )
virtual

Transition into this state.

Implements TutorialStateAbstractBase.

Definition at line 29 of file TutorialStateIntroduction.cpp.

30{
31 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::begin ()";
32
33 context().tutorialDlg().scene().clear ();
34
35 m_title = createTitle (tr ("Introduction"));
36 m_background = createPixmapItem (":/engauge/img/SpreadsheetsForDoc.png",
37 QPoint (0, 0));
38 m_text0 = createTextItem (tr ("Engauge Digitizer starts with\n"
39 "images of graphs and maps."),
40 QPoint (200, 40));
41 m_text1 = createTextItem (tr ("You create (or digitize) points along\n"
42 "the graph and map curves."),
43 QPoint (240, 180));
44 m_text2 = createTextItem (tr ("The digitized curve points can be\n"
45 "exported, as numbers, to other software tools."),
46 QPoint (210, 330));
47
48 QSize backgroundSize = context().tutorialDlg().backgroundSize();
49
50 m_next = new TutorialButton (tr ("Next"),
51 context().tutorialDlg().scene());
52 m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
53 backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
54 connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
55}
const int INNER_RADIUS_MIN
Show a button with text for clicking ion. The button is implemented using layering of two graphics it...
QSize size() const
Size of this button.
void setGeometry(const QPoint &pos)
Set the position. This is called after creation so screen extent is available for positioning calcula...
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
QSize backgroundSize() const
Make geometry available for layout.
QGraphicsTextItem * createTitle(const QString &text)
Factory method for title items.
QGraphicsTextItem * createTextItem(const QString &text, const QPoint &pos)
Factory method for text items.
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.
void slotNext()
Slot called when next button is triggered.

◆ end()

void TutorialStateIntroduction::end ( )
virtual

Transition out of this state.

Implements TutorialStateAbstractBase.

Definition at line 57 of file TutorialStateIntroduction.cpp.

58{
59 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::end ()";
60
61 // It is not safe to remove and deallocate items here since an active TutorialButton
62 // may be on the stack. So we clear the scene as the first step in the next begin()
63}

◆ slotNext

void TutorialStateIntroduction::slotNext ( )
slot

Slot called when next button is triggered.

Definition at line 65 of file TutorialStateIntroduction.cpp.

66{
67 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateIntroduction::slotNext";
68
70}
@ TUTORIAL_STATE_AXIS_POINTS
void requestDelayedStateTransition(TutorialState tutorialState)
Request a transition to the specified state from the current state.

The documentation for this class was generated from the following files: