##// END OF EJS Templates
BarGroup and Bar as ChartItems instead of GraphicItems
BarGroup and Bar as ChartItems instead of GraphicItems

File last commit:

r74:5412c444e1e8
r74:5412c444e1e8
Show More
barchartseries.h
48 lines | 1.1 KiB | text/x-c | CLexer
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #ifndef BARCHARTSERIES_H
#define BARCHARTSERIES_H
#include <QList>
sauimone
Improved bar chart series
r71 #include <QRectF>
#include <QAbstractItemModel>
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #include "qchartseries.h"
#include "qchartglobal.h"
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74 // TODO: Can this class be combined with series?
class BarGroup;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Container for series
class QTCOMMERCIALCHART_EXPORT BarChartSeries : public QChartSeries
{
sauimone
Improved bar chart series
r71 Q_OBJECT
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 public:
sauimone
Refactored series creation.
r62 BarChartSeries(QObject* parent=0);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
// from QChartSeries
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeBar; }
sauimone
Improved bar chart series
r71 // TODO: This as dataModel instead of n different setters. (data model itself can accept lists and whatnot)
virtual bool setData(QAbstractItemModel* model);
sauimone
Refactored series creation.
r62
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 // Methods to find out minimum and maximum values of data
int min();
int max();
sauimone
Improved bar chart series
r71 int countSeries();
int countItemsInSeries(); // Count items in one series.
int countTotalItems();
int valueAt(int series, int item);
public Q_SLOTS:
void chartSizeChanged(QRectF rect);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
private:
sauimone
Improved bar chart series
r71 QAbstractItemModel* mModel;
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74 BarGroup* mBarGroup;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARCHARTSERIES_H