AxesDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : AxesDialog.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          : General 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 AXESDIALOG_H
00030 #define AXESDIALOG_H
00031 
00032 #include <QDialog>
00033 #include <QLabel>
00034 #include <QList>
00035 #include <QTextEdit>
00036 
00037 class QTimeEdit;
00038 class QDateTimeEdit;
00039 class QListWidget;
00040 class QListWidgetItem;
00041 class QCheckBox;
00042 class QGroupBox;
00043 class QComboBox;
00044 class QLabel;
00045 class QPushButton;
00046 class QRadioButton;
00047 class QSpinBox;
00048 class QTabWidget;
00049 class QWidget;
00050 class QStringList;
00051 class ColorBox;
00052 class ColorButton;
00053 class Graph;
00054 class TextFormatButtons;
00055 class DoubleSpinBox;
00056 class Grid;
00057 
00059 
00062 class AxesDialog : public QDialog
00063 {
00064     Q_OBJECT
00065 
00066 public:
00068 
00072     AxesDialog( QWidget* parent = 0, Qt::WFlags fl = 0 );
00073 
00074     void setGraph(Graph *g);
00075 
00076 public slots:
00077     void setCurrentScale(int axisPos);
00078     void showGeneralPage();
00079     void showAxesPage();
00080     void showGridPage();
00081     void showFormulaBox();
00082 
00084 
00088     int exec();
00089 
00090 private slots:
00091     void showAxisFormula(int axis);
00092     void customAxisLabelFont();
00093     void setAxisType(int axis);
00094     void updateAxisType(int axis);
00095     void updateTitleBox(int axis);
00096     bool updatePlot();
00097     void updateScale();
00098     void stepEnabled();
00099     void stepDisabled();
00100     void majorGridEnabled(bool on);
00101     void minorGridEnabled(bool on);
00102     void showGridOptions(int axis);
00103     void accept();
00104     void customAxisFont();
00105     void showAxis();
00106     void updateShowBox(int axis);
00107     void drawFrame(bool framed);
00108     void pickAxisColor();
00109     void pickAxisNumColor();
00110     void updateAxisColor(int);
00111     int mapToQwtAxis(int axis);
00112     int mapToQwtAxisId();
00113     void updateTickLabelsList(bool);
00114     void updateMinorTicksList(int scaleType);
00115     void setTicksType(int);
00116     void updateMajTicksType(int);
00117     void updateMinTicksType(int);
00118     void updateGrid();
00119     void updateFrame(int);
00120     void setLabelsNumericFormat(int);
00121     void updateLabelsFormat(int);
00122     void showAxisFormatOptions(int format);
00123     void setBaselineDist(int);
00124     void changeBaselineDist(int baseline);
00125     void changeMinorTicksLength (int minLength);
00126     void changeMajorTicksLength (int majLength);
00127     void pickCanvasFrameColor();
00128     void changeAxesLinewidth (int);
00129     void drawAxesBackbones (bool);
00130     void pageChanged ( QWidget *page);
00131     void showAxis(int, int, const QString&, bool, int, int, bool,
00132                   const QColor&, int, int, int, int, const QString&, const QColor&);
00133 
00134 protected:
00136     void initAxesPage();
00138     void initScalesPage();
00140     void initGridPage();
00142     void initFramePage();
00144     void applyChangesToGrid(Grid *grid);
00145 
00146     QPushButton* buttonApply;
00147     QPushButton* buttonOk;
00148     QPushButton* buttonCancel;
00149     QTabWidget* generalDialog;
00150     QWidget* scalesPage;
00151     DoubleSpinBox* boxEnd;
00152     DoubleSpinBox* boxStart;
00153     QComboBox* boxScaleType;
00154     QComboBox* boxMinorValue;
00155     DoubleSpinBox* boxStep;
00156     QCheckBox* btnStep, *btnInvert;
00157     QSpinBox* boxMajorValue;
00158     QCheckBox* btnMajor;
00159     QListWidget* axesList;
00160     QWidget* gridPage;
00161     QCheckBox* boxMajorGrid;
00162     QCheckBox* boxMinorGrid;
00163     QComboBox* boxTypeMajor;
00164     ColorBox* boxColorMinor;
00165     ColorBox* boxColorMajor;
00166     ColorButton *boxCanvasColor;
00167     DoubleSpinBox* boxWidthMajor;
00168     QComboBox* boxTypeMinor;
00169     DoubleSpinBox* boxWidthMinor;
00170     QCheckBox* boxXLine;
00171     QCheckBox* boxYLine;
00172     QListWidget* axesGridList;
00173     QWidget* axesPage, *frame;
00174     QListWidget* axesTitlesList;
00175     QGroupBox *boxShowLabels;
00176     QCheckBox *boxShowAxis;
00177 
00178     QTextEdit *boxFormula, *boxTitle;
00179     QSpinBox *boxFrameWidth, *boxPrecision, *boxAngle, *boxBaseline, *boxAxesLinewidth;
00180     QPushButton* btnAxesFont;
00181     QCheckBox *boxBackbones, *boxShowFormula;
00182     ColorButton* boxAxisColor;
00183     QComboBox *boxMajorTicksType, *boxMinorTicksType, *boxFormat, *boxAxisType, *boxColName;
00184     QGroupBox *boxFramed;
00185     QLabel *label1, *label2, *label3, *boxScaleTypeLabel, *minorBoxLabel, *labelTable;
00186     QSpinBox *boxMajorTicksLength, *boxMinorTicksLength, *boxBorderWidth;
00187     QComboBox *boxUnit, *boxTableName, *boxGridXAxis, *boxGridYAxis;
00188     ColorButton *boxFrameColor, *boxAxisNumColor;
00189     QGroupBox  *labelBox;
00190     QPushButton * buttonLabelFont;
00191     TextFormatButtons *formatButtons;
00192 
00193     QStringList tickLabelsOn, tablesList;
00194     QList<int> majTicks, minTicks, axesBaseline;
00195     QFont xBottomFont, yLeftFont, xTopFont, yRightFont;
00196     bool xAxisOn, yAxisOn, topAxisOn, rightAxisOn;
00197     int xBottomLabelsRotation, xTopLabelsRotation;
00198 
00199     QGroupBox *boxAxesBreaks;
00200     DoubleSpinBox *boxBreakStart, *boxBreakEnd, *boxStepBeforeBreak, *boxStepAfterBreak;
00201     QSpinBox *boxBreakPosition, *boxBreakWidth;
00202     QComboBox *boxMinorTicksBeforeBreak, *boxMinorTicksAfterBreak;
00203     QCheckBox *boxLog10AfterBreak, *boxBreakDecoration, *boxAntialiseGrid;
00204     QComboBox *boxApplyGridFormat;
00205     Graph* d_graph;
00207     QWidget* lastPage;
00208     QDateTimeEdit *boxStartDateTime, *boxEndDateTime;
00209     QTimeEdit *boxStartTime, *boxEndTime;
00210 };
00211 
00212 #endif

Generated on Tue Jun 17 08:36:12 2008 for QtiPlot by  doxygen 1.5.5