gridVisualizationDialog.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_DIALOGS_GRIDVISUALIZATIONDIALOG_H
00006 #define BALL_VIEW_DIALOGS_GRIDVISUALIZATIONDIALOG_H
00007 
00008 #ifndef BALL_COMMON_GLOBAL_H
00009 # include <BALL/COMMON/global.h>
00010 #endif
00011 
00012 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
00013 # include <BALL/VIEW/DATATYPE/colorRGBA.h>
00014 #endif
00015 
00016 #ifndef BALL_DATATYPE_REGULARDATA3D
00017 # include <BALL/DATATYPE/regularData3D.h>
00018 #endif 
00019 
00020 #ifndef BALL_DATATYPE_LIST_H
00021 # include <BALL/DATATYPE/list.h>
00022 #endif
00023 
00024 #ifndef BALL_VIEW_DATATYPE_STANDARDDATASETS_H
00025 # include <BALL/VIEW/DATATYPE/standardDatasets.h>
00026 #endif
00027 
00028 #include <BALL/VIEW/UIC/ui_gridVisualizationDialog.h>
00029 
00030 namespace BALL
00031 {
00032   namespace VIEW
00033   {
00037     class BALL_VIEW_EXPORT GridVisualizationDialog 
00038       : public QDialog,
00039         public Ui_GridVisualizationDialogData
00040     { 
00041       Q_OBJECT
00042 
00043       public:
00044 
00046       GridVisualizationDialog(QWidget* parent = 0, const char* name = "GridVisualizationDialog", 
00047                               bool modal = FALSE, Qt::WFlags fl = 0);
00048 
00050       ~GridVisualizationDialog();
00051           
00053       void setGrid(RegularData3D* grid);
00054       
00056       void setController(RegularData3DController* controller);
00057       
00059       void setMinValue(float value);
00060           
00062       void setMaxValue(float value);
00063           
00065       void setMidValue(float value);
00066 
00067       public slots:
00068       
00069       void accept();
00070       void maxPressed();
00071       void midPressed();
00072       void minPressed();
00073       void minMinPressed();
00074       void maxMaxPressed();
00075       void autoScale();
00076       void gridSelected();
00077       bool exec();
00078 
00079       protected slots:
00080 
00081       void gridTransparencyChanged();
00082       void normalizationChanged();
00083 
00084       protected:
00085 
00086       GridVisualizationDialog(const GridVisualizationDialog& dialog);
00087 
00088       bool insertGrid_(RegularData3D& grid, const String& name);
00089       void setColor_(ColorRGBA& color, const QLabel* label, const QSpinBox* box);
00090       void getColor_(const ColorRGBA& color, QLabel* label, QSpinBox* box);
00091       void checkApplyButton_();
00092 
00093       RegularData3D* grid_;
00094       RegularData3DController* controller_;
00095 
00096       ColorRGBA   min_min_color, min_color, mid_color, max_color, max_max_color;  
00097 
00098       List<RegularData3D*> grid_list_;
00099     };
00100 
00101   } // namespace VIEW
00102 } // namespace BALL
00103 
00104 #endif