QtiPlot
0.9.8.2
|
00001 /*************************************************************************** 00002 File : Plot3DDialog.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2004-2007 by Ion Vasilief 00006 Email (use @ for *) : ion_vasilief*yahoo.fr 00007 Description : Surface plot options dialog 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 * This program is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00021 * GNU General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU General Public License * 00024 * along with this program; if not, write to the Free Software * 00025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00026 * Boston, MA 02110-1301 USA * 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; 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 QSlider *transparencySlider; 00129 QCheckBox *boxLegend, *boxSmooth, *boxBoxed, *boxCrossSmooth, *boxOrthogonal; 00130 QListWidget *axesList, *axesList2; 00131 QComboBox *boxType, *boxPointStyle; 00132 DoubleSpinBox *boxMajorLength, *boxMinorLength, *boxConesRad; 00133 QSpinBox *boxZoom, *boxXScale, *boxYScale, *boxZScale, *boxQuality, *boxPrecision; 00134 DoubleSpinBox *boxSize, *boxBarsRad, *boxCrossRad, *boxCrossLinewidth; 00135 QStackedWidget *optionStack; 00136 QWidget *dotsPage, *conesPage, *crossPage; 00137 QCheckBox *boxBarLines, *boxFilledBars, *boxScaleOnPrint, *boxPrintCropmarks; 00138 TextFormatButtons *titleFormatButtons, *axisTitleFormatButtons; 00139 double zoom, xScale, yScale, zScale; 00140 QString d_color_map_file; 00141 DoubleSpinBox *boxMajorGridWidth, *boxMinorGridWidth; 00142 QComboBox *boxMajorGridStyle, *boxMinorGridStyle, *boxTickLabelsFormat; 00143 QCheckBox *boxMajorGrids, *boxMinorGrids; 00144 DoubleSpinBox *boxXRotation, *boxYRotation, *boxZRotation; 00145 }; 00146 00147 #endif