Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
TutorialButton.h
1 #ifndef TUTORIAL_BUTTON_H
2 #define TUTORIAL_BUTTON_H
3 
4 #include <QObject>
5 
6 class QGraphicsRectItem;
7 class QGraphicsScene;
8 class QGraphicsTextItem;
9 class QString;
10 class TutorialButtonRect;
11 class TutorialButtonText;
12 
14 class TutorialButton : public QObject
15 {
16  Q_OBJECT;
17 
18  public:
20  TutorialButton(const QString &text,
21  QGraphicsScene &scene);
22  ~TutorialButton();
23 
25  void handleTriggered();
26 
28  void setGeometry (const QPoint &pos);
29 
31  QSize size () const;
32 
33  signals:
35  void signalTriggered ();
36 
37  private:
39 
40  void createRect (QGraphicsScene &scene);
41  void createText (const QString &text);
42 
43  TutorialButtonRect *m_rect;
44  TutorialButtonText *m_text; // Child to rectangle
45 };
46 
47 #endif // TUTORIAL_BUTTON_H
void setGeometry(const QPoint &pos)
Set the position. This is called after creation so screen extent is available for positioning calcula...
void signalTriggered()
Signal that button was triggered.
Show a button with text for clicking ion. The button is implemented using layering of two graphics it...
This class customizes QGraphicsTextItem so it performs a callback after a mouse event.
This class customizes QGraphicsRectItem so it performs a callback after a mouse event.
void handleTriggered()
Callback to be called when button was triggered by mouse event.
QSize size() const
Size of this button.