##// END OF EJS Templates
Revert "Fixes line uder grid issue"...
Revert "Fixes line uder grid issue" This reverts commit 3ea3ba4a33950ea7420e16913d228ed53fe566c3.

File last commit:

r173:5bd6f6e4373b
r191:0b54368f72bb
Show More
barchartmodel_p.h
53 lines | 1.2 KiB | text/x-c | CLexer
sauimone
model prototyping for bar chart
r159 #ifndef BARCHARTMODEL_H
#define BARCHARTMODEL_H
#include <QObject>
sauimone
model delegate for bar series. updated examples
r161 #include "qchartglobal.h"
sauimone
model prototyping for bar chart
r159
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
model delegate for bar series. updated examples
r161 // Model for bar chart. Internal class.
sauimone
model prototyping for bar chart
r159 // TODO: Implement as QAbstractItemModel?
sauimone
proof of concept implementation for barset and barcategory
r169 class QBarSet;
class QBarCategory;
sauimone
model prototyping for bar chart
r159 class BarChartModel : public QObject //, public QAbstractItemModel
{
Q_OBJECT
public:
sauimone
fixed bug in category implementation. model now owns the category and sets
r173 explicit BarChartModel(QBarCategory *category, QObject *parent = 0);
~BarChartModel();
sauimone
model prototyping for bar chart
r159
sauimone
Barset and barcategory implememtation. Updated test application
r171 QBarCategory& category();
sauimone
fixed bug in category implementation. model now owns the category and sets
r173 void addBarSet(QBarSet *set);
void removeBarSet(QBarSet *set);
sauimone
proof of concept implementation for barset and barcategory
r169
sauimone
Barset and barcategory implememtation. Updated test application
r171 int countSets(); // Number of sets in model
int countCategories(); // Number of categories
int countTotalItems(); // Total items in all sets. Includes empty items.
sauimone
model prototyping for bar chart
r159
sauimone
Barset and barcategory implememtation. Updated test application
r171 qreal max(); // Maximum value of all sets
qreal min(); // Minimum value of all sets
qreal valueAt(int set, int category);
sauimone
model prototyping for bar chart
r159
sauimone
Barset and barcategory implememtation. Updated test application
r171 qreal categorySum(int column);
qreal maxCategorySum(); // returns maximum sum of sets in all categories.
sauimone
model delegate for bar series. updated examples
r161
sauimone
removed barchartseriesbase. functionality is now in model
r172 QString label(int category);
sauimone
model prototyping for bar chart
r159 signals:
void modelUpdated();
public slots:
private:
sauimone
Barset and barcategory implememtation. Updated test application
r171 QList<QBarSet*> mDataModel;
sauimone
fixed bug in category implementation. model now owns the category and sets
r173 QBarCategory* mCategory; // Owned
sauimone
model prototyping for bar chart
r159
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARCHARTMODEL_H