7 #include <QGraphicsPixmapItem>
8 #include <QGraphicsScene>
9 #include <QGraphicsTextItem>
10 #include "TutorialDlg.h"
11 #include "TutorialStateAbstractBase.h"
12 #include "TutorialStateContext.h"
15 const int TITLE_PADDING = 5;
16 const double Z_TITLE = 2.0;
23 TutorialStateAbstractBase::~TutorialStateAbstractBase()
40 QGraphicsPixmapItem *item =
new QGraphicsPixmapItem (QPixmap (resource));
50 QGraphicsTextItem *item =
new QGraphicsTextItem (text);
61 QGraphicsTextItem *item =
new QGraphicsTextItem (text);
62 item->setZValue(Z_TITLE);
63 item->setPos (backgroundSize.width() / 2.0 - item->boundingRect().width() / 2.0,
68 QFont font = item->font();
int buttonMargin() const
Buttons are placed up against bottom side, and left or right side, separated by this margin...
QGraphicsScene & scene()
Single scene the covers the entire tutorial dialog.
TutorialStateContext & context()
Context class for the tutorial state machine.
QGraphicsTextItem * createTextItem(const QString &text, const QPoint &pos)
Factory method for text items.
QSize backgroundSize() const
Make geometry available for layout.
QGraphicsTextItem * createTitle(const QString &text)
Factory method for title items.
QGraphicsPixmapItem * createPixmapItem(const QString &resource, const QPoint &pos)
Factory method for pixmap items.
Context class for tutorial state machine.
TutorialStateAbstractBase(TutorialStateContext &context)
Single constructor.
TutorialDlg & tutorialDlg()
Access to tutorial dialogs and its scene.