From 803e5730906151a687f3ff20822cbbd7e5e2e6cb 2012-04-05 08:45:33 From: Marek Rosa Date: 2012-04-05 08:45:33 Subject: [PATCH] Docs updated --- diff --git a/doc/src/example-splinechart.qdoc b/doc/src/example-splinechart.qdoc index 45180cf..336d2d8 100644 --- a/doc/src/example-splinechart.qdoc +++ b/doc/src/example-splinechart.qdoc @@ -11,19 +11,19 @@ \snippet ../examples/splinechart/main.cpp 1 -Now lets add some data points to the series. +Now let's add some data points to the series. - \snippet ../examples/splinechart/main.cpp 3 + \snippet ../examples/splinechart/main.cpp 2 The data series has been populated. To display it on a chart we create QChart object and add the data series to it. We also set the title and the values range on y axis, so that our chart is better visible. - \snippet ../examples/splinechart/main.cpp 4 + \snippet ../examples/splinechart/main.cpp 3 Then we create a QChartView object with QChart as a parameter. This way we don't need to create QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer. - \snippet ../examples/splinechart/main.cpp 5 + \snippet ../examples/splinechart/main.cpp 4 In the end we set the QChartView as the windows's central widget. - \snippet ../examples/splinechart/main.cpp 6 + \snippet ../examples/splinechart/main.cpp 5 */ diff --git a/examples/splinechart/main.cpp b/examples/splinechart/main.cpp index 01c914f..496b3c3 100644 --- a/examples/splinechart/main.cpp +++ b/examples/splinechart/main.cpp @@ -34,38 +34,32 @@ int main(int argc, char *argv[]) //![1] //![2] -// QPen red(Qt::red); -// red.setWidth(3); -// series->setPen(red); - //![2] - - //![3] series->append(0, 6); series->append(2, 4); series->append(3, 8); series->append(7, 4); series->append(10, 5); *series << QPointF(11, 1) << QPointF(13, 3) << QPointF(17, 6) << QPointF(18, 3) << QPointF(20, 2); - //![3] + //![2] - //![4] + //![3] QChart* chart = new QChart(); chart->addSeries(series); chart->setTitle("Simple spline chart example"); chart->axisY()->setRange(0, 10); - //![4] + //![3] - //![5] + //![4] QChartView* chartView = new QChartView(chart); chartView->setRenderHint(QPainter::Antialiasing); - //![5] + //![4] - //![6] + //![5] QMainWindow window; window.setCentralWidget(chartView); window.resize(400, 300); window.show(); - //![6] + //![5] return a.exec(); } diff --git a/src/barchart/qbarset.cpp b/src/barchart/qbarset.cpp index 1da4be8..74ac9ff 100644 --- a/src/barchart/qbarset.cpp +++ b/src/barchart/qbarset.cpp @@ -56,11 +56,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - \fn void QBarSet::setLabelssVisible(bool visible = true) - \brief Sets visibility of bar labels. If \a visible is true, labels are drawn on top of barsets. -*/ - -/*! \fn void QBarSet::showToolTip(QPoint pos, QString tip) \brief \internal \a pos \a tip */ @@ -244,8 +239,9 @@ QFont QBarSet::labelFont() const } /*! - Sets the visibility of barset values to \a visible + Sets visibility of bar labels. If \a visible is true, labels are drawn on top of barsets. */ + void QBarSet::setLabelsVisible(bool visible) { m_labelsVisible = visible; diff --git a/src/qseries.cpp b/src/qseries.cpp index 4ae6792..f55b8c6 100644 --- a/src/qseries.cpp +++ b/src/qseries.cpp @@ -68,6 +68,11 @@ */ /*! + \property QString QSeries::name + \brief name of the series property +*/ + +/*! \fn void QSeries::setName(QString name) \brief Sets a \a name for the series. @@ -78,8 +83,9 @@ */ /*! - \fn QString QSeries::name() + \fn QString QSeries::name() const \brief Returns the name of the series. + \sa setName() */ QTCOMMERCIALCHART_USE_NAMESPACE diff --git a/src/splinechart/qsplineseries.cpp b/src/splinechart/qsplineseries.cpp index e080413..e59deae 100644 --- a/src/splinechart/qsplineseries.cpp +++ b/src/splinechart/qsplineseries.cpp @@ -155,7 +155,7 @@ void QSplineSeries::updateControlPoints() } } -/*! +/*//! \fn bool QSplineSeries::setModel(QAbstractItemModel *model) Sets the \a model to be used as a data source \sa setModelMapping(), setModelMappingRange() @@ -167,8 +167,8 @@ void QSplineSeries::updateControlPoints() // return true; //} -/*! - \fn bool QXYSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) +/*//! + \fn bool QSplineSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used as a data source for y coordinate. The \a orientation paramater specifies whether the data is in columns or in rows. diff --git a/src/xychart/qxyseries.cpp b/src/xychart/qxyseries.cpp index b2fe8e2..d547cac 100644 --- a/src/xychart/qxyseries.cpp +++ b/src/xychart/qxyseries.cpp @@ -478,11 +478,6 @@ void QXYSeries::modelDataRemoved(QModelIndex parent, int start, int end) } /*! - \fn QAbstractItemModel* QXYSeries::model() - Returns the model from which the series takes its data. - */ - -/*! \fn bool QXYSeries::setModel(QAbstractItemModel *model) Sets the \a model to be used as a data source \sa setModelMapping(), setModelMappingRange()