##// END OF EJS Templates
Polishing on examples...
Mika Salmela -
r2536:c9bd72facaf8
parent child
Show More
@@ -37,7 +37,7 int main(int argc, char *argv[])
37 37
38 38 //![2]
39 39 QBoxPlotSeries *series = new QBoxPlotSeries();
40 series->setName("Cargotec");
40 series->setName("Acme Ltd");
41 41 //![2]
42 42
43 43 QFile stockData(":stock");
@@ -55,7 +55,7 int main(int argc, char *argv[])
55 55 //![3]
56 56 QChart *chart = new QChart();
57 57 chart->addSeries(series);
58 chart->setTitle("Cargotec's share deviation in 2012");
58 chart->setTitle("Acme's share deviation in 2012");
59 59 chart->setAnimationOptions(QChart::SeriesAnimations);
60 60 //![3]
61 61
@@ -86,7 +86,7 public:
86 86 Q_INVOKABLE DeclarativeBoxSet *append(const QString label, QVariantList values) { return insert(count(), label, values); }
87 87 Q_INVOKABLE void append(DeclarativeBoxSet *box) { QBoxPlotSeries::append(box); }
88 88 Q_INVOKABLE DeclarativeBoxSet *insert(int index, const QString label, QVariantList values);
89 Q_INVOKABLE bool remove(QBoxSet *boxset) { return QBoxPlotSeries::remove(boxset); }
89 Q_INVOKABLE bool remove(DeclarativeBoxSet *box) { return QBoxPlotSeries::remove(qobject_cast<QBoxSet *>(box)); }
90 90 Q_INVOKABLE void clear() { return QBoxPlotSeries::clear(); }
91 91
92 92 public: // from QDeclarativeParserStatus
@@ -74,17 +74,17 QTCOMMERCIALCHART_BEGIN_NAMESPACE
74 74 BoxPlotSeries {
75 75 id: plotSeries
76 76 name: "Income"
77 BoxSet { label: "Jan"; values: [3, 4, 4.4, 6, 7] }
78 BoxSet { label: "Feb"; values: [5, 6, 7.5, 8, 12] }
79 BoxSet { label: "Mar"; values: [2, 5, 5.7, 8, 9] }
80 BoxSet { label: "Apr"; values: [5, 6, 6.8, 7, 8] }
77 BoxSet { label: "Jan"; values: [3, 4, 5.1, 6.2, 8.5] }
78 BoxSet { label: "Feb"; values: [5, 6, 7.5, 8.6, 11.8] }
79 BoxSet { label: "Mar"; values: [3.2, 5, 5.7, 8, 9.2] }
80 BoxSet { label: "Apr"; values: [3.8, 5, 6.4, 7, 8] }
81 81 BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] }
82 82 }
83 83 }
84 84 \endcode
85 85
86 86 \beginfloatleft
87 \image TODO_CREATE_IMAGE.png
87 \image examples_qmlboxplot.png
88 88 \endfloat
89 89 \clearfloat
90 90 */
@@ -146,12 +146,14 QTCOMMERCIALCHART_BEGIN_NAMESPACE
146 146 \qmlsignal BoxPlotSeries::onCountChanged();
147 147 Signal is emitted when there is change in count of box-and-whiskers items in the series.
148 148 */
149 /*
150 void boxsetsAdded(QList<QBoxSet *> sets);
151 */
152 /*
153 void boxsetsRemoved(QList<QBoxSet *> sets);
154 */
149 /*!
150 \qmlsignal BoxPlotSeries::onBoxsetsAdded()
151 Signal is emitted when new box-and-whiskers sets are added to the series.
152 */
153 /*!
154 \qmlsignal BoxPlotSeries::boxsetsRemoved()
155 Signal is emitted when new box-and-whiskers sets are removed from the series.
156 */
155 157
156 158 /*!
157 159 Constructs empty QBoxPlotSeries.
General Comments 0
You need to be logged in to leave comments. Login now