Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
TutorialStateAbstractBase.h
1 #ifndef TUTORIAL_STATE_ABSTRACT_BASE_H
2 #define TUTORIAL_STATE_ABSTRACT_BASE_H
3 
4 #include <QObject>
5 
6 enum TutorialState {
7  TUTORIAL_STATE_AXIS_POINTS,
8  TUTORIAL_STATE_CHECKLIST_WIZARD_LINES,
9  TUTORIAL_STATE_CHECKLIST_WIZARD_POINTS,
10  TUTORIAL_STATE_COLOR_FILTER,
11  TUTORIAL_STATE_CURVE_SELECTION,
12  TUTORIAL_STATE_CURVE_TYPE,
13  TUTORIAL_STATE_INTRODUCTION,
14  TUTORIAL_STATE_POINT_MATCH,
15  TUTORIAL_STATE_SEGMENT_FILL,
16  NUM_TUTORIAL_STATES
17 };
18 
19 class QGraphicsPixmapItem;
20 class QGraphicsTextItem;
22 
24 class TutorialStateAbstractBase : public QObject
25 {
26  public:
29  virtual ~TutorialStateAbstractBase();
30 
32  virtual void begin () = 0;
33 
35  virtual void end () = 0;
36 
37  protected:
38 
40  int buttonMargin () const;
41 
44 
46  QGraphicsPixmapItem *createPixmapItem (const QString &resource,
47  const QPoint &pos);
48 
50  QGraphicsTextItem *createTextItem (const QString &text,
51  const QPoint &pos);
52 
54  QGraphicsTextItem *createTitle (const QString &text);
55 
56  private:
58 
59  TutorialStateContext &m_context;
60 };
61 
62 #endif // TUTORIAL_STATE_ABSTRACT_BASE_H
One state manages one panel of the tutorial.
virtual void end()=0
Transition out of this state.
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin...
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.
virtual void begin()=0
Transition into this state.
Context class for tutorial state machine.