##// END OF EJS Templates
BarGroup and Bar as ChartItems instead of GraphicItems
BarGroup and Bar as ChartItems instead of GraphicItems

File last commit:

r69:c7c3c4960b21
r74:5412c444e1e8
Show More
qchartview.h
45 lines | 974 B | text/x-c | CLexer
#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);
// Convenience function
QChartSeries* createSeries(QChartSeries::QChartSeriesType type);
int margin() const;
void setTitle(const QString& title);
void setBackgroundColor(const QColor& color);
void zoomInToRect(const QRect& rectangle);
void zoomIn();
void zoomOut();
private:
QGraphicsScene *m_scene;
QChart* m_chart;
QPoint m_origin;
Q_DISABLE_COPY(QChartView)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QCHARTWIDGET_H