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 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