00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_VIEW_DIALOGS_RAYTRACEABLECONTOURSURFACEDIALOG_H 00006 #define BALL_VIEW_DIALOGS_RAYTRACEABLECONTOURSURFACEDIALOG_H 00007 00008 #ifndef BALL_COMMON_GLOBAL_H 00009 # include <BALL/COMMON/global.h> 00010 #endif 00011 00012 #ifndef BALL_COMMON_EXCEPTION_H 00013 # include <BALL/COMMON/exception.h> 00014 #endif 00015 00016 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H 00017 # include <BALL/VIEW/KERNEL/modularWidget.h> 00018 #endif 00019 00020 #ifndef BALL_VIEW_DATATYP_RAYTRACEABLEGRID_H 00021 # include <BALL/VIEW/DATATYPE/raytraceableGrid.h> 00022 #endif 00023 00024 #include <BALL/VIEW/UIC/ui_raytraceableContourSurfaceDialog.h> 00025 00026 #include <QtGui/QDialog> 00027 00028 namespace BALL 00029 { 00030 namespace VIEW 00031 { 00035 class BALL_VIEW_EXPORT RaytraceableContourSurfaceDialog 00036 : public QDialog, 00037 public Ui_RaytraceableContourSurfaceDialogData, 00038 public ModularWidget 00039 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 00045 BALL_EMBEDDABLE(RaytraceableContourSurfaceDialog, ModularWidget) 00046 00047 00048 RaytraceableContourSurfaceDialog(RaytraceableGrid* grid, QWidget* parent = 0, const char* name = "RaytraceableContourSurfaceDialog", bool modal = FALSE, Qt::WFlags fl = 0); 00049 00051 ~RaytraceableContourSurfaceDialog(); 00052 00053 void setGrid(RaytraceableGrid* grid) {grid_ = grid;}; 00054 RaytraceableGrid* getGrid() {return grid_;}; 00055 00056 public slots: 00057 00059 void add(); 00060 00062 void accept(); 00063 00065 void reject(); 00066 00068 void changedSliderThreshold(int a); 00069 00071 void changedEditThreshold(); 00072 00073 // 00074 void changedRangeMin(); 00075 00076 // 00077 void changedRangeMax(); 00078 00079 // 00080 void changedRangeSteps(); 00081 00082 00083 //void setDefaultRangeValues_(); 00084 00085 protected slots: 00086 00087 void setDefaultRangeValues_(); 00088 00089 00090 protected: 00091 00092 void addModel_(float threshold); 00093 00094 private: 00095 00096 float getValue_(const QAbstractSlider* slider) const; 00097 float getValue_(const QLineEdit* edit) const 00098 throw(Exception::InvalidFormat); 00099 00100 00101 // the sliders min and max 00102 float min_; 00103 float max_; 00104 00105 int steps_; 00106 float current_threshold_; 00107 00108 RaytraceableGrid* grid_; 00109 00110 }; 00111 00112 00113 } // namespaces 00114 } 00115 00116 #endif //BALL_VIEW_DIALOGS_RAYTRACEABLECONTOURSURFACEDIALOG_H 00117