diff --git a/examples/boxplotchart/main.cpp b/examples/boxplotchart/main.cpp index 2a179e5..29959da 100644 --- a/examples/boxplotchart/main.cpp +++ b/examples/boxplotchart/main.cpp @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) //![2] QBoxPlotSeries *series = new QBoxPlotSeries(); - series->setName("Cargotec"); + series->setName("Acme Ltd"); //![2] QFile stockData(":stock"); @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) //![3] QChart *chart = new QChart(); chart->addSeries(series); - chart->setTitle("Cargotec's share deviation in 2012"); + chart->setTitle("Acme's share deviation in 2012"); chart->setAnimationOptions(QChart::SeriesAnimations); //![3] diff --git a/plugins/declarative/declarativeboxplotseries.h b/plugins/declarative/declarativeboxplotseries.h index 21d52a8..bb425e4 100644 --- a/plugins/declarative/declarativeboxplotseries.h +++ b/plugins/declarative/declarativeboxplotseries.h @@ -86,7 +86,7 @@ public: Q_INVOKABLE DeclarativeBoxSet *append(const QString label, QVariantList values) { return insert(count(), label, values); } Q_INVOKABLE void append(DeclarativeBoxSet *box) { QBoxPlotSeries::append(box); } Q_INVOKABLE DeclarativeBoxSet *insert(int index, const QString label, QVariantList values); - Q_INVOKABLE bool remove(QBoxSet *boxset) { return QBoxPlotSeries::remove(boxset); } + Q_INVOKABLE bool remove(DeclarativeBoxSet *box) { return QBoxPlotSeries::remove(qobject_cast(box)); } Q_INVOKABLE void clear() { return QBoxPlotSeries::clear(); } public: // from QDeclarativeParserStatus diff --git a/src/boxplotchart/qboxplotseries.cpp b/src/boxplotchart/qboxplotseries.cpp index ef8280d..9f11716 100644 --- a/src/boxplotchart/qboxplotseries.cpp +++ b/src/boxplotchart/qboxplotseries.cpp @@ -74,17 +74,17 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE BoxPlotSeries { id: plotSeries name: "Income" - BoxSet { label: "Jan"; values: [3, 4, 4.4, 6, 7] } - BoxSet { label: "Feb"; values: [5, 6, 7.5, 8, 12] } - BoxSet { label: "Mar"; values: [2, 5, 5.7, 8, 9] } - BoxSet { label: "Apr"; values: [5, 6, 6.8, 7, 8] } + BoxSet { label: "Jan"; values: [3, 4, 5.1, 6.2, 8.5] } + BoxSet { label: "Feb"; values: [5, 6, 7.5, 8.6, 11.8] } + BoxSet { label: "Mar"; values: [3.2, 5, 5.7, 8, 9.2] } + BoxSet { label: "Apr"; values: [3.8, 5, 6.4, 7, 8] } BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] } } } \endcode \beginfloatleft - \image TODO_CREATE_IMAGE.png + \image examples_qmlboxplot.png \endfloat \clearfloat */ @@ -146,12 +146,14 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \qmlsignal BoxPlotSeries::onCountChanged(); Signal is emitted when there is change in count of box-and-whiskers items in the series. */ -/* - void boxsetsAdded(QList sets); -*/ -/* - void boxsetsRemoved(QList sets); -*/ +/*! + \qmlsignal BoxPlotSeries::onBoxsetsAdded() + Signal is emitted when new box-and-whiskers sets are added to the series. + */ +/*! + \qmlsignal BoxPlotSeries::boxsetsRemoved() + Signal is emitted when new box-and-whiskers sets are removed from the series. + */ /*! Constructs empty QBoxPlotSeries.