00001
00002
00003
00004
00005
00006
00007 #ifndef TUTORIAL_STATE_ABSTRACT_BASE_H
00008 #define TUTORIAL_STATE_ABSTRACT_BASE_H
00009
00010 #include <QObject>
00011
00012 enum TutorialState {
00013 TUTORIAL_STATE_AXIS_POINTS,
00014 TUTORIAL_STATE_CHECKLIST_WIZARD_LINES,
00015 TUTORIAL_STATE_CHECKLIST_WIZARD_POINTS,
00016 TUTORIAL_STATE_COLOR_FILTER,
00017 TUTORIAL_STATE_CURVE_SELECTION,
00018 TUTORIAL_STATE_CURVE_TYPE,
00019 TUTORIAL_STATE_INTRODUCTION,
00020 TUTORIAL_STATE_POINT_MATCH,
00021 TUTORIAL_STATE_SEGMENT_FILL,
00022 NUM_TUTORIAL_STATES
00023 };
00024
00025 class QGraphicsPixmapItem;
00026 class QGraphicsTextItem;
00027 class TutorialStateContext;
00028
00030 class TutorialStateAbstractBase : public QObject
00031 {
00032 public:
00034 TutorialStateAbstractBase(TutorialStateContext &context);
00035 virtual ~TutorialStateAbstractBase();
00036
00038 virtual void begin () = 0;
00039
00041 virtual void end () = 0;
00042
00043 protected:
00044
00046 int buttonMargin () const;
00047
00049 TutorialStateContext &context ();
00050
00052 QGraphicsPixmapItem *createPixmapItem (const QString &resource,
00053 const QPoint &pos);
00054
00056 QGraphicsTextItem *createTextItem (const QString &text,
00057 const QPoint &pos);
00058
00060 QGraphicsTextItem *createTitle (const QString &text);
00061
00062 private:
00063 TutorialStateAbstractBase();
00064
00065 TutorialStateContext &m_context;
00066 };
00067
00068 #endif // TUTORIAL_STATE_ABSTRACT_BASE_H