BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_VIEW_DIALOGS_STAGESETTINGS_H 00006 #define BALL_VIEW_DIALOGS_STAGESETTINGS_H 00007 00008 #ifndef BALL_COMMON_GLOBAL_H 00009 # include <BALL/COMMON/global.h> 00010 #endif 00011 00012 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY 00013 # include <BALL/VIEW/KERNEL/preferencesEntry.h> 00014 #endif 00015 00016 #ifndef BALL_MATH_VECTOR3 00017 # include <BALL/MATHS/vector3.h> 00018 #endif 00019 00020 #include <BALL/VIEW/UIC/ui_stageSettings.h> 00021 00022 #include <QtGui/QWidget> 00023 00024 namespace BALL 00025 { 00026 namespace VIEW 00027 { 00028 class Stage; 00029 class Scene; 00030 00039 class BALL_VIEW_EXPORT StageSettings 00040 : public QWidget, 00041 public Ui_StageSettingsData, 00042 public PreferencesEntry 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 00049 StageSettings( QWidget* parent = 0, const char* name = "StageSettings", Qt::WFlags fl = 0 ); 00050 00052 ~StageSettings() {} 00053 00055 void updateFromStage(); 00056 00058 void apply(); 00059 00061 void getGLSettings(); 00062 00063 public slots: 00064 00066 void colorPressed(); 00067 00069 void computeDefaultPressed(); 00070 00072 void loadEnvironmentMapPressed(); 00073 00075 void environmentMapChanged(bool active); 00076 00078 void fogBoxChanged(bool active); 00079 00081 void cappingColorPressed(); 00082 00083 00084 private slots: 00085 00087 void eyeDistanceChanged(); 00088 00090 void focalDistanceChanged(); 00091 00093 void projectionTransformationChanged(); 00094 00095 private: 00096 00098 Vector3 getTextureUpDirection_() 00099 throw(Exception::InvalidFormat); 00100 00102 void setTextureUpDirection_(const Vector3& tud); 00103 00105 float getUser2ScreenDistance_() 00106 throw(Exception::InvalidFormat); 00107 00109 void setUser2ScreenDistance_(const float& s2u); 00110 00112 float getUserEyeLevel_() 00113 throw(Exception::InvalidFormat); 00114 00116 void setUserEyeLevel_(const float& s2u); 00117 00119 float getUserEyeDistance_() 00120 throw(Exception::InvalidFormat); 00121 00123 void setUserEyeDistance_(const float& s2u); 00125 void setDefaultValues_(); 00126 00127 //_ apply values to a Stage 00128 void saveSettingsToStage_(); 00129 00130 Scene* scene_; 00131 00132 VIEW::Stage* stage_; 00133 }; 00134 00135 } } 00136 00137 #endif