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

Generated on Thu Feb 7 13:59:26 2008 for QtiPlot by  doxygen 1.5.4