00001 #ifndef CONTROLS_H
00002 #define CONTROLS_H
00003
00004 #include <QGroupBox>
00005 #include <QSpinBox>
00006 #include <QDoubleSpinBox>
00007
00008 #include "Shadewidget.h"
00009 #include "Hoverpoints.h"
00010 #include "../renderer/Renderer.h"
00011
00015 class Controls : public QWidget
00016 {
00017 Q_OBJECT
00018
00019 public:
00020 Controls(QWidget* parent = 0);
00021 virtual ~Controls();
00022
00023 signals:
00025 void screenShotPressed();
00026
00027 public slots:
00029 void initGLFinished();
00031 void saveTransferFunctions(const std::string&);
00032
00033 void setDataset();
00034
00035 void setDoTexture();
00036 void setTextureChannel();
00037
00038 void setDoArrows();
00039 void setArrowSize();
00040 void setArrowStyle();
00041
00042 void setDoStreamlines();
00043 void setStreamlineColor();
00044 void setStreamlineDtest();
00045 void setStreamlineDsep();
00046 void setStreamlineSegLength();
00047 void setStreamlineStyle();
00048
00049 private:
00050
00051 QGroupBox* boxDataset;
00052 QGroupBox* boxTexture;
00053 QGroupBox* boxArrows;
00054 QGroupBox* boxStreamlines;
00055 QGroupBox* boxTF;
00056
00057 QComboBox* cbData;
00058
00059 QLabel* lblBgChannel;
00060 QComboBox* cbBgChannel;
00061
00062
00063
00064 QLabel* lblArrowSize;
00065 QDoubleSpinBox* sbArrowSize;
00066 QLabel* lblArrowStyle;
00067 QComboBox* cbArrowStyle;
00068
00069 QLabel* lblStreamlineColor;
00070 QLabel* lblStreamlineDtest;
00071 QDoubleSpinBox* sbStreamlineDtest;
00072 QLabel* lblStreamlineDsep;
00073 QSpinBox* sbStreamlineDsep;
00074 QLabel* lblStreamlineSegLength;
00075 QDoubleSpinBox* cbStreamlineSegLength;
00076 QLabel* lblStreamlineStyle;
00077 QComboBox* cbStreamlineStyle;
00078
00079 std::vector<Renderer::TransferFunction*> transferFunctions;
00080
00081 QLabel* transferFuncLabel;
00082 QComboBox* transferFuncBox;
00083
00084 QCheckBox* cbTf;
00085 QLineEdit* tfName;
00086
00087 QPushButton* newTfButton;
00088
00089 ShadeWidget* transferEditor;
00090
00091 QPushButton* screenShotButton;
00092
00093 private slots:
00094 void transferFuncSelected(int);
00095
00096 void newTransferFuncPressed();
00097 void loadTransferFunctions(const std::string&);
00098 Renderer::TransferFunction* loadTF(QString&, QDomElement&);
00099 bool loadTFPoint(Renderer::TFPoint& tfPoint, QDomElement&);
00100
00101 };
00102
00103 #endif