Engauge Digitizer  2
Public Member Functions | List of all members
TutorialDlg Class Reference

Tutorial using a strategy like a comic strip with decision points deciding which panels appear. More...

#include <TutorialDlg.h>

Inheritance diagram for TutorialDlg:
Inheritance graph
Collaboration diagram for TutorialDlg:
Collaboration graph

Public Member Functions

 TutorialDlg (MainWindow *mainWindow)
 Single constructor. More...
 
 ~TutorialDlg ()
 
QSize backgroundSize () const
 Make geometry available for layout. More...
 
QGraphicsScene & scene ()
 Single scene the covers the entire tutorial dialog. More...
 
QGraphicsView & view ()
 Single view that displays the single scene. More...
 

Detailed Description

Tutorial using a strategy like a comic strip with decision points deciding which panels appear.

This is implemented as a QGraphicsScene with states in charge of managing the contents of the scene

Definition at line 19 of file TutorialDlg.h.

Constructor & Destructor Documentation

◆ TutorialDlg()

TutorialDlg::TutorialDlg ( MainWindow mainWindow)

Single constructor.

Definition at line 20 of file TutorialDlg.cpp.

20  :
21  QDialog (mainWindow),
22  m_context (nullptr),
23  m_scene (nullptr),
24  m_view (nullptr)
25 {
26  setWindowTitle ("Engauge Digitizer Tutorial");
27 
28  // Dialog size is determined by scene size
29  QVBoxLayout *layout = new QVBoxLayout;
30  layout->setSizeConstraint (QLayout::SetMinimumSize);
31  setLayout (layout);
32 
33  createSceneAndView();
34  createContext();
35 }

◆ ~TutorialDlg()

TutorialDlg::~TutorialDlg ( )

Definition at line 37 of file TutorialDlg.cpp.

38 {
39  delete m_view;
40  delete m_scene;
41  delete m_context;
42 }

Member Function Documentation

◆ backgroundSize()

QSize TutorialDlg::backgroundSize ( ) const

Make geometry available for layout.

Definition at line 44 of file TutorialDlg.cpp.

45 {
46  return QSize (SCENE_WIDTH,
47  SCENE_HEIGHT);
48 }
const int SCENE_WIDTH
Definition: TutorialDlg.cpp:17
const int SCENE_HEIGHT
Definition: TutorialDlg.cpp:18

◆ scene()

QGraphicsScene & TutorialDlg::scene ( )

Single scene the covers the entire tutorial dialog.

Definition at line 76 of file TutorialDlg.cpp.

77 {
78  ENGAUGE_CHECK_PTR (m_scene);
79 
80  return *m_scene;
81 }
#define ENGAUGE_CHECK_PTR(ptr)
#endif
Definition: EngaugeAssert.h:27

◆ view()

QGraphicsView & TutorialDlg::view ( )

Single view that displays the single scene.

Definition at line 83 of file TutorialDlg.cpp.

84 {
85  ENGAUGE_CHECK_PTR (m_view);
86 
87  return *m_view;
88 }
#define ENGAUGE_CHECK_PTR(ptr)
#endif
Definition: EngaugeAssert.h:27

The documentation for this class was generated from the following files: