00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_VIEW_DIALOGS_STAGESETTINGS_H
00008 #define BALL_VIEW_DIALOGS_STAGESETTINGS_H
00009
00010 #ifndef BALL_COMMON_GLOBAL_H
00011 # include <BALL/COMMON/global.h>
00012 #endif
00013
00014 #ifdef BALL_COMPILER_MSVC
00015 # include <BALL/VIEW/UIC/ui_stageSettings.h>
00016 #else
00017 # include <BALL/VIEW/UIC/stageSettingsData.h>
00018 #endif
00019
00020
00021 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
00022 # include <BALL/VIEW/KERNEL/preferencesEntry.h>
00023 #endif
00024
00025 #ifndef BALL_MATH_VECTOR3
00026 # include <BALL/MATHS/vector3.h>
00027 #endif
00028
00029 #include <QtGui/QWidget>
00030
00031 namespace BALL
00032 {
00033 namespace VIEW
00034 {
00035 class Stage;
00036 class Scene;
00037
00046 class BALL_VIEW_EXPORT StageSettings
00047 : public QWidget,
00048 public Ui_StageSettingsData,
00049 public PreferencesEntry
00050 {
00051 Q_OBJECT
00052
00053 public:
00054
00056 StageSettings( QWidget* parent = 0, const char* name = "StageSettings", Qt::WFlags fl = 0 );
00057
00059 ~StageSettings() {}
00060
00062 void updateFromStage();
00063
00065 void apply();
00066
00068 void getGLSettings();
00069
00070 public slots:
00071
00073 void colorPressed();
00074
00076 void computeDefaultPressed();
00077
00079 void loadEnvironmentMapPressed();
00080
00082 void environmentMapChanged(bool active);
00083
00085 void fogBoxChanged(bool active);
00086
00088 void cappingColorPressed();
00089
00090
00091 private slots:
00092
00094 void eyeDistanceChanged();
00095
00097 void focalDistanceChanged();
00098
00100 void projectionTransformationChanged();
00101
00102 private:
00103
00105 Vector3 getTextureUpDirection_()
00106 throw(Exception::InvalidFormat);
00107
00109 void setTextureUpDirection_(const Vector3& tud);
00110
00112 float getUser2ScreenDistance_()
00113 throw(Exception::InvalidFormat);
00114
00116 void setUser2ScreenDistance_(const float& s2u);
00117
00119 float getUserEyeLevel_()
00120 throw(Exception::InvalidFormat);
00121
00123 void setUserEyeLevel_(const float& s2u);
00124
00126 float getUserEyeDistance_()
00127 throw(Exception::InvalidFormat);
00128
00130 void setUserEyeDistance_(const float& s2u);
00132 void setDefaultValues_();
00133
00134
00135 void saveSettingsToStage_();
00136
00137 Scene* scene_;
00138
00139 VIEW::Stage* stage_;
00140 };
00141
00142 } }
00143
00144 #endif