qchartview.h
46 lines
| 1004 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; | ||||
class QRubberBand; | ||||
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 | |||
protected: | ||||
void mouseMoveEvent (QMouseEvent *event); | ||||
void mousePressEvent (QMouseEvent *event); | ||||
void mouseReleaseEvent (QMouseEvent *event); | ||||
private: | ||||
QGraphicsScene *m_scene; | ||||
QChart* m_chart; | ||||
QRubberBand *m_rubberBand; | ||||
QPoint m_origin; | ||||
bool m_showRubberBand; | ||||
Q_DISABLE_COPY(QChartView) | ||||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QCHARTWIDGET_H | ||||