qchartview.h
45 lines
| 974 B
| text/x-c
|
CLexer
/ src / qchartview.h
|
r58 | #ifndef QCHARTWIDGET_H | ||
#define QCHARTWIDGET_H | ||||
#include "qchartglobal.h" | ||||
#include "qchartseries.h" | ||||
#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); | ||||
|
r61 | // Convenience function | ||
QChartSeries* createSeries(QChartSeries::QChartSeriesType type); | ||||
|
r58 | |||
|
r67 | int margin() const; | ||
|
r69 | void setTitle(const QString& title); | ||
void setBackgroundColor(const QColor& color); | ||||
|
r67 | void zoomInToRect(const QRect& rectangle); | ||
void zoomIn(); | ||||
void zoomOut(); | ||||
|
r58 | |||
private: | ||||
QGraphicsScene *m_scene; | ||||
QChart* m_chart; | ||||
QPoint m_origin; | ||||
Q_DISABLE_COPY(QChartView) | ||||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QCHARTWIDGET_H | ||||