##// END OF EJS Templates
Added grid color property for value axis...
Added grid color property for value axis Added possibility to set the color of the grid lines for value axes. Change-Id: I38b634410e7f1cb996d80f5ac1650a1be844ca01 Task-number: QTRD-3319 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>

File last commit:

r2810:2db41b8cb90b
r2810:2db41b8cb90b
Show More
mainwindow.h
170 lines | 4.8 KiB | text/x-c | CLexer
Miikka Heikkinen
Add Polar chart support...
r2483 /****************************************************************************
**
Titta Heikkala
Copyright header changes...
r2776 ** Copyright (C) 2015 The Qt Company Ltd
Miikka Heikkinen
Add Polar chart support...
r2483 ** All rights reserved.
Titta Heikkala
Copyright header changes...
r2776 ** For any questions to The Qt Company, please use contact form at http://qt.io
Miikka Heikkinen
Add Polar chart support...
r2483 **
Titta Heikkala
Updated license headers...
r2740 ** This file is part of the Qt Charts module.
Miikka Heikkinen
Add Polar chart support...
r2483 **
Titta Heikkala
Updated license headers...
r2740 ** Licensees holding valid commercial license for Qt may use this file in
** accordance with the Qt License Agreement provided with the Software
** or, alternatively, in accordance with the terms contained in a written
Titta Heikkala
Copyright header changes...
r2776 ** agreement between you and The Qt Company.
Miikka Heikkinen
Add Polar chart support...
r2483 **
** If you have questions regarding the use of this file, please use
Titta Heikkala
Updated license headers...
r2740 ** contact form at http://qt.io
Miikka Heikkinen
Add Polar chart support...
r2483 **
****************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
Titta Heikkala
Fix include syntax...
r2714 #include <QtCharts/QPolarChart>
#include <QtWidgets/QMainWindow>
#include <QtGui/QFont>
#include <QtCharts/QChart>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QAreaSeries>
Miikka Heikkinen
Add Polar chart support...
r2483
Christian Kandeler
Fix compilation with namespaced Qt....
r2774 QT_BEGIN_NAMESPACE
class QBrush;
class QPen;
Miikka Heikkinen
Add Polar chart support...
r2483 namespace Ui {
class MainWindow;
}
Christian Kandeler
Fix compilation with namespaced Qt....
r2774 QT_END_NAMESPACE
Miikka Heikkinen
Add Polar chart support...
r2483
Christian Kandeler
Fix compilation with namespaced Qt....
r2774 QT_CHARTS_USE_NAMESPACE
Miikka Heikkinen
Add Polar chart support...
r2483
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void angularTicksChanged(int value);
void radialTicksChanged(int value);
Titta Heikkala
Added minor ticks to value axis...
r2795 void angularMinorTicksChanged(int value);
void radialMinorTicksChanged(int value);
Miikka Heikkinen
Add Polar chart support...
r2483 void anglesChanged(int value);
void angularMinChanged(double value);
void angularMaxChanged(double value);
void radialMinChanged(double value);
void radialMaxChanged(double value);
void angularShadesIndexChanged(int index);
void radialShadesIndexChanged(int index);
void labelFormatEdited(const QString &text);
void labelFontChanged(const QFont &font);
void labelFontSizeChanged(int value);
void animationIndexChanged(int index);
void labelsIndexChanged(int index);
void titleIndexChanged(int index);
void titleFontChanged(const QFont &font);
void titleFontSizeChanged(int value);
void gridIndexChanged(int index);
Titta Heikkala
Added minor ticks to value axis...
r2795 void minorGridIndexChanged(int index);
Titta Heikkala
Added grid color property for value axis...
r2810 void gridLineColorIndexChanged(int index);
Miikka Heikkinen
Add Polar chart support...
r2483 void arrowIndexChanged(int index);
void angularRangeChanged(qreal min, qreal max);
void radialRangeChanged(qreal min, qreal max);
void angularAxisIndexChanged(int index);
void radialAxisIndexChanged(int index);
void logBaseChanged(double value);
void niceNumbersChecked();
void dateFormatEdited(const QString &text);
void moreCategoriesChecked();
Miikka Heikkinen
Make category axis label positioning at value work for polar charts...
r2801 void categoryLabelLocationChecked();
Miikka Heikkinen
Add Polar chart support...
r2483 void series1CheckBoxChecked();
void series2CheckBoxChecked();
void series3CheckBoxChecked();
void series4CheckBoxChecked();
void series5CheckBoxChecked();
void series6CheckBoxChecked();
void series7CheckBoxChecked();
void themeIndexChanged(int index);
void seriesHovered(QPointF point, bool state);
void seriesClicked(const QPointF &point);
Miikka Heikkinen
Add API to specify plot area background....
r2498 void backgroundIndexChanged(int index);
void plotAreaIndexChanged(int index);
Miikka Heikkinen
Add Polar chart support...
r2483
private:
enum AxisMode {
AxisModeNone,
AxisModeValue,
AxisModeLogValue,
AxisModeDateTime,
AxisModeCategory
};
void initXYValueChart();
void setAngularAxis(AxisMode mode);
void setRadialAxis(AxisMode mode);
void applyRanges();
void applyCategories();
Ui::MainWindow *ui;
int m_angularTickCount;
int m_radialTickCount;
Titta Heikkala
Added minor ticks to value axis...
r2795 int m_angularMinorTickCount;
int m_radialMinorTickCount;
Miikka Heikkinen
Add Polar chart support...
r2483 qreal m_labelsAngle;
qreal m_angularMin;
qreal m_angularMax;
qreal m_radialMin;
qreal m_radialMax;
bool m_angularShadesVisible;
bool m_radialShadesVisible;
bool m_labelsVisible;
bool m_titleVisible;
bool m_gridVisible;
bool m_arrowVisible;
Titta Heikkala
Added minor ticks to value axis...
r2795 bool m_minorGridVisible;
bool m_minorArrowVisible;
Miikka Heikkinen
Add Polar chart support...
r2483 QBrush *m_angularShadesBrush;
QBrush *m_radialShadesBrush;
QBrush *m_labelBrush;
QBrush *m_titleBrush;
Miikka Heikkinen
Add API to specify plot area background....
r2498 QBrush *m_backgroundBrush;
QBrush *m_plotAreaBackgroundBrush;
Miikka Heikkinen
Add Polar chart support...
r2483 QPen *m_angularShadesPen;
QPen *m_radialShadesPen;
QPen *m_gridPen;
QPen *m_arrowPen;
Titta Heikkala
Added minor ticks to value axis...
r2795 QPen *m_minorGridPen;
Miikka Heikkinen
Add API to specify plot area background....
r2498 QPen *m_backgroundPen;
QPen *m_plotAreaBackgroundPen;
Miikka Heikkinen
Add Polar chart support...
r2483 QString m_labelFormat;
QFont m_currentLabelFont;
QFont m_currentTitleFont;
QChart::AnimationOptions m_animationOptions;
QString m_angularTitle;
QString m_radialTitle;
qreal m_base;
QString m_dateFormat;
QPolarChart *m_chart;
QAbstractAxis *m_angularAxis;
QAbstractAxis *m_radialAxis;
AxisMode m_angularAxisMode;
AxisMode m_radialAxisMode;
bool m_moreCategories;
QScatterSeries *m_series1;
QLineSeries *m_series2;
QLineSeries *m_series3;
QLineSeries *m_series4;
QAreaSeries *m_series5;
QSplineSeries *m_series6;
QScatterSeries *m_series7;
};
#endif // MAINWINDOW_H