00001 #ifndef CPROPERTIES_H 00002 #define CPROPERTIES_H 00003 00004 /**************************************************************************\ 00005 * REQUIRED HEADERS * 00006 \**************************************************************************/ 00007 00008 //UI 00009 #include "ui_CProperties.h" 00010 //QT 00011 #include <QWidget> 00012 #include <QSettings> 00013 //OWN 00014 #include "Definitions.h" 00015 #include "Memory/mmgr.h" 00016 #include "Memory/TSmartPointer.h" 00017 #include "modules/Display/Light/CLight.h" 00018 #include "CTransferProperty.h" 00019 #include "CVolumeStatistics.h" 00020 00021 /**************************************************************************\ 00022 * DEFINITIONS * 00023 \**************************************************************************/ 00024 00025 class VStudio; 00026 00027 /**************************************************************************\ 00028 * CLASS * 00029 \**************************************************************************/ 00030 class CProperties : public QWidget 00031 { 00032 Q_OBJECT 00033 00034 /**************************************************************************\ 00035 * PUBLIC CLASS FUNCTIONS * 00036 \**************************************************************************/ 00037 public: 00038 00039 CProperties(QSettings & initSettings,QWidget *parent = 0); 00040 ~CProperties(); 00041 00042 //HELPER 00043 void SaveState(QSettings & saveFile); 00044 void OpenState(QSettings & openFile); 00045 void SetActive(bool); 00046 00047 //SET A NEW VOLUME STATISTICS OBJECT 00048 void SetVolumeStatistics(TSmartPointer<CVolumeStatistics> newVS); 00049 00050 //GET BUILT IN TRANSFERPROPERTY WIDGETS 00051 TSmartPointer<CTransferProperty> GetDensityTransfer(){return pTransferProperty;} 00052 TSmartPointer<CTransferProperty> GetGradientTransfer(){return pGradTransferProperty;} 00053 00054 //GET LIGHT 00055 TSmartPointer<CLight> GetLight(){return spLight;} 00056 00057 //UPDATE 00058 void Update(); 00059 00060 /**************************************************************************\ 00061 * PUBLIC MEMBER * 00062 \**************************************************************************/ 00063 public: 00064 00065 int renderMode; 00066 float stepSize; 00067 int maxSamples; 00068 float minClip; 00069 bool applyNoise; 00070 int fboSize; 00071 int transferSize; 00072 bool shadowEnable; 00073 float shadowQuality; 00074 float shadowTreshold; 00075 bool currentMIP; 00076 bool slideScreenSpace; 00077 00078 /**************************************************************************\ 00079 * PROTECTED CLASS FUNCTIONS * 00080 \**************************************************************************/ 00081 protected: 00082 00083 void showEvent(QShowEvent *event); 00084 00085 /**************************************************************************\ 00086 * PRIVATE SLOTS * 00087 \**************************************************************************/ 00088 private slots: 00089 void on_checkBox_4_stateChanged(int); 00090 void on_slideOrthogonalToggle_released(); 00091 void on_mip_Group_toggled(bool); 00092 void on_zSlide_Slider_valueChanged(int); 00093 void on_zSlide_Checked_stateChanged(int); 00094 void on_ySlide_Slider_valueChanged(int); 00095 void on_ySlide_Checked_stateChanged(int); 00096 void on_xSlide_Slider_valueChanged(int); 00097 void on_xSlide_Checked_stateChanged(int); 00098 void on_mipButtonToggle_released(); 00099 void on_shadow_enableCheckBox_stateChanged(int); 00100 void on_shadow_quality_text_editingFinished(); 00101 void on_shadow_treshold_text_editingFinished(); 00102 void on_shadow_quality_slider_valueChanged(int); 00103 void on_shadow_treshold_slider_valueChanged(int); 00104 void on_shadingGroup_toggled(bool); 00105 void on_minClipText_editingFinished(); 00106 void on_specText_editingFinished(); 00107 void on_ambText_editingFinished(); 00108 void on_gDeltaZtext_editingFinished(); 00109 void on_gDeltaYtext_editingFinished(); 00110 void on_gDeltaXtext_editingFinished(); 00111 void on_specSlider_valueChanged(int); 00112 void on_ambSlider_valueChanged(int); 00113 void on_gDeltaZSlider_valueChanged(int); 00114 void on_gDeltaYSlider_valueChanged(int); 00115 void on_gDeltaXSlider_valueChanged(int); 00116 void on_lightColorSelect_released(); 00117 void on_checkBox_stateChanged(int); 00118 void on_lDirectionalRB_clicked(bool); 00119 void on_lPointRB_clicked(bool); 00120 void on_LDisableRB_clicked(bool); 00121 void on_minClipSlider_valueChanged(int); 00122 void on_transferSizeCombo_activated(QString); 00123 void on_properties_tab_currentChanged(int); 00124 void on_maxSamplesSlider_valueChanged(int); 00125 void on_fboSizeCombo_activated(QString); 00126 void on_noiseCheck_stateChanged(int); 00127 void on_maxSamplesText_editingFinished(); 00128 void on_stepText_editingFinished(); 00129 void on_stepSlider_valueChanged(int); 00130 void on_select_depth_clicked(); 00131 void on_select_bfcolor_clicked(); 00132 void on_select_bcolor_clicked(); 00133 00134 void UpdateRender(); 00135 void UpdateTransferProperty(int); 00136 00137 /**************************************************************************\ 00138 * PRIVATE CLASS MEMBERS * 00139 \**************************************************************************/ 00140 private: 00141 00142 Ui::CProperties ui; 00143 VStudio * pControl; 00144 00145 TSmartPointer<CVolumeStatistics> pVolumeStatistics; 00146 TSmartPointer<CTransferProperty> pTransferProperty; 00147 TSmartPointer<CTransferProperty> pGradTransferProperty; 00148 TSmartPointer<CLight> spLight; 00149 }; 00150 00151 #endif // CPROPERTIES_H