chartdataset_p.h
60 lines
| 1.6 KiB
| text/x-c
|
CLexer
/ src / chartdataset_p.h
Michal Klocek
|
r223 | #ifndef CHARTDATASET_P_H_ | ||
#define CHARTDATASET_P_H_ | ||||
Michal Klocek
|
r131 | |||
Michal Klocek
|
r223 | #include "qchartseries.h" | ||
Michal Klocek
|
r131 | #include "domain_p.h" | ||
#include <QVector> | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Michal Klocek
|
r223 | class QChartAxis; | ||
Michal Klocek
|
r131 | class ChartDataSet : public QObject | ||
{ | ||||
Q_OBJECT | ||||
public: | ||||
Michal Klocek
|
r223 | ChartDataSet(QObject* parent=0); | ||
Michal Klocek
|
r131 | virtual ~ChartDataSet(); | ||
Michal Klocek
|
r223 | void addSeries(QChartSeries* series,QChartAxis *axisY = 0); | ||
void removeSeries(QChartSeries* series); | ||||
Michal Klocek
|
r258 | void removeAllSeries(); | ||
Michal Klocek
|
r223 | void addDomain(const QRectF& rect, const QRectF& viewport); | ||
Michal Klocek
|
r139 | bool nextDomain(); | ||
bool previousDomain(); | ||||
Michal Klocek
|
r223 | void clearDomains(int toIndex =0); | ||
const Domain domain(QChartAxis *axisY) const; | ||||
int domainIndex() const {return m_domainIndex;} | ||||
Michal Klocek
|
r298 | void setDomain(int index); | ||
Michal Klocek
|
r223 | |||
QChartAxis* axisX() const { return m_axisX;}; | ||||
QChartAxis* axisY(QChartSeries* series = 0) const; | ||||
Michal Klocek
|
r131 | |||
signals: | ||||
void seriesAdded(QChartSeries* series); | ||||
Michal Klocek
|
r223 | void seriesRemoved(QChartSeries* series); | ||
void axisAdded(QChartAxis* axis); | ||||
void axisRemoved(QChartAxis* axis); | ||||
void axisLabelsChanged(QChartAxis* axis, const QStringList& labels); | ||||
void seriesDomainChanged(QChartSeries* series,const Domain& domain); | ||||
private slots: | ||||
void handleMinChanged(qreal min); | ||||
void handleMaxChanged(qreal max); | ||||
void handleTickChanged(QChartAxis*); | ||||
private: | ||||
QStringList createLabels(QChartAxis* axis,qreal min, qreal max); | ||||
Michal Klocek
|
r131 | |||
private: | ||||
Michal Klocek
|
r223 | QMultiMap<QChartAxis*, Domain> m_domainMap; | ||
QMultiMap<QChartAxis*, QChartSeries*> m_seriesMap; | ||||
QChartAxis* m_axisX; | ||||
QChartAxis* m_axisY; | ||||
Michal Klocek
|
r131 | int m_domainIndex; | ||
Michal Klocek
|
r223 | bool m_axisXInitialized; | ||
Michal Klocek
|
r131 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif /* CHARTENGINE_P_H_ */ | ||||