##// END OF EJS Templates
Fix sctter series wrong points offset issue
Fix sctter series wrong points offset issue

File last commit:

r470:5c708e3e7c7c
r536:79d5184b167f
Show More
qlineseries.cpp
98 lines | 2.0 KiB | text/x-c | CppLexer
Michal Klocek
Rename QLineChartSeries to QLineSeries
r349 #include "qlineseries.h"
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Michal Klocek
Refactor documentation...
r331 /*!
Michal Klocek
fix docs of qlineseries
r350 \class QLineSeries
\brief The QLineSeries class is used for making line charts.
Michal Klocek
Refactor documentation...
r331
\mainclass
A line chart is used to show information as a series of data points
connected by straight lines.
\image linechart.png
Michal Klocek
Limit code presented on qlineseries docs
r369 Creating basic line chart is simple:
\code
QLineSeries* series = new QLineSeries();
series->add(0, 6);
series->add(2, 4);
...
chartView->addSeries(series);
\endcode
Michal Klocek
Refactor documentation...
r331 */
/*!
Michal Klocek
Rename QChartSeries to QSeries
r360 \fn virtual QSeriesType QLineSeries::type() const
Michal Klocek
Refactor documentation...
r331 \brief Returns type of series.
Michal Klocek
Rename QChartSeries to QSeries
r360 \sa QSeries, QSeriesType
Michal Klocek
Refactor documentation...
r331 */
/*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 \fn bool QLineSeries::pointsVisible() const
Michal Klocek
Refactor documentation...
r331 \brief Returns if the points are drawn for this series.
\sa setPointsVisible()
*/
Michal Klocek
Adds replace,remove,add signals to qchartline
r374 /*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 \fn QPen QLineSeries::linePen() const
\brief Returns the pen used to draw line connecting points.
\sa setPen()
Michal Klocek
Adds replace,remove,add signals to qchartline
r374 */
/*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 Constructs empty series object which is a child of \a parent.
When series object is added to QChartView or QChart instance ownerships is transfered.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 QLineSeries::QLineSeries(QObject* parent):QXYSeries(parent),
m_pointsVisible(false)
{
Michal Klocek
Refactor documentation...
r331
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 }
Michal Klocek
Adds updated handling for line series
r392 /*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 Destroys the object. Series added to QChartView or QChart instances are owned by those,
and are deleted when mentioned object are destroyed.
Michal Klocek
Adds updated handling for line series
r392 */
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 QLineSeries::~QLineSeries()
{
}
Michal Klocek
Adds updated handling for line series
r392
Michal Klocek
Refactor documentation...
r331 /*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 Sets \a pen used for drawing line connecting points.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 void QLineSeries::setLinePen(const QPen& pen)
Michal Klocek
Refactor current draft to fit int current design specs...
r21 {
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 if(pen!=m_pen){
m_pen=pen;
emit updated();
}
Michal Klocek
Refactor current draft to fit int current design specs...
r21 }
Michal Klocek
Refactor scatter chart to fit the other classes...
r470
Michal Klocek
Refactor documentation...
r331 /*!
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 Sets if data points are \a visible and should be drawn on line.
Michal Klocek
Refactor documentation...
r331 */
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 void QLineSeries::setPointsVisible(bool visible)
Michal Klocek
Refactor current draft to fit int current design specs...
r21 {
Michal Klocek
Refactor scatter chart to fit the other classes...
r470 if(m_pointsVisible!=visible){
m_pointsVisible=visible;
emit updated();
}
Michal Klocek
Refactor current draft to fit int current design specs...
r21 }
Michal Klocek
Refactor scatter chart to fit the other classes...
r470
Michal Klocek
Rename QLineChartSeries to QLineSeries
r349 QDebug operator<< (QDebug debug, const QLineSeries series)
Michal Klocek
Refactor current draft to fit int current design specs...
r21 {
Michal Klocek
Refactor line spline to common xyline...
r465 Q_ASSERT(series.m_x.size() == series.m_y.size());
Michal Klocek
Refactor current draft to fit int current design specs...
r21
int size = series.m_x.size();
for (int i=0;i<size;i++) {
debug.nospace() << "(" << series.m_x.at(i) << ','<< series.m_y.at(i) << ") ";
}
return debug.space();
}
Michal Klocek
Rename QLineChartSeries to QLineSeries
r349 #include "moc_qlineseries.cpp"
Michal Klocek
Refactors qchart , adds line animation...
r131
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_END_NAMESPACE