BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #include <BALL/VIEW/UIC/ui_stageSettings.h>
21 
22 #include <QtGui/QWidget>
23 
24 namespace BALL
25 {
26  namespace VIEW
27  {
28  class Stage;
29  class Scene;
30 
40  : public QWidget,
41  public Ui_StageSettingsData,
42  public PreferencesEntry
43  {
44  Q_OBJECT
45 
46  public:
47 
49  StageSettings( QWidget* parent = 0, const char* name = "StageSettings", Qt::WFlags fl = 0 );
50 
53 
55  void updateFromStage();
56 
58  void apply();
59 
61  void getGLSettings();
62 
63  public slots:
64 
66  void colorPressed();
67 
69  void computeDefaultPressed();
70 
72  void loadEnvironmentMapPressed();
73 
75  void environmentMapChanged(bool active);
76 
78  void fogBoxChanged(bool active);
79 
81  void cappingColorPressed();
82 
83 
84  private slots:
85 
87  void eyeDistanceChanged();
88 
90  void focalDistanceChanged();
91 
93  void projectionTransformationChanged();
94 
95  private:
96 
98  Vector3 getTextureUpDirection_()
99  throw(Exception::InvalidFormat);
100 
102  void setTextureUpDirection_(const Vector3& tud);
103 
105  float getUser2ScreenDistance_()
106  throw(Exception::InvalidFormat);
107 
109  void setUser2ScreenDistance_(const float& s2u);
110 
112  float getUserEyeLevel_()
113  throw(Exception::InvalidFormat);
114 
116  void setUserEyeLevel_(const float& s2u);
117 
119  float getUserEyeDistance_()
120  throw(Exception::InvalidFormat);
121 
123  void setUserEyeDistance_(const float& s2u);
125  void setDefaultValues_();
126 
127  //_ apply values to a Stage
128  void saveSettingsToStage_();
129 
130  Scene* scene_;
131 
132  VIEW::Stage* stage_;
133  };
134 
135 } }
136 
137 #endif