BALL  1.5.0
stageSettings.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DIALOGS_STAGESETTINGS_H
6 #define BALL_VIEW_DIALOGS_STAGESETTINGS_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
14 #endif
15 
16 #ifndef BALL_MATH_VECTOR3
17 # include <BALL/MATHS/vector3.h>
18 #endif
19 
20 #ifndef BALL_VIEW_RENDERING_RENDERSETUP_H
22 #endif
23 
24 #ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
26 #endif
27 
28 #include <BALL/VIEW/UIC/ui_stageSettings.h>
29 
30 #include <QtWidgets/QWidget>
31 
32 class QSplashScreen;
33 
34 namespace BALL
35 {
36  namespace VIEW
37  {
38  class Stage;
39  class Scene;
40 
41 
51  : public QWidget,
52  public Ui_StageSettingsData,
53  public PreferencesEntry
54  {
55  Q_OBJECT
56 
57  public:
58 
60  StageSettings( QWidget* parent = 0, const char* name = "StageSettings", Qt::WindowFlags fl = 0 );
61 
64 
67 
69  void apply();
70 
72  void getGLSettings();
73 
77 
81 
85 
89 
93 
97 
100  QRect getLeftEyeGeometry() const;
101 
104  QRect getRightEyeGeometry() const;
105 
106  virtual bool setValueAllowed(QObject* widget);
107 
108  public Q_SLOTS:
109 
112 
115 
117  void environmentMapChanged(bool active);
118 
120  void fogBoxChanged(bool active);
121 
123  void screenCountChanged(int number);
124 
126  void stereoScreenChanged(int new_screen);
127 
130 
133 
134  private Q_SLOTS:
135 
137  void eyeDistanceChanged();
138 
140  void focalDistanceChanged();
141 
143  void projectionTransformationChanged();
144 
146  void downsamplingSliderChanged();
147 
149  void killIdentificationLabels_();
150 
151  private:
152 
154  Vector3 getTextureUpDirection_();
155 
157  void setTextureUpDirection_(const Vector3& tud);
158 
160  float getUser2ScreenDistance_();
161 
163  void setUser2ScreenDistance_(const float& s2u);
164 
166  float getUserEyeLevel_();
167 
169  void setUserEyeLevel_(const float& s2u);
170 
172  float getUserEyeDistance_();
173 
175  void setUserEyeDistance_(const float& s2u);
177  void setDefaultValues_();
178 
179  //_ apply values to a Stage
180  void saveSettingsToStage_();
181 
182  Scene* scene_;
183 
184  VIEW::Stage* stage_;
185 
186  std::vector<QSplashScreen*> identification_labels_;
187  };
188 
189 } }
190 
191 #endif
Definition: constants.h:13
void screenCountChanged(int number)
QRect getLeftEyeGeometry() const
virtual bool setValueAllowed(QObject *widget)
Allows to prevent restoring of widgets.
void loadEnvironmentMapPressed()
Show a QFileDialog to select a new environment texture map for the Scene.
Renderer::StereoMode getStereoMode() const
int getLeftEyeScreenNumber() const
RenderSetup::RendererType getControlScreenRendererType() const
QRect getRightEyeGeometry() const
void stereoScreenChanged(int new_screen)
RenderSetup::RendererType getStereoScreensRendererType() const
void apply()
Apply the new values to the stage.
StageSettings(QWidget *parent=0, const char *name="StageSettings", Qt::WindowFlags fl=0)
Constructor.
int getRightEyeScreenNumber() const
void updateFromStage()
Get the values for Stageing from the stage.
void fogBoxChanged(bool active)
int getControlScreenNumber() const
void environmentMapChanged(bool active)
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52