BALL  1.4.79
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 <QtGui/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::WFlags fl = 0 );
61 
64 
66  void updateFromStage();
67 
69  void apply();
70 
72  void getGLSettings();
73 
76  int getControlScreenNumber() const;
77 
80  int getLeftEyeScreenNumber() const;
81 
84  int getRightEyeScreenNumber() const;
85 
88  Renderer::StereoMode getStereoMode() const;
89 
92  RenderSetup::RendererType getControlScreenRendererType() const;
93 
96  RenderSetup::RendererType getStereoScreensRendererType() const;
97 
100  QRect getLeftEyeGeometry() const;
101 
104  QRect getRightEyeGeometry() const;
105 
106  virtual bool setValueAllowed(QObject* widget);
107 
108  public slots:
109 
111  void computeDefaultPressed();
112 
114  void loadEnvironmentMapPressed();
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 
129  void identifyDisplays();
130 
132  void stereoModeChanged();
133 
134  private 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  throw(Exception::InvalidFormat);
156 
158  void setTextureUpDirection_(const Vector3& tud);
159 
161  float getUser2ScreenDistance_()
162  throw(Exception::InvalidFormat);
163 
165  void setUser2ScreenDistance_(const float& s2u);
166 
168  float getUserEyeLevel_()
169  throw(Exception::InvalidFormat);
170 
172  void setUserEyeLevel_(const float& s2u);
173 
175  float getUserEyeDistance_()
176  throw(Exception::InvalidFormat);
177 
179  void setUserEyeDistance_(const float& s2u);
181  void setDefaultValues_();
182 
183  //_ apply values to a Stage
184  void saveSettingsToStage_();
185 
186  Scene* scene_;
187 
188  VIEW::Stage* stage_;
189 
190  std::vector<QSplashScreen*> identification_labels_;
191  };
192 
193 } }
194 
195 #endif
STL namespace.
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
~StageSettings()
Destructor.
Definition: stageSettings.h:63
-*- Mode: C++; tab-width: 2; -*-
Definition: constants.h:12