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