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 QComboBox;
00036 class QLabel;
00037 class QLineEdit;
00038 class QListWidget;
00039 class QPushButton;
00040 class QRadioButton;
00041 class QSpinBox;
00042 class QTabWidget;
00043 class QWidget;
00044 class QStringList;
00045 class QStackedWidget;
00046
00047 using namespace Qwt3D;
00048
00050 class Plot3DDialog : public QDialog
00051 {
00052 Q_OBJECT
00053
00054 public:
00055 Plot3DDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, Qt::WFlags fl = 0 );
00056 ~Plot3DDialog();
00057
00058 public slots:
00059 void accept();
00060 bool updatePlot();
00061
00062 QColor pickFromColor();
00063 QColor pickToColor();
00064 QColor pickMeshColor();
00065 QColor pickAxesColor();
00066 QColor pickTitleColor();
00067 QColor pickNumberColor();
00068 QColor pickBgColor();
00069 QColor pickLabelColor();
00070 QColor pickGridColor();
00071
00072 void setColors(const QColor& title, const QColor& mesh,const QColor& axes,const QColor& num,
00073 const QColor& label,const QColor& bg,const QColor& grid);
00074 void setDataColors(const QColor& minColor, const QColor& maxColor);
00075 void setTransparency(double t);
00076 void pickTitleFont();
00077 void setTitle(const QString& title);
00078 void setTitleFont(const QFont& font);
00079
00080 void setResolution(int r);
00081 void showLegend(bool show);
00082 void setOrthogonal(bool on){boxOrthogonal->setChecked(on);};
00083
00084 void setAxesLabels(const QStringList& list);
00085 void viewAxisOptions(int axis);
00086
00087 void setAxesFonts(const QFont& xf, const QFont& yf, const QFont& zf);
00088 QFont axisFont(int axis);
00089 void pickAxisLabelFont();
00090
00091 void pickNumbersFont();
00092 void setNumbersFonts(const QFont& f){numbersFont=f;};
00093
00094 QStringList scaleOptions(int axis, double start, double end,
00095 const QString& majors, const QString& minors);
00096 void setScales(const QStringList& list);
00097 void viewScaleLimits(int axis);
00098
00099 void setAxesTickLengths(const QStringList& list);
00100 void setMeshLineWidth(double lw);
00101 void setLabelsDistance(int dist);
00102
00103 void disableAxesOptions();
00104 void disableMeshOptions();
00105 void disableLegend();
00106 void disableGridOptions();
00107 void showBarsTab(double rad);
00108 void showPointsTab(double rad, bool smooth);
00109 void showConesTab(double rad, int quality);
00110 void showCrossHairTab(double rad, double linewidth, bool smooth, bool boxed);
00111
00112 void customWorksheetBtn(const QString& text);
00113 void worksheet();
00114 void setZoom(double zoom);
00115 void setScaling(double xVal, double yVal, double zVal);
00116 void showTitleTab();
00117 void showAxisTab();
00118
00119 void initPointsOptionsStack();
00120 void changeZoom(int);
00121 void changeTransparency(int val);
00122
00123 void showLowerGreek();
00124 void showUpperGreek();
00125 void addSymbol(const QString& letter);
00126 void showGeneralTab();
00127
00128 void pickDataColorMap();
00129 void setPlot(Graph3D *plot){d_plot = plot;};
00130
00131 signals:
00132 void showWorksheet();
00133 void updatePoints(double, bool);
00134 void updateBars(double);
00135 void updateTransparency(double);
00136 void updateDataColors(const QColor&,const QColor&);
00137 void updateColors(const QColor&,const QColor&,const QColor&,const QColor&,const QColor&,const QColor&);
00138 void updateTitle(const QString&,const QColor&,const QFont&);
00139 void updateResolution(int);
00140 void showColorLegend(bool);
00141 void setOrtho(bool);
00142 void updateLabel(int,const QString&, const QFont&);
00143 void updateScale(int,const QStringList&);
00144 void updateTickLength(int,double, double);
00145 void adjustLabels (int);
00146 void setNumbersFont(const QFont&);
00147 void updateMeshLineWidth(int);
00148 void updateZoom(double);
00149 void updateScaling(double, double, double);
00150 void updateCones(double, int);
00151 void updateCross(double, double, bool, bool);
00152 void setDataColorMap(const QString&);
00153
00154 private:
00155 void initScalesPage();
00156 void initAxesPage();
00157 void initTitlePage();
00158 void initColorsPage();
00159 void initGeneralPage();
00160
00161 Graph3D *d_plot;
00162 QFont titleFont, xAxisFont,yAxisFont,zAxisFont, numbersFont;
00163 QStringList labels, scales, tickLengths;
00164 QColor titleColor,meshColor,bgColor, axesColor, numColor,labelColor, gridColor;
00165 QColor fromColor, toColor;
00166
00167 QSpinBox *boxMeshLineWidth;
00168 QPushButton* buttonApply;
00169 QPushButton* buttonOk;
00170 QPushButton* buttonCancel, *buttonLowerGreek, *buttonUpperGreek;
00171 QPushButton* btnTitleColor, *btnTitleFont, *btnLabelFont, *btnGrid;
00172 QPushButton *btnBackground, *btnMesh, *btnAxes, *btnTitle, *btnLabels, *btnNumbers;
00173 QPushButton *btnNumbersFont, *btnFromColor, *btnToColor, *btnTable, *btnColorMap;
00174 QPushButton *buttonAxisLowerGreek, *buttonAxisUpperGreek;
00175 QTabWidget* generalDialog;
00176 QWidget *scale, *colors, *general, *axes, *title, *bars, *points;
00177 QLineEdit *boxTitle, *boxFrom, *boxTo, *boxLabel;
00178 QSpinBox *boxMajors, *boxMinors;
00179 QGroupBox *TicksGroupBox, *AxesColorGroupBox;
00180 QSpinBox *boxResolution, *boxDistance, *boxTransparency;
00181 QCheckBox *boxLegend, *boxSmooth, *boxBoxed, *boxCrossSmooth, *boxOrthogonal;
00182 QListWidget *axesList, *axesList2;
00183 QComboBox *boxType, *boxPointStyle;
00184 QLineEdit *boxMajorLength, *boxMinorLength, *boxConesRad;
00185 QSpinBox *boxZoom, *boxXScale, *boxYScale, *boxZScale, *boxQuality;
00186 QLineEdit *boxSize, *boxBarsRad, *boxCrossRad, *boxCrossLinewidth;
00187 QStackedWidget *optionStack;
00188 QWidget *dotsPage, *conesPage, *crossPage;
00189 };
00190
00191 #endif