##// END OF EJS Templates
README release update...
README release update README file updated for Charts 1.3.1 release. Change-Id: Ib7e4b67421db9547718844fc4ed7414120b195a7 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>

File last commit:

r2639:2ce3423968b5
r2640:68c16a95421d
Show More
qsplineseries.cpp
159 lines | 4.4 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
Miikka Heikkinen
Fixed the copyright year 2012 -> 2013
r2432 ** Copyright (C) 2013 Digia Plc
Jani Honkonen
Add license headers
r794 ** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
Miikka Heikkinen
Qt Commercial -> Qt Enterprise...
r2574 ** This file is part of the Qt Enterprise Charts Add-on.
Jani Honkonen
Add license headers
r794 **
** $QT_BEGIN_LICENSE$
Miikka Heikkinen
Qt Commercial -> Qt Enterprise...
r2574 ** Licensees holding valid Qt Enterprise licenses may use this file in
** accordance with the Qt Enterprise License Agreement provided with the
Jani Honkonen
Add license headers
r794 ** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
Marek Rosa
Spline initial
r295 #include "qsplineseries.h"
Michal Klocek
Adds big fat pimpl to series classes...
r938 #include "qsplineseries_p.h"
Michal Klocek
Refactor to use qseries private for implmentation interface...
r943 #include "splinechartitem_p.h"
#include "chartdataset_p.h"
#include "charttheme_p.h"
Michal Klocek
Refactor animator...
r1735 #include "splineanimation_p.h"
Miikka Heikkinen
Fix explicitly set default pen/brush/font getting overridden by theme...
r2516 #include "qchart_p.h"
Marek Rosa
Spline initial
r295
Marek Rosa
QSplineSeries documentation added
r433 /*!
\class QSplineSeries
Titta Heikkala
Fix Charts documentation...
r2639 \inmodule Qt Charts
Marek Rosa
QSplineSeries documentation added
r433 \brief Series type used to store data needed to draw a spline.
QSplineSeries stores the data points along with the segment control points needed by QPainterPath to draw spline
Control points are automatically calculated when data changes. The algorithm computes the points so that the normal spline can be drawn.
Tero Ahola
Documentation fixes....
r995
\image examples_splinechart.png
Creating basic spline chart is simple:
\code
QSplineSeries* series = new QSplineSeries();
series->append(0, 6);
series->append(2, 4);
...
chart->addSeries(series);
\endcode
Marek Rosa
QSplineSeries documentation added
r433 */
Titta Heikkala
Fix Charts documentation...
r2639 #ifdef QDOC_QT5
/*!
\qmltype SplineSeries
\instantiates QSplineSeries
\inqmlmodule QtCommercial.Chart
Marek Rosa
QSplineSeries documentation added
r433
Titta Heikkala
Fix Charts documentation...
r2639 \include /doc/src/splineseries.qdocinc
*/
#else
Marek Rosa
QSplineSeries documentation added
r433 /*!
Tero Ahola
Documenting xy-series
r1491 \qmlclass SplineSeries QSplineSeries
Titta Heikkala
Fix Charts documentation...
r2639 \include ../doc/src/splineseries.qdocinc
Tero Ahola
Documenting xy-series
r1491 */
Titta Heikkala
Fix Charts documentation...
r2639 #endif
Tero Ahola
Documenting xy-series
r1491
/*!
\fn QSeriesType QSplineSeries::type() const
Returns the type of the series
*/
Marek Rosa
QSplineSeries documentation added
r433
Tero Ahola
Adding missing QML series API line/border properties
r1904 /*!
\qmlproperty real SplineSeries::width
The width of the line. By default the width is 2.0.
*/
/*!
\qmlproperty Qt::PenStyle SplineSeries::style
Controls the style of the line. Set to one of Qt.NoPen, Qt.SolidLine, Qt.DashLine, Qt.DotLine,
Qt.DashDotLine or Qt.DashDotDotLine. Using Qt.CustomDashLine is not supported in the QML API.
By default the style is Qt.SolidLine.
*/
/*!
\qmlproperty Qt::PenCapStyle SplineSeries::capStyle
Controls the cap style of the line. Set to one of Qt.FlatCap, Qt.SquareCap or Qt.RoundCap. By
default the cap style is Qt.SquareCap.
*/
Marek Rosa
Spline working somewhat
r401 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Marek Rosa
QSplineSeries documentation added
r433 /*!
Constructs empty series object which is a child of \a parent.
Miikka Heikkinen
Documentation updates...
r2494 When series object is added to a QChart instance then the ownerships is transferred.
Marek Rosa
QSplineSeries documentation added
r433 */
Jani Honkonen
astyle and manual coding style fixes for src-folder
r2097 QSplineSeries::QSplineSeries(QObject *parent)
: QLineSeries(*new QSplineSeriesPrivate(this), parent)
Marek Rosa
Spline initial
r295 {
}
Marek Rosa
Spline some more
r305
Jani Honkonen
random doc updates
r1351 /*!
Destroys the object.
*/
Michal Klocek
Bugfixes for spline vector allocation issues
r1082 QSplineSeries::~QSplineSeries()
{
Q_D(QSplineSeries);
Michal Klocek
Refactors internals...
r2273 if (d->m_chart)
d->m_chart->removeSeries(this);
Michal Klocek
Bugfixes for spline vector allocation issues
r1082 }
Michal Klocek
Fixes to API , QSeriesType -> SeriesType , add missing getters
r1107 QAbstractSeries::SeriesType QSplineSeries::type() const
Michal Klocek
Adds big fat pimpl to series classes...
r938 {
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 return QAbstractSeries::SeriesTypeSpline;
Michal Klocek
Adds big fat pimpl to series classes...
r938 }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Jani Honkonen
more coding style fixes for src-folder...
r2104 QSplineSeriesPrivate::QSplineSeriesPrivate(QSplineSeries *q)
Jani Honkonen
astyle and manual coding style fixes for src-folder
r2097 : QLineSeriesPrivate(q)
Michal Klocek
Adds big fat pimpl to series classes...
r938 {
Marek Rosa
Added license text to piemodelmapper classes
r1309 }
Michal Klocek
Adds big fat pimpl to series classes...
r938
Michal Klocek
Refactors internals...
r2273 void QSplineSeriesPrivate::initializeGraphics(QGraphicsItem* parent)
Michal Klocek
Refactor to use qseries private for implmentation interface...
r943 {
Q_Q(QSplineSeries);
Michal Klocek
Refactors internals...
r2273 SplineChartItem *spline = new SplineChartItem(q,parent);
m_item.reset(spline);
QAbstractSeriesPrivate::initializeGraphics(parent);
}
void QSplineSeriesPrivate::initializeTheme(int index, ChartTheme* theme, bool forced)
{
Q_Q(QSplineSeries);
const QList<QColor> colors = theme->seriesColors();
Miikka Heikkinen
Fix explicitly set default pen/brush/font getting overridden by theme...
r2516 if (forced || QChartPrivate::defaultPen() == m_pen) {
QPen pen;
Michal Klocek
Refactors internals...
r2273 pen.setColor(colors.at(index % colors.size()));
pen.setWidthF(2);
q->setPen(pen);
}
}
void QSplineSeriesPrivate::initializeAnimations(QtCommercialChart::QChart::AnimationOptions options)
{
SplineChartItem *item = static_cast<SplineChartItem *>(m_item.data());
Q_ASSERT(item);
Miikka Heikkinen
Fix resetting animation options mid-animation....
r2555 if (item->animation())
item->animation()->stopAndDestroyLater();
if (options.testFlag(QChart::SeriesAnimations))
Michal Klocek
Refactors internals...
r2273 item->setAnimation(new SplineAnimation(item));
Miikka Heikkinen
Fix resetting animation options mid-animation....
r2555 else
Michal Klocek
Refactors internals...
r2273 item->setAnimation(0);
QAbstractSeriesPrivate::initializeAnimations(options);
Michal Klocek
Refactor to use qseries private for implmentation interface...
r943 }
Marek Rosa
Spline working somewhat
r401 #include "moc_qsplineseries.cpp"
Michal Klocek
Adds big fat pimpl to series classes...
r938 #include "moc_qsplineseries_p.cpp"
Marek Rosa
Spline working somewhat
r401
QTCOMMERCIALCHART_END_NAMESPACE