@@ -22,7 +22,8 headers.fileextensions = *.h *.ch *.h++ *.hh *.hpp *.hxx | |||
|
22 | 22 | examples.fileextensions = *.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml |
|
23 | 23 | examples.imageextensions = *.png *.jpeg *.jpg *.gif *.mng |
|
24 | 24 | |
|
25 |
Cpp.ignoretokens = Q |
|
|
25 | Cpp.ignoretokens = Q_INVOKABLE \ | |
|
26 | QTCOMMERCIALCHART_EXPORT \ | |
|
26 | 27 | QTCOMMERCIALCHART_END_NAMESPACE \ |
|
27 | 28 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
28 | 29 | Cpp.ignoredirectives = Q_DECLARE_HANDLE \ |
@@ -1706,6 +1706,7 Module { | |||
|
1706 | 1706 | Parameter { name: "min"; type: "string" } |
|
1707 | 1707 | Parameter { name: "max"; type: "string" } |
|
1708 | 1708 | } |
|
1709 | Method { name: "clear" } | |
|
1709 | 1710 | } |
|
1710 | 1711 | Component { |
|
1711 | 1712 | name: "QtCommercialChart::QBarModelMapper" |
@@ -33,7 +33,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
33 | 33 | \brief The QBarCategoryAxis class is used for manipulating chart's axis. |
|
34 | 34 | \mainclass |
|
35 | 35 | |
|
36 | BarCategoryAxis can be setup to show axis line with tick marks, grid lines and shades. | |
|
36 | QBarCategoryAxis can be setup to show axis line with tick marks, grid lines and shades. | |
|
37 | 37 | Categories are drawn between ticks. Note that you can use this also with lineseries too. |
|
38 | 38 | See the \l {Line and BarChart Example} {Line and BarChart Example} to learn how to do that. |
|
39 | 39 | |
@@ -144,6 +144,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
144 | 144 | */ |
|
145 | 145 | |
|
146 | 146 | /*! |
|
147 | \qmlmethod void BarCategoryAxis::clear() | |
|
148 | Removes all categories. Sets the maximum and minimum of the axis's range to QString::null. | |
|
149 | */ | |
|
150 | ||
|
151 | /*! | |
|
147 | 152 | Constructs an axis object which is a child of \a parent. |
|
148 | 153 | */ |
|
149 | 154 | QBarCategoryAxis::QBarCategoryAxis(QObject *parent): |
@@ -49,7 +49,7 public: | |||
|
49 | 49 | void remove(const QString &category); |
|
50 | 50 | void insert(int index, const QString &category); |
|
51 | 51 | void replace(const QString &oldCategory, const QString &newCategory); |
|
52 | void clear(); | |
|
52 | Q_INVOKABLE void clear(); | |
|
53 | 53 | void setCategories(const QStringList &categories); |
|
54 | 54 | QStringList categories(); |
|
55 | 55 | int count() const; |
@@ -64,6 +64,17 Rectangle { | |||
|
64 | 64 | compare(minChangedSpy.count, 1, "onMinChanged"); |
|
65 | 65 | compare(maxChangedSpy.count, 1, "onMaxChanged"); |
|
66 | 66 | } |
|
67 | ||
|
68 | function test_seriesAxisClear() { | |
|
69 | verify(barSeries1.axisX.min !== "", "barSeries1.axisX.min"); | |
|
70 | verify(barSeries1.axisX.max !== "", "barSeries1.axisX.max"); | |
|
71 | verify(barSeries1.axisX.count !== 0, "barSeries1.axisX.count"); // category count | |
|
72 | barSeries1.axisX.clear(); | |
|
73 | verify(barSeries1.axisX.min === "", "barSeries1.axisX.min"); | |
|
74 | verify(barSeries1.axisX.max === "", "barSeries1.axisX.max"); | |
|
75 | verify(barSeries1.axisX.count === 0); | |
|
76 | } | |
|
77 | ||
|
67 | 78 | } |
|
68 | 79 | |
|
69 | 80 | ChartView { |
General Comments 0
You need to be logged in to leave comments.
Login now