BALL 1.5.0
demoTutorialDialog.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id:
5
6#ifndef BALL_DEMOTUTORIALDIALOG_H
7#define BALL_DEMOTUTORIALDIALOG_H
8
9#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
11#endif
12
13#ifndef BALL_VIEW_PRIMITIV_MESH_H
15#endif
16
18
19#include "ui_demoTutorialDialog.h"
20
21#include <QtWidgets/QDialog>
22
23namespace BALL
24{
25 class System;
26 class Composite;
27
28 namespace VIEW
29 {
33 public QDialog,
34 public Ui_DemoTutorialDialogData,
35 public ModularWidget
36 {
37 Q_OBJECT
39
40 public:
41
43 DemoTutorialDialog(QWidget *parent = NULL, const char *name = NULL );
44
46 virtual ~DemoTutorialDialog();
47
49 virtual void onNotify(Message *message);
50
51 virtual void initializeWidget(MainControl& main_control);
52
54 void setDemoMode(bool) { tutorial_type_ = DEMO; }
55
57 //void setTutorialType(int type) { tutorial_type_ = type;}
58
59 public Q_SLOTS:
60
62 void show();
63
65 void showDemo();
66
68 void showTutorial();
69
72
74 void nextStepClicked();
75
76 virtual void checkMenu(MainControl& main_control);
77
78 protected:
79
80 void nextStepDemo_();
82
83 void initDemo_();
84 void initTutorials_();
85
86 void enableNextStep_();
87
88 virtual void onNotifyTutorial_(Message *message);
89 virtual void onNotifyRaytracingTutorial_(Message *message);
90 virtual void onNotifyDemo_(Message *message);
91
92 void addPlane_(char plane_specifier, int height, int boundary, bool bottom = true);
93
95
96 private:
97
98 enum TUTORIAL_TYPE
99 {
100 DEMO,
101 TUTORIAL,
102 RAYTRACING_TUTORIAL
103 };
104
105 TUTORIAL_TYPE tutorial_type_;
106
107 std::list<Composite*> composites_;
108
109 RegularData3D* grid_;
110 System* system_;
111
112 String prefix_;
113 Position current_step_;
114 Mesh* surface_;
115 QAction* demo_action_, *tutorial_action_, *raytracing_tutorial_action_;
116 };
117
118} } // namespaces
119
120#endif // BALL_DEMOTUTORIALDIALOG_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition: embeddable.h:31
Definition: constants.h:13
DemoTutorialDialog(QWidget *parent=NULL, const char *name=NULL)
Default Constructor.
virtual void checkMenu(MainControl &main_control)
virtual void onNotify(Message *message)
Message handling method.
virtual void onNotifyTutorial_(Message *message)
void addPlane_(char plane_specifier, int height, int boundary, bool bottom=true)
virtual void initializeWidget(MainControl &main_control)
void show()
Show and raise the dialog.
virtual void onNotifyDemo_(Message *message)
virtual void onNotifyRaytracingTutorial_(Message *message)
virtual ~DemoTutorialDialog()
Destructor.