##// END OF EJS Templates
Improves build configuration...
Improves build configuration * adds local_build config option * adds developer_build config option * reanmes config files * removes debug stuff * fixes headers issues

File last commit:

r988:8a36a6921f5a
r996:ce5f1c868418
Show More
barchartmodel_p.h
78 lines | 2.3 KiB | text/x-c | CLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
sauimone
model prototyping for bar chart
r159 #ifndef BARCHARTMODEL_H
#define BARCHARTMODEL_H
#include <QObject>
sauimone
replaced qbarcategory with qstringlist
r377 #include <QStringList>
sauimone
model delegate for bar series. updated examples
r161 #include "qchartglobal.h"
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 #include <qabstractseries.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;
sauimone
model prototyping for bar chart
r159 class BarChartModel : public QObject //, public QAbstractItemModel
{
Q_OBJECT
public:
sauimone
replaced qbarcategory with qstringlist
r377 explicit BarChartModel(QStringList categories, QObject *parent = 0);
sauimone
model prototyping for bar chart
r159
sauimone
replaced qbarcategory with qstringlist
r377 QStringList category();
sauimone
const to getters, renamed addBarset to appendBarset
r776 void appendBarSet(QBarSet *set);
sauimone
fixed bug in category implementation. model now owns the category and sets
r173 void removeBarSet(QBarSet *set);
Marek Rosa
Adding data to BarSet through model added
r662 void insertBarSet(int i, QBarSet *set);
void insertCategory(int i, QString category);
Marek Rosa
Removing data from BarSeries through model added
r663 void removeCategory(int i);
sauimone
const to getters, renamed addBarset to appendBarset
r776 QBarSet *barsetAt(int index) const;
QList<QBarSet *> barSets() const;
sauimone
review fix: Removed iterator from barseries. Remove const from brush and pen. Renamed setters for tooltip, floating values and separators
r357
sauimone
const to getters, renamed addBarset to appendBarset
r776 int barsetCount() const; // Number of sets in model
int categoryCount() const; // Number of categories
sauimone
model prototyping for bar chart
r159
sauimone
const to getters, renamed addBarset to appendBarset
r776 qreal max() const; // Maximum value of all sets
qreal min() const; // Minimum value of all sets
qreal valueAt(int set, int category) const;
qreal percentageAt(int set, int category) const;
sauimone
model prototyping for bar chart
r159
sauimone
const to getters, renamed addBarset to appendBarset
r776 qreal categorySum(int category) const;
sauimone
percent barchart layout fix. signal fix
r850 qreal absoluteCategorySum(int category) const;
sauimone
const to getters, renamed addBarset to appendBarset
r776 qreal maxCategorySum() const; // returns maximum sum of sets in all categories.
sauimone
model delegate for bar series. updated examples
r161
sauimone
right click feature for bar series. Enables drilldown
r412 QString categoryName(int category);
sauimone
removed barchartseriesbase. functionality is now in model
r172
sauimone
Q_SIGNALS and Q_SLOTS
r775 Q_SIGNALS:
sauimone
model prototyping for bar chart
r159 void modelUpdated();
sauimone
Q_SIGNALS and Q_SLOTS
r775 public Q_SLOTS:
sauimone
model prototyping for bar chart
r159
private:
sauimone
minor code review fixes, part n
r763 QList<QBarSet *> m_dataModel;
QStringList m_category;
sauimone
model prototyping for bar chart
r159 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARCHARTMODEL_H