##// END OF EJS Templates
build fix.
build fix.

File last commit:

r729:3294d4ff177c
r744:4a4cc4b22b41
Show More
qchartview.h
84 lines | 2.3 KiB | text/x-c | CLexer
#ifndef QCHARTWIDGET_H
#define QCHARTWIDGET_H
#include <qchartglobal.h>
#include <qchartaxis.h>
#include <qseries.h>
#include <qchart.h>
#include <QGraphicsView>
class QGraphicsScene;
class QRubberBand;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QChart;
class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView
{
Q_OBJECT
public:
enum RubberBandPolicy { NoRubberBand, VerticalRubberBand, HorizonalRubberBand, RectangleRubberBand };
explicit QChartView(QWidget *parent = 0);
~QChartView();
//implement from QWidget
void resizeEvent(QResizeEvent *event);
void addSeries(QSeries* series,QChartAxis* axisY=0);// takes series ownership , takes axis ownership
void removeSeries(QSeries* series); //returns ownership , deletes axis if no series attached
void removeAllSeries(); // deletes series and axis
void setChartTitle(const QString& title);
QString chartTitle() const;
void setChartTitleFont(const QFont& font);
void setChartTitleBrush(const QBrush &brush);
QBrush chartTitleBrush();
void setChartBackgroundBrush(const QBrush& brush);
void setChartBackgroundPen(const QPen& pen);
void zoomIn();
void zoomIn(const QRect& rect);
void zoomOut();
void scrollLeft();
void scrollRight();
void scrollUp();
void scrollDown();
void setRubberBandPolicy(const RubberBandPolicy );
RubberBandPolicy rubberBandPolicy() const;
void setChartTheme(QChart::ChartTheme theme);
QChart::ChartTheme chartTheme() const;
void setAnimationOptions(QChart::AnimationOptions options);
QChart::AnimationOptions animationOptions() const;
QChartAxis* axisX() const;
QChartAxis* axisY() const;
QLegend &legend() const;
QLegend* takeLegend();
void giveLegend(QLegend* legend);
protected:
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
private:
QGraphicsScene *m_scene;
QChart* m_chart;
QPoint m_rubberBandOrigin;
QRubberBand* m_rubberBand;
bool m_verticalRubberBand;
bool m_horizonalRubberBand;
Q_DISABLE_COPY(QChartView)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QCHARTWIDGET_H