Engauge Digitizer  2
TutorialStateAbstractBase.h
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef TUTORIAL_STATE_ABSTRACT_BASE_H
8 #define TUTORIAL_STATE_ABSTRACT_BASE_H
9 
10 #include <QObject>
11 
12 enum TutorialState {
23 };
24 
25 class QGraphicsPixmapItem;
26 class QGraphicsTextItem;
28 
30 class TutorialStateAbstractBase : public QObject
31 {
32  public:
36 
38  virtual void begin () = 0;
39 
41  virtual void end () = 0;
42 
43  protected:
44 
46  int buttonMargin () const;
47 
50 
52  QGraphicsPixmapItem *createPixmapItem (const QString &resource,
53  const QPoint &pos);
54 
56  QGraphicsTextItem *createTextItem (const QString &text,
57  const QPoint &pos);
58 
60  QGraphicsTextItem *createTitle (const QString &text);
61 
62  private:
64 
65  TutorialStateContext &m_context;
66 };
67 
68 #endif // TUTORIAL_STATE_ABSTRACT_BASE_H
TutorialStateAbstractBase::context
TutorialStateContext & context()
Context class for the tutorial state machine.
Definition: TutorialStateAbstractBase.cpp:31
TutorialStateContext
Context class for tutorial state machine.
Definition: TutorialStateContext.h:19
TUTORIAL_STATE_CURVE_TYPE
Definition: TutorialStateAbstractBase.h:20
TUTORIAL_STATE_POINT_MATCH
Definition: TutorialStateAbstractBase.h:22
TutorialStateAbstractBase::createTextItem
QGraphicsTextItem * createTextItem(const QString &text, const QPoint &pos)
Factory method for text items.
Definition: TutorialStateAbstractBase.cpp:46
TUTORIAL_STATE_AXIS_POINTS
Definition: TutorialStateAbstractBase.h:15
TutorialStateAbstractBase
One state manages one panel of the tutorial.
Definition: TutorialStateAbstractBase.h:29
TutorialStateAbstractBase::buttonMargin
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin.
Definition: TutorialStateAbstractBase.cpp:26
TUTORIAL_STATE_INTRODUCTION
Definition: TutorialStateAbstractBase.h:21
TutorialStateAbstractBase::~TutorialStateAbstractBase
virtual ~TutorialStateAbstractBase()
Definition: TutorialStateAbstractBase.cpp:22
TUTORIAL_STATE_CHECKLIST_WIZARD_LINES
Definition: TutorialStateAbstractBase.h:16
TUTORIAL_STATE_CHECKLIST_WIZARD_POINTS
Definition: TutorialStateAbstractBase.h:17
TUTORIAL_STATE_SEGMENT_FILL
Definition: TutorialStateAbstractBase.h:23
TutorialStateAbstractBase::createTitle
QGraphicsTextItem * createTitle(const QString &text)
Factory method for title items.
Definition: TutorialStateAbstractBase.cpp:56
TutorialStateAbstractBase::begin
virtual void begin()=0
Transition into this state.
TUTORIAL_STATE_CURVE_SELECTION
Definition: TutorialStateAbstractBase.h:19
NUM_TUTORIAL_STATES
Definition: TutorialStateAbstractBase.h:24
TutorialState
TutorialState
Definition: TutorialStateAbstractBase.h:11
TutorialStateAbstractBase::createPixmapItem
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
Definition: TutorialStateAbstractBase.cpp:36
TutorialStateAbstractBase::end
virtual void end()=0
Transition out of this state.
TUTORIAL_STATE_COLOR_FILTER
Definition: TutorialStateAbstractBase.h:18