##// END OF EJS Templates
Adds documentation for QAxisCategories
Michal Klocek -
r1038:f25a37009a72
parent child
Show More
@@ -23,6 +23,16
23 23
24 24 QTCOMMERCIALCHART_BEGIN_NAMESPACE
25 25
26 /*!
27 \class QAxisCategories
28 \brief The QAxisCategoriess class is used for manipulating axis's categories.
29 \mainclass
30
31 Each axis can have categories instead of numerical representation. The typical use case
32 is bar chart, where categories are always show on X axis.
33 */
34
35
26 36 QAxisCategories::QAxisCategories():
27 37 d_ptr(new QAxisCategoriesPrivate(this))
28 38 {
@@ -34,6 +44,9 QAxisCategories::~QAxisCategories()
34 44
35 45 }
36 46
47 /*!
48 Inserts bar \a categories.
49 */
37 50 void QAxisCategories::insert(const QBarCategories &categories)
38 51 {
39 52 int i=1;
@@ -44,34 +57,52 void QAxisCategories::insert(const QBarCategories &categories)
44 57 emit d_ptr->updated();
45 58 }
46 59
60 /*!
61 Inserts category, instead of \a value on axis a \a label will be shown.
62 */
47 63 void QAxisCategories::insert(qreal value,QString label)
48 64 {
49 65 d_ptr->m_map.insert(value,label);
50 66 emit d_ptr->updated();
51 67 }
52 68
69 /*!
70 Removes category for \a value.
71 */
53 72 void QAxisCategories::remove(qreal value)
54 73 {
55 74 d_ptr->m_map.remove(value);
56 75 emit d_ptr->updated();
57 76 }
58 77
78 /*!
79 Removes all categories.
80 */
59 81 void QAxisCategories::clear()
60 82 {
61 83 d_ptr->m_map.clear();
62 84 emit d_ptr->updated();
63 85 }
64 86
87 /*!
88 Returns number of categories.
89 */
65 90 int QAxisCategories::count()
66 91 {
67 92 return d_ptr->m_map.count();
68 93 }
69 94
95 /*!
96 Returns all values of categories.
97 */
70 98 QList<qreal> QAxisCategories::values() const
71 99 {
72 100 return d_ptr->m_map.keys();
73 101 }
74 102
103 /*!
104 Returns label for given \a value.
105 */
75 106 QString QAxisCategories::label(qreal value) const
76 107 {
77 108 return d_ptr->m_map.value(value);
General Comments 0
You need to be logged in to leave comments. Login now