##// END OF EJS Templates
tst_qchart and tst_qchartview updates
tst_qchart and tst_qchartview updates

File last commit:

r814:01b17d76c759
r914:5d82b4aac9d4
Show More
qscatterseries.cpp
118 lines | 2.8 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** 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$
**
****************************************************************************/
Tero Ahola
Integrated scatter type series...
r42 #include "qscatterseries.h"
#include "qchart.h"
Tero Ahola
Scatter series documentation; now uses snippets
r300 /*!
\class QScatterSeries
Michal Klocek
Fixes for docs , adds xyseries docs
r481 \brief The QScatterSeries class is used for making scatter charts.
Tero Ahola
Integrated scatter type series...
r42
Tero Ahola
Scatter series documentation; now uses snippets
r300 \mainclass
Michal Klocek
Fixes for docs , adds xyseries docs
r481 The scatter data is displayed as a collection of points on the chart. Each point determines the position on the horizontal axis
and the vertical axis.
Tero Ahola
Scatter series documentation; now uses snippets
r300
Michal Klocek
Fixes for docs , adds xyseries docs
r481 \image scatterchart.png
Tero Ahola
Scatter series documentation; now uses snippets
r300
Michal Klocek
Fixes for docs , adds xyseries docs
r481 Creating basic scatter chart is simple:
\code
QScatterSeries* series = new QScatterSeries();
Jani Honkonen
rename functions add() -> append()
r796 series->append(0, 6);
series->append(2, 4);
Michal Klocek
Fixes for docs , adds xyseries docs
r481 ...
chartView->addSeries(series);
\endcode
Tero Ahola
Scatter series documentation; now uses snippets
r300 */
Tero Ahola
Integrated scatter type series...
r42
Tero Ahola
Documenting QScatterSeries
r261 /*!
\enum QScatterSeries::MarkerShape
This enum describes the shape used when rendering marker items.
\value MarkerShapeCircle
Michal Klocek
Adds missing scatter intercation implementation...
r541 \value MarkerShapeRectangle
Tero Ahola
Documenting QScatterSeries
r261 */
Tero Ahola
QDoc to use style sheets...
r260 /*!
Tero Ahola
Scatter series documentation; now uses snippets
r300 \fn QChartSeriesType QScatterSeries::type() const
\brief Returns QChartSeries::SeriesTypeScatter.
Michal Klocek
Fixes for docs , adds xyseries docs
r481 \sa QSeries, QSeriesType
Tero Ahola
Scatter series documentation; now uses snippets
r300 */
Tero Ahola
QDoc to use style sheets...
r260
Tero Ahola
Scatter series documentation; now uses snippets
r300 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Documenting QScatterSeries
r261 /*!
Constructs a series object which is a child of \a parent.
*/
Tero Ahola
Integrated scatter again. Missing functionality....
r158 QScatterSeries::QScatterSeries(QObject *parent) :
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 QXYSeries(parent),
Michal Klocek
Adds missing scatter intercation implementation...
r541 m_shape(QScatterSeries::MarkerShapeCircle),
Tero Ahola
Default marker size to 15 for scatter
r702 m_size(15.0)
Tero Ahola
Integrated scatter type series...
r42 {
}
Tero Ahola
QDoc to use style sheets...
r260 /*!
Tero Ahola
Documenting QScatterSeries
r261 Destroys the object. Note that adding series to QChart transfers the ownership to the chart.
Tero Ahola
QDoc to use style sheets...
r260 */
Tero Ahola
Integrated scatter again. Missing functionality....
r158 QScatterSeries::~QScatterSeries()
Tero Ahola
Integrated scatter type series...
r42 {
Tero Ahola
Resizing of QGraphicItems now possible by resize signal from QChart
r48 }
Tero Ahola
Documenting QScatterSeries
r261 /*!
Tero Ahola
Scatter API review: changed signal now private etc.
r459 Returns the shape used for drawing markers.
Tero Ahola
Documenting QScatterSeries
r261 */
Tero Ahola
Scatter API review: changed signal now private etc.
r459 QScatterSeries::MarkerShape QScatterSeries::shape() const
Tero Ahola
Scatter series marker visuals
r195 {
Michal Klocek
minor. cleanuup in scatter API
r573 return m_shape;
Tero Ahola
Scatter series marker visuals
r195 }
Tero Ahola
Documenting QScatterSeries
r261 /*!
Tero Ahola
Scatter series documentation; now uses snippets
r300 Overrides the default shape of the marker items with a user defined \a shape. The default shape
is defined by chart theme setting.
Tero Ahola
Documenting QScatterSeries
r261 */
Tero Ahola
Fixing review findings in QScatterSeries
r358 void QScatterSeries::setShape(MarkerShape shape)
Tero Ahola
Scatter series marker visuals
r195 {
sauimone
minor code review issues. indent, spaces, brackets etc.
r743 if (m_shape != shape) {
m_shape = shape;
Michal Klocek
minor. cleanuup in scatter API
r573 emit QXYSeries::updated();
}
Tero Ahola
Scatter series marker visuals
r195 }
Tero Ahola
Added size customization to QScatterSeries
r397 /*!
Returns the size of the marker items.
*/
Tero Ahola
Scatter API review: changed signal now private etc.
r459 qreal QScatterSeries::size() const
Tero Ahola
Added size customization to QScatterSeries
r397 {
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 return m_size;
Tero Ahola
Added size customization to QScatterSeries
r397 }
/*!
Tero Ahola
Fixed bug in the documentation of scatter
r814 Set the \a size of the marker items. The default size is 15.
Tero Ahola
Added size customization to QScatterSeries
r397 */
void QScatterSeries::setSize(qreal size)
{
Jani Honkonen
Use qFuzzyIsNull to compare (in)equality of real values
r768 if (!qFuzzyIsNull(m_size - size)) {
sauimone
minor code review issues. indent, spaces, brackets etc.
r743 m_size = size;
Michal Klocek
minor. cleanuup in scatter API
r573 emit updated();
}
Tero Ahola
Added size customization to QScatterSeries
r397 }
Tero Ahola
Integrated scatter type series...
r42 QTCOMMERCIALCHART_END_NAMESPACE