Plot3DDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : Plot3DDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2006 by Ion Vasilief, Tilman Hoener zu Siederdissen
00006     Email (use @ for *)  : ion_vasilief*yahoo.fr, thzs*gmx.net
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 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; //custom data colors
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

Generated on Mon Oct 15 06:11:42 2007 for QtiPlot by  doxygen 1.5.3