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 initPrintPage();
00101 void setColorMapPreview(const QString& fileName);
00102
00103 void showBarsTab();
00104 void showPointsTab(double rad, bool smooth);
00105 void showConesTab(double rad, int quality);
00106 void showCrossHairTab(double rad, double linewidth, bool smooth, bool boxed);
00107
00108 Graph3D *d_plot;
00109 QGroupBox *linearColorMapGroupBox, *colorMapFileGroupBox;
00110 QLabel *colorMapPreviewLabel;
00111 QFont titleFont, xAxisFont,yAxisFont,zAxisFont, numbersFont;
00112 QStringList labels, tickLengths;
00113 QDoubleSpinBox *boxMeshLineWidth;
00114 QPushButton* buttonApply;
00115 QPushButton* buttonOk;
00116 QPushButton* buttonCancel;
00117 QPushButton *btnTitleFont, *btnLabelFont;
00118 QPushButton *btnNumbersFont, *btnTable, *btnColorMap;
00119 ColorButton *btnBackground, *btnMesh, *btnAxes, *btnTitleColor, *btnLabels, *btnNumbers, *btnGrid, *btnGridMinor;
00120 ColorMapEditor *d_color_map_editor;
00121 QTabWidget* generalDialog;
00122 QWidget *scale, *colors, *general, *axes, *title, *bars, *points, *gridPage, *printPage;
00123 DoubleSpinBox *boxFrom, *boxTo;
00124 QTextEdit *boxTitle, *boxLabel;
00125 QSpinBox *boxMajors, *boxMinors;
00126 QGroupBox *TicksGroupBox, *AxesColorGroupBox;
00127 QSpinBox *boxResolution, *boxDistance, *boxTransparency;
00128 QCheckBox *boxLegend, *boxSmooth, *boxBoxed, *boxCrossSmooth, *boxOrthogonal;
00129 QListWidget *axesList, *axesList2;
00130 QComboBox *boxType, *boxPointStyle;
00131 DoubleSpinBox *boxMajorLength, *boxMinorLength, *boxConesRad;
00132 QSpinBox *boxZoom, *boxXScale, *boxYScale, *boxZScale, *boxQuality, *boxPrecision;
00133 DoubleSpinBox *boxSize, *boxBarsRad, *boxCrossRad, *boxCrossLinewidth;
00134 QStackedWidget *optionStack;
00135 QWidget *dotsPage, *conesPage, *crossPage;
00136 QCheckBox *boxBarLines, *boxFilledBars, *boxScaleOnPrint, *boxPrintCropmarks;
00137 TextFormatButtons *titleFormatButtons, *axisTitleFormatButtons;
00138 double zoom, xScale, yScale, zScale;
00139 QString d_color_map_file;
00140 DoubleSpinBox *boxMajorGridWidth, *boxMinorGridWidth;
00141 QComboBox *boxMajorGridStyle, *boxMinorGridStyle, *boxTickLabelsFormat;
00142 QCheckBox *boxMajorGrids, *boxMinorGrids;
00143 };
00144
00145 #endif