##// END OF EJS Templates
Updated barchart documentation
Updated barchart documentation

File last commit:

r319:c54c34ca0b57
r319:c54c34ca0b57
Show More
qbarcategory.cpp
56 lines | 1.2 KiB | text/x-c | CppLexer
sauimone
proof of concept implementation for barset and barcategory
r169 #include "qbarcategory.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
some qdoc pollution inserted to qbarcategory
r297 /*!
\class QBarCategory
sauimone
Documentation for bar charts
r313 \brief part of QtCommercial chart API.
sauimone
some qdoc pollution inserted to qbarcategory
r297
QBarCategory is a container for labels of various bar charts. Before the
bar chart can be constructed, the categories must be defined. This is done by
creating a QBarCategory class and appending the labels of categories to it.
sauimone
Documentation for bar charts
r313 The QBarCategory is then given to bar chart series class.
sauimone
Updated barchart documentation
r319 \mainclass
Example on how to create a category:
\snippet ../example/barchart/main.cpp 1
sauimone
Documentation for bar charts
r313 \sa QBarChartSeries, QStackedBarChartSeries, QPercentBarChartSeries
sauimone
some qdoc pollution inserted to qbarcategory
r297 */
/*!
Constructs the category container
*/
sauimone
proof of concept implementation for barset and barcategory
r169 QBarCategory::QBarCategory()
{
}
sauimone
some qdoc pollution inserted to qbarcategory
r297 /*!
Appends the \a label in the category.
*/
sauimone
proof of concept implementation for barset and barcategory
r169 QBarCategory& QBarCategory::operator << (const QString &label)
{
mList.append(label);
return *this;
}
sauimone
some qdoc pollution inserted to qbarcategory
r297 /*!
Retrurns number of labels in category
*/
sauimone
proof of concept implementation for barset and barcategory
r169 int QBarCategory::count()
{
return mList.count();
}
sauimone
some qdoc pollution inserted to qbarcategory
r297 /*!
Retruns the label of category defined by index \a category
*/
sauimone
removed barchartseriesbase. functionality is now in model
r172 QString QBarCategory::label(int category)
sauimone
proof of concept implementation for barset and barcategory
r169 {
sauimone
removed barchartseriesbase. functionality is now in model
r172 return mList.at(category);
sauimone
proof of concept implementation for barset and barcategory
r169 }
sauimone
fixed bug in category implementation. model now owns the category and sets
r173 // TODO?:
//#include "moc_qbarcategory.cpp"
sauimone
proof of concept implementation for barset and barcategory
r169 QTCOMMERCIALCHART_END_NAMESPACE