@@ -1,27 +1,49 | |||||
1 | #include "qbarcategory.h" |
|
1 | #include "qbarcategory.h" | |
2 |
|
2 | |||
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
3 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
4 |
|
4 | |||
|
5 | /*! | |||
|
6 | \class QBarCategory | |||
|
7 | \brief QtCommercial chart API. | |||
|
8 | ||||
|
9 | QBarCategory is a container for labels of various bar charts. Before the | |||
|
10 | bar chart can be constructed, the categories must be defined. This is done by | |||
|
11 | creating a QBarCategory class and appending the labels of categories to it. | |||
|
12 | The QBarCategory is then given to QBarSeries class. | |||
|
13 | */ | |||
|
14 | ||||
|
15 | /*! | |||
|
16 | Constructs the category container | |||
|
17 | */ | |||
5 | QBarCategory::QBarCategory() |
|
18 | QBarCategory::QBarCategory() | |
6 | { |
|
19 | { | |
7 | } |
|
20 | } | |
8 |
|
21 | |||
|
22 | /*! | |||
|
23 | Appends the \a label in the category. | |||
|
24 | */ | |||
9 | QBarCategory& QBarCategory::operator << (const QString &label) |
|
25 | QBarCategory& QBarCategory::operator << (const QString &label) | |
10 | { |
|
26 | { | |
11 | mList.append(label); |
|
27 | mList.append(label); | |
12 | return *this; |
|
28 | return *this; | |
13 | } |
|
29 | } | |
14 |
|
30 | |||
|
31 | /*! | |||
|
32 | Retrurns number of labels in category | |||
|
33 | */ | |||
15 | int QBarCategory::count() |
|
34 | int QBarCategory::count() | |
16 | { |
|
35 | { | |
17 | return mList.count(); |
|
36 | return mList.count(); | |
18 | } |
|
37 | } | |
19 |
|
38 | |||
|
39 | /*! | |||
|
40 | Retruns the label of category defined by index \a category | |||
|
41 | */ | |||
20 | QString QBarCategory::label(int category) |
|
42 | QString QBarCategory::label(int category) | |
21 | { |
|
43 | { | |
22 | return mList.at(category); |
|
44 | return mList.at(category); | |
23 | } |
|
45 | } | |
24 |
|
46 | |||
25 | // TODO?: |
|
47 | // TODO?: | |
26 | //#include "moc_qbarcategory.cpp" |
|
48 | //#include "moc_qbarcategory.cpp" | |
27 | QTCOMMERCIALCHART_END_NAMESPACE |
|
49 | QTCOMMERCIALCHART_END_NAMESPACE |
General Comments 0
You need to be logged in to leave comments.
Login now