QtiPlot  0.9.8.2
Plot3DDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : Plot3DDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2004-2007 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Surface plot options dialog
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef PLOT3DDIALOG_H
30 #define PLOT3DDIALOG_H
31 
32 #include "Graph3D.h"
33 #include <QCheckBox>
34 
35 class QGroupBox;
36 class QComboBox;
37 class QLabel;
38 class QTextEdit;
39 class QListWidget;
40 class QPushButton;
41 class QRadioButton;
42 class QSpinBox;
43 class QTabWidget;
44 class QWidget;
45 class QStringList;
46 class QStackedWidget;
47 class QDoubleSpinBox;
48 class ColorButton;
49 class TextFormatButtons;
50 class DoubleSpinBox;
51 class ColorMapEditor;
52 
53 using namespace Qwt3D;
54 
56 class Plot3DDialog : public QDialog
57 {
58  Q_OBJECT
59 
60 public:
61  Plot3DDialog( QWidget* parent, Qt::WFlags fl = 0 );
62  void setPlot(Graph3D *);
63 
64  void showTitleTab();
65  void showAxisTab();
66  void showGeneralTab();
67 
68 private slots:
69  void accept();
70  bool updatePlot();
71 
72  void pickTitleFont();
73  void viewAxisOptions(int axis);
74  QFont axisFont(int axis);
75  void pickAxisLabelFont();
76  void pickNumbersFont();
77 
78  void viewScaleLimits(int axis);
79  void disableMeshOptions();
80 
81  void worksheet();
82 
83  void initPointsOptionsStack();
84  void changeZoom(int);
85  void changeTransparency(int val);
86  void pickDataColorMap();
87  void updateColorMapFileGroupBox(bool);
88  void updateLinearColorMapGroupBox(bool);
89  void enableMajorGrids(bool on);
90  void enableMinorGrids(bool on);
91 
92 private:
93  void initConnections();
94  void initScalesPage();
95  void initAxesPage();
96  void initTitlePage();
97  void initGridPage();
98  void initColorsPage();
99  void initGeneralPage();
100  void initPrintPage();
101  void setColorMapPreview(const QString& fileName);
102 
103  void showBarsTab();
104  void showPointsTab(double rad, bool smooth);
105  void showConesTab(double rad, int quality);
106  void showCrossHairTab(double rad, double linewidth, bool smooth, bool boxed);
107 
109  QGroupBox *linearColorMapGroupBox, *colorMapFileGroupBox;
111  QFont titleFont, xAxisFont,yAxisFont,zAxisFont, numbersFont;
112  QStringList labels;
113  QDoubleSpinBox *boxMeshLineWidth;
114  QPushButton* buttonApply;
115  QPushButton* buttonOk;
116  QPushButton* buttonCancel;
117  QPushButton *btnTitleFont, *btnLabelFont;
118  QPushButton *btnNumbersFont, *btnTable, *btnColorMap;
119  ColorButton *btnBackground, *btnMesh, *btnAxes, *btnTitleColor, *btnLabels, *btnNumbers, *btnGrid, *btnGridMinor;
121  QTabWidget* generalDialog;
122  QWidget *scale, *colors, *general, *axes, *title, *bars, *points, *gridPage, *printPage;
123  DoubleSpinBox *boxFrom, *boxTo;
124  QTextEdit *boxTitle, *boxLabel;
125  QSpinBox *boxMajors, *boxMinors;
126  QGroupBox *TicksGroupBox, *AxesColorGroupBox;
127  QSpinBox *boxResolution, *boxDistance, *boxTransparency;
129  QCheckBox *boxLegend, *boxSmooth, *boxBoxed, *boxCrossSmooth, *boxOrthogonal;
130  QListWidget *axesList, *axesList2;
131  QComboBox *boxType, *boxPointStyle;
132  DoubleSpinBox *boxMajorLength, *boxMinorLength, *boxConesRad;
133  QSpinBox *boxZoom, *boxXScale, *boxYScale, *boxZScale, *boxQuality, *boxPrecision;
134  DoubleSpinBox *boxSize, *boxBarsRad, *boxCrossRad, *boxCrossLinewidth;
135  QStackedWidget *optionStack;
136  QWidget *dotsPage, *conesPage, *crossPage;
137  QCheckBox *boxBarLines, *boxFilledBars, *boxScaleOnPrint, *boxPrintCropmarks;
138  TextFormatButtons *titleFormatButtons, *axisTitleFormatButtons;
139  double zoom, xScale, yScale, zScale;
141  DoubleSpinBox *boxMajorGridWidth, *boxMinorGridWidth;
142  QComboBox *boxMajorGridStyle, *boxMinorGridStyle, *boxTickLabelsFormat;
143  QCheckBox *boxMajorGrids, *boxMinorGrids;
144  DoubleSpinBox *boxXRotation, *boxYRotation, *boxZRotation;
145 };
146 
147 #endif