00001
00002
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 #ifdef BALL_COMPILER_MSVC
00017 # include <BALL/VIEW/UIC/ui_raytraceableContourSurfaceDialog.h>
00018 #else
00019 # include <BALL/VIEW/UIC/raytraceableContourSurfaceDialogData.h>
00020 #endif
00021
00022 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00023 # include <BALL/VIEW/KERNEL/modularWidget.h>
00024 #endif
00025
00026 #ifndef BALL_VIEW_DATATYP_RAYTRACEABLEGRID_H
00027 # include <BALL/VIEW/DATATYPE/raytraceableGrid.h>
00028 #endif
00029
00030 #include <QtGui/QDialog>
00031
00032 namespace BALL
00033 {
00034 namespace VIEW
00035 {
00039 class BALL_VIEW_EXPORT RaytraceableContourSurfaceDialog
00040 : public QDialog,
00041 public Ui_RaytraceableContourSurfaceDialogData,
00042 public ModularWidget
00043
00044 {
00045 Q_OBJECT
00046
00047 public:
00048
00049 BALL_EMBEDDABLE(RaytraceableContourSurfaceDialog, ModularWidget)
00050
00051
00052 RaytraceableContourSurfaceDialog(RaytraceableGrid* grid, QWidget* parent = 0, const char* name = "RaytraceableContourSurfaceDialog", bool modal = FALSE, Qt::WFlags fl = 0);
00053
00055 ~RaytraceableContourSurfaceDialog();
00056
00057 void setGrid(RaytraceableGrid* grid) {grid_ = grid;};
00058 RaytraceableGrid* getGrid() {return grid_;};
00059
00060 public slots:
00061
00063 void add();
00064
00066 void accept();
00067
00069 void reject();
00070
00072 void changedSliderThreshold(int a);
00073
00075 void changedEditThreshold();
00076
00077
00078 void changedRangeMin();
00079
00080
00081 void changedRangeMax();
00082
00083
00084 void changedRangeSteps();
00085
00086
00087
00088
00089 protected slots:
00090
00091 void setDefaultRangeValues_();
00092
00093
00094 protected:
00095
00096 void addModel_(float threshold);
00097
00098 private:
00099
00100 float getValue_(const QAbstractSlider* slider) const;
00101 float getValue_(const QLineEdit* edit) const
00102 throw(Exception::InvalidFormat);
00103
00104
00105
00106 float min_;
00107 float max_;
00108
00109 int steps_;
00110 float current_threshold_;
00111
00112 RaytraceableGrid* grid_;
00113
00114 };
00115
00116
00117 }
00118 }
00119
00120 #endif //BALL_VIEW_DIALOGS_RAYTRACEABLECONTOURSURFACEDIALOG_H
00121