##// END OF EJS Templates
QCategoryAxis: method parameter name updated
Marek Rosa -
r1849:36af7b811b66
parent child
Show More
@@ -80,23 +80,23 QCategoryAxis::QCategoryAxis(QCategoryAxisPrivate &d,QObject *parent):QValueAxis
80 /*!
80 /*!
81 Appends new category to the axis with an \a categoryLabel.
81 Appends new category to the axis with an \a categoryLabel.
82 Category label has to be unique.
82 Category label has to be unique.
83 Parameter \a categoryHighEnd specifies the high end limit of the category.
83 Parameter \a categoryEndValue specifies the high end limit of the category.
84 It has to be greater than the high end limit of the previous category.
84 It has to be greater than the high end limit of the previous category.
85 Otherwise the method returns without adding a new category.
85 Otherwise the method returns without adding a new category.
86 */
86 */
87 void QCategoryAxis::append(const QString& categoryLabel, qreal categoryHighEnd)
87 void QCategoryAxis::append(const QString& categoryLabel, qreal categoryEndValue)
88 {
88 {
89 Q_D(QCategoryAxis);
89 Q_D(QCategoryAxis);
90
90
91 if (!d->m_categories.contains(categoryLabel))
91 if (!d->m_categories.contains(categoryLabel))
92 {
92 {
93 if(d->m_categories.isEmpty()){
93 if(d->m_categories.isEmpty()){
94 Range range(d->m_categoryMinimum, categoryHighEnd);
94 Range range(d->m_categoryMinimum, categoryEndValue);
95 d->m_categoriesMap.insert(categoryLabel, range);
95 d->m_categoriesMap.insert(categoryLabel, range);
96 d->m_categories.append(categoryLabel);
96 d->m_categories.append(categoryLabel);
97 }else if (categoryHighEnd > endValue(d->m_categories.last())){
97 }else if (categoryEndValue > endValue(d->m_categories.last())){
98 Range previousRange = d->m_categoriesMap.value(d->m_categories.last());
98 Range previousRange = d->m_categoriesMap.value(d->m_categories.last());
99 d->m_categoriesMap.insert(categoryLabel, Range(previousRange.second, categoryHighEnd));
99 d->m_categoriesMap.insert(categoryLabel, Range(previousRange.second, categoryEndValue));
100 d->m_categories.append(categoryLabel);
100 d->m_categories.append(categoryLabel);
101 }
101 }
102 }
102 }
General Comments 0
You need to be logged in to leave comments. Login now