qchartview.h
46 lines
| 1.1 KiB
| text/x-c
|
CLexer
/ src / qchartview.h
Michal Klocek
|
r58 | #ifndef QCHARTWIDGET_H | ||
#define QCHARTWIDGET_H | ||||
#include "qchartglobal.h" | ||||
#include "qchartseries.h" | ||||
Michal Klocek
|
r86 | #include "qchart.h" | ||
Michal Klocek
|
r58 | #include <QGraphicsView> | ||
class QGraphicsScene; | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class QChart; | ||||
class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView | ||||
{ | ||||
public: | ||||
explicit QChartView(QWidget *parent = 0); | ||||
~QChartView(); | ||||
//implement from QWidget | ||||
void resizeEvent(QResizeEvent *event); | ||||
void addSeries(QChartSeries* series); | ||||
Tero Ahola
|
r61 | // Convenience function | ||
QChartSeries* createSeries(QChartSeries::QChartSeriesType type); | ||||
Michal Klocek
|
r58 | |||
Michal Klocek
|
r67 | int margin() const; | ||
Michal Klocek
|
r69 | void setTitle(const QString& title); | ||
Michal Klocek
|
r86 | void setBackground(const QColor& startColor, const QColor& endColor = Qt::white, QChart::GradientOrientation orientation = QChart::VerticalGradientOrientation); | ||
Michal Klocek
|
r67 | void zoomInToRect(const QRect& rectangle); | ||
void zoomIn(); | ||||
void zoomOut(); | ||||
Michal Klocek
|
r58 | |||
private: | ||||
QGraphicsScene *m_scene; | ||||
QChart* m_chart; | ||||
QPoint m_origin; | ||||
Q_DISABLE_COPY(QChartView) | ||||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QCHARTWIDGET_H | ||||