00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef PLOT3DDIALOG_H
00030 #define PLOT3DDIALOG_H
00031
00032 #include "Graph3D.h"
00033 #include <QCheckBox>
00034
00035 class QGroupBox;
00036 class QComboBox;
00037 class QLabel;
00038 class QTextEdit;
00039 class QListWidget;
00040 class QPushButton;
00041 class QRadioButton;
00042 class QSpinBox;
00043 class QTabWidget;
00044 class QWidget;
00045 class QStringList;
00046 class QStackedWidget;
00047 class QDoubleSpinBox;
00048 class ColorButton;
00049 class TextFormatButtons;
00050 class DoubleSpinBox;
00051 class ColorMapEditor;
00052
00053 using namespace Qwt3D;
00054
00056 class Plot3DDialog : public QDialog
00057 {
00058 Q_OBJECT
00059
00060 public:
00061 Plot3DDialog( QWidget* parent, Qt::WFlags fl = 0 );
00062 void setPlot(Graph3D *);
00063
00064 void showTitleTab();
00065 void showAxisTab();
00066 void showGeneralTab();
00067
00068 private slots:
00069 void accept();
00070 bool updatePlot();
00071
00072 void pickTitleFont();
00073 void viewAxisOptions(int axis);
00074 QFont axisFont(int axis);
00075 void pickAxisLabelFont();
00076 void pickNumbersFont();
00077
00078 void viewScaleLimits(int axis);
00079 void disableMeshOptions();
00080
00081 void worksheet();
00082
00083 void initPointsOptionsStack();
00084 void changeZoom(int);
00085 void changeTransparency(int val);
00086 void pickDataColorMap();
00087 void updateColorMapFileGroupBox(bool);
00088 void updateLinearColorMapGroupBox(bool);
00089 void enableMajorGrids(bool on);
00090 void enableMinorGrids(bool on);
00091
00092 private:
00093 void initConnections();
00094 void initScalesPage();
00095 void initAxesPage();
00096 void initTitlePage();
00097 void initGridPage();
00098 void initColorsPage();
00099 void initGeneralPage();
00100 void setColorMapPreview(const QString& fileName);
00101
00102 void showBarsTab();
00103 void showPointsTab(double rad, bool smooth);
00104 void showConesTab(double rad, int quality);
00105 void showCrossHairTab(double rad, double linewidth, bool smooth, bool boxed);
00106
00107 Graph3D *d_plot;
00108 QGroupBox *linearColorMapGroupBox, *colorMapFileGroupBox;
00109 QLabel *colorMapPreviewLabel;
00110 QFont titleFont, xAxisFont,yAxisFont,zAxisFont, numbersFont;
00111 QStringList labels, tickLengths;
00112 QDoubleSpinBox *boxMeshLineWidth;
00113 QPushButton* buttonApply;
00114 QPushButton* buttonOk;
00115 QPushButton* buttonCancel;
00116 QPushButton *btnTitleFont, *btnLabelFont;
00117 QPushButton *btnNumbersFont, *btnTable, *btnColorMap;
00118 ColorButton *btnBackground, *btnMesh, *btnAxes, *btnTitleColor, *btnLabels, *btnNumbers, *btnGrid, *btnGridMinor;
00119 ColorMapEditor *d_color_map_editor;
00120 QTabWidget* generalDialog;
00121 QWidget *scale, *colors, *general, *axes, *title, *bars, *points, *gridPage;
00122 DoubleSpinBox *boxFrom, *boxTo;
00123 QTextEdit *boxTitle, *boxLabel;
00124 QSpinBox *boxMajors, *boxMinors;
00125 QGroupBox *TicksGroupBox, *AxesColorGroupBox;
00126 QSpinBox *boxResolution, *boxDistance, *boxTransparency;
00127 QCheckBox *boxLegend, *boxSmooth, *boxBoxed, *boxCrossSmooth, *boxOrthogonal;
00128 QListWidget *axesList, *axesList2;
00129 QComboBox *boxType, *boxPointStyle;
00130 DoubleSpinBox *boxMajorLength, *boxMinorLength, *boxConesRad;
00131 QSpinBox *boxZoom, *boxXScale, *boxYScale, *boxZScale, *boxQuality;
00132 DoubleSpinBox *boxSize, *boxBarsRad, *boxCrossRad, *boxCrossLinewidth;
00133 QStackedWidget *optionStack;
00134 QWidget *dotsPage, *conesPage, *crossPage;
00135 QCheckBox *boxBarLines, *boxFilledBars;
00136 TextFormatButtons *titleFormatButtons, *axisTitleFormatButtons;
00137 double zoom, xScale, yScale, zScale;
00138 QString d_color_map_file;
00139 DoubleSpinBox *boxMajorGridWidth, *boxMinorGridWidth;
00140 QComboBox *boxMajorGridStyle, *boxMinorGridStyle;
00141 QCheckBox *boxMajorGrids, *boxMinorGrids;
00142 };
00143
00144 #endif