##// END OF EJS Templates
Fixed AreaSeries initialization for PolarChart...
Fixed AreaSeries initialization for PolarChart The correct domain has to be set for the upper and the lower series of the AreaSeries with polar chart. Updating the geometry of LineChartItem will have problems if the correct domain is not set. Change-Id: Id9664ae175d2ee272c4705fbdbf17d9a719cf428 Task-number: QTRD-3507 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>

File last commit:

r2781:7c9f8e5a27d8
r2791:53fbaba3122c
Show More
qabstractaxis.h
191 lines | 6.8 KiB | text/x-c | CLexer
Michal Klocek
Adds new API classes...
r1540 /****************************************************************************
**
Titta Heikkala
Copyright header changes...
r2776 ** Copyright (C) 2015 The Qt Company Ltd
Michal Klocek
Adds new API classes...
r1540 ** All rights reserved.
Titta Heikkala
Copyright header changes...
r2776 ** For any questions to The Qt Company, please use contact form at http://qt.io
Michal Klocek
Adds new API classes...
r1540 **
Titta Heikkala
Updated license headers...
r2740 ** This file is part of the Qt Charts module.
Michal Klocek
Adds new API classes...
r1540 **
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.
Michal Klocek
Adds new API classes...
r1540 **
** If you have questions regarding the use of this file, please use
Titta Heikkala
Updated license headers...
r2740 ** contact form at http://qt.io
Michal Klocek
Adds new API classes...
r1540 **
****************************************************************************/
#ifndef QABSTRACTAXIS_H
#define QABSTRACTAXIS_H
Titta Heikkala
Fix include syntax...
r2714 #include <QtCharts/QChartGlobal>
#include <QtGui/QPen>
#include <QtGui/QFont>
#include <QtCore/QVariant>
Michal Klocek
Adds new API classes...
r1540
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_BEGIN_NAMESPACE
Michal Klocek
Adds new API classes...
r1540
class QAbstractAxisPrivate;
Titta Heikkala
Qt Charts project file structure change...
r2712 class QT_CHARTS_EXPORT QAbstractAxis : public QObject
Michal Klocek
Adds new API classes...
r1540 {
Marek Rosa
Multiaxis support...
r2093 Q_OBJECT
Michal Klocek
Refactors internals...
r2273 //visibility
Marek Rosa
Multiaxis support...
r2093 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
Michal Klocek
Refactors internals...
r2273 //arrow
Marek Rosa
QAbstractAxis: fixed tests after renaming
r1845 Q_PROPERTY(bool lineVisible READ isLineVisible WRITE setLineVisible NOTIFY lineVisibleChanged)
Michal Klocek
Refactors internals...
r2273 Q_PROPERTY(QPen linePen READ linePen WRITE setLinePen NOTIFY linePenChanged)
Marek Rosa
QAbstractAxis: renamed Arrow and Axis to line in methods names
r1844 Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged)
Michal Klocek
Refactors internals...
r2273 //labels
Michal Klocek
Adds new API classes...
r1540 Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged)
Tero Ahola
Added documentation for new properties of QAbstractAxis
r2361 Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged)
Michal Klocek
Refactors internals...
r2273 Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged)
Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged)
Michal Klocek
Adds new API classes...
r1540 Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged)
Michal Klocek
Refactors internals...
r2273 //grid
Jani Honkonen
BC fix: change gridLineVisibleChanged() back to gridVisibleChanged()
r2282 Q_PROPERTY(bool gridVisible READ isGridLineVisible WRITE setGridLineVisible NOTIFY gridVisibleChanged)
Tero Ahola
Added documentation for new properties of QAbstractAxis
r2361 Q_PROPERTY(QPen gridLinePen READ gridLinePen WRITE setGridLinePen NOTIFY gridLinePenChanged)
Michal Klocek
Refactors internals...
r2273 //shades
Michal Klocek
Adds new API classes...
r1540 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
Michal Klocek
Refactors internals...
r2273 Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged)
Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged)
//title
Q_PROPERTY(QString titleText READ titleText WRITE setTitleText NOTIFY titleTextChanged)
Q_PROPERTY(QBrush titleBrush READ titleBrush WRITE setTitleBrush NOTIFY titleBrushChanged)
Michal Klocek
Bugfix: axis visibily issues...
r2297 Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibleChanged)
Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont NOTIFY titleFontChanged)
Michal Klocek
Aligment and oreintatio is read only
r2276 //orientation
Jani Honkonen
Spelling fix
r2348 Q_PROPERTY(Qt::Orientation orientation READ orientation)
Michal Klocek
Aligment and oreintatio is read only
r2276 //aligment
Q_PROPERTY(Qt::Alignment alignment READ alignment)
Titta Heikkala
Add possibility to set reverse values to axes...
r2781 Q_PROPERTY(bool reverse READ isReverse WRITE setReverse NOTIFY reverseChanged)
Michal Klocek
Adds new API classes...
r1540
public:
enum AxisType {
Michal Klocek
Adds createDefaultAxes logic
r1588 AxisTypeNoAxis = 0x0,
Marek Rosa
updated AxisType names
r1818 AxisTypeValue = 0x1,
AxisTypeBarCategory = 0x2,
Miikka Heikkinen
Fix QAbstractAxis::AxisTypes enum values....
r2719 AxisTypeCategory = 0x4,
AxisTypeDateTime = 0x8,
AxisTypeLogValue = 0x10
Michal Klocek
Adds new API classes...
r1540 };
Michal Klocek
Adds createDefaultAxes logic
r1588 Q_DECLARE_FLAGS(AxisTypes, AxisType)
Michal Klocek
Adds new API classes...
r1540 protected:
Jani Honkonen
astyle and manual coding style fixes for src-folder
r2097 explicit QAbstractAxis(QAbstractAxisPrivate &d, QObject *parent = 0);
Michal Klocek
Adds new API classes...
r1540
public:
~QAbstractAxis();
virtual AxisType type() const = 0;
Michal Klocek
Refactors internals...
r2273 //visibility handling
Michal Klocek
Adds visibity paramter to axis
r1617 bool isVisible() const;
void setVisible(bool visible = true);
Michal Klocek
Refactors internals...
r2273 void show();
void hide();
Michal Klocek
Adds visibity paramter to axis
r1617
Michal Klocek
Refactors internals...
r2273 //arrow handling
Marek Rosa
QAbstractAxis: renamed Arrow and Axis to line in methods names
r1844 bool isLineVisible() const;
void setLineVisible(bool visible = true);
void setLinePen(const QPen &pen);
QPen linePen() const;
void setLinePenColor(QColor color);
QColor linePenColor() const;
Michal Klocek
Adds new API classes...
r1540
//grid handling
bool isGridLineVisible() const;
void setGridLineVisible(bool visible = true);
void setGridLinePen(const QPen &pen);
QPen gridLinePen() const;
//labels handling
bool labelsVisible() const;
void setLabelsVisible(bool visible = true);
void setLabelsBrush(const QBrush &brush);
QBrush labelsBrush() const;
void setLabelsFont(const QFont &font);
QFont labelsFont() const;
void setLabelsAngle(int angle);
int labelsAngle() const;
void setLabelsColor(QColor color);
QColor labelsColor() const;
Michal Klocek
Refactors layout...
r1965 //title handling
Michal Klocek
Bugfix: axis visibily issues...
r2297 bool isTitleVisible() const;
Michal Klocek
Refactors layout...
r1965 void setTitleVisible(bool visible = true);
void setTitleBrush(const QBrush &brush);
QBrush titleBrush() const;
void setTitleFont(const QFont &font);
QFont titleFont() const;
Michal Klocek
Refactors internals...
r2273 void setTitleText(const QString &title);
QString titleText() const;
Michal Klocek
Refactors layout...
r1965
Michal Klocek
Adds new API classes...
r1540 //shades handling
bool shadesVisible() const;
void setShadesVisible(bool visible = true);
void setShadesPen(const QPen &pen);
QPen shadesPen() const;
void setShadesBrush(const QBrush &brush);
QBrush shadesBrush() const;
void setShadesColor(QColor color);
QColor shadesColor() const;
void setShadesBorderColor(QColor color);
QColor shadesBorderColor() const;
Miikka Heikkinen
Remove deprecated elements from APIs....
r2742 Qt::Orientation orientation() const;
Michal Klocek
Refactors layout:...
r2105 Qt::Alignment alignment() const;
Michal Klocek
Adds axis domain intialization
r1695
Michal Klocek
Refactors QAxis to QAbstractAxis...
r1541 //range handling
sauimone
QAbstractAxis: variants strike back.
r1578 void setMin(const QVariant &min);
void setMax(const QVariant &max);
void setRange(const QVariant &min, const QVariant &max);
Michal Klocek
Adds new API classes...
r1540
Titta Heikkala
Add possibility to set reverse values to axes...
r2781 //reverse handling
void setReverse(bool reverse = true);
bool isReverse() const;
Michal Klocek
Adds new API classes...
r1540 Q_SIGNALS:
void visibleChanged(bool visible);
Miikka Heikkinen
Add Polar chart support...
r2483 void linePenChanged(const QPen &pen);
Marek Rosa
QAbstractAxis: renamed Arrow and Axis to line in methods names
r1844 void lineVisibleChanged(bool visible);
Michal Klocek
Adds new API classes...
r1540 void labelsVisibleChanged(bool visible);
Miikka Heikkinen
Add Polar chart support...
r2483 void labelsBrushChanged(const QBrush &brush);
void labelsFontChanged(const QFont &pen);
Michal Klocek
Refactors internals...
r2273 void labelsAngleChanged(int angle);
Miikka Heikkinen
Add Polar chart support...
r2483 void gridLinePenChanged(const QPen &pen);
Jani Honkonen
BC fix: change gridLineVisibleChanged() back to gridVisibleChanged()
r2282 void gridVisibleChanged(bool visible);
Michal Klocek
Adds new API classes...
r1540 void colorChanged(QColor color);
void labelsColorChanged(QColor color);
Miikka Heikkinen
Add Polar chart support...
r2483 void titleTextChanged(const QString &title);
void titleBrushChanged(const QBrush &brush);
Michal Klocek
Refactors internals...
r2273 void titleVisibleChanged(bool visible);
Miikka Heikkinen
Add Polar chart support...
r2483 void titleFontChanged(const QFont &font);
Michal Klocek
Adds new API classes...
r1540 void shadesVisibleChanged(bool visible);
void shadesColorChanged(QColor color);
void shadesBorderColorChanged(QColor color);
Miikka Heikkinen
Add Polar chart support...
r2483 void shadesPenChanged(const QPen &pen);
void shadesBrushChanged(const QBrush &brush);
Titta Heikkala
Add possibility to set reverse values to axes...
r2781 void reverseChanged(bool reverse);
Michal Klocek
Adds new API classes...
r1540
protected:
Marek Rosa
Multiaxis support...
r2093 QScopedPointer<QAbstractAxisPrivate> d_ptr;
Michal Klocek
Refactors QAxis to QAbstractAxis...
r1541 friend class ChartDataSet;
Michal Klocek
Refactors core to support mulitpile axis and domains...
r1556 friend class ChartPresenter;
Michal Klocek
Refactors internals...
r2273 friend class ChartThemeManager;
Michal Klocek
Adds domains swap logic
r2284 friend class AbstractDomain;
Miikka Heikkinen
Add Polar chart support...
r2483 friend class ChartAxisElement;
friend class XYChart;
Miikka Heikkinen
Make all Q_DISABLE_COPY declarations private....
r2723
private:
Q_DISABLE_COPY(QAbstractAxis)
Michal Klocek
Adds new API classes...
r1540 };
Titta Heikkala
Qt Charts project file structure change...
r2712 QT_CHARTS_END_NAMESPACE
Jani Honkonen
Spit&polish public headers
r2046
#endif // QABSTRACTAXIS_H