##// 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
Michal Klocek
Adds rubberband for zooming...
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);
Tero Ahola
Refactored series creation with QChart
r61 // Convenience function
QChartSeries* createSeries(QChartSeries::QChartSeriesType type);
Michal Klocek
Adds rubberband for zooming...
r58
Michal Klocek
Add zoom support...
r67 int margin() const;
Michal Klocek
Add background to chart...
r69 void setTitle(const QString& title);
void setBackgroundColor(const QColor& color);
Michal Klocek
Add zoom support...
r67 void zoomInToRect(const QRect& rectangle);
void zoomIn();
void zoomOut();
Michal Klocek
Adds rubberband for zooming...
r58
private:
QGraphicsScene *m_scene;
QChart* m_chart;
QPoint m_origin;
Q_DISABLE_COPY(QChartView)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QCHARTWIDGET_H