##// END OF EJS Templates
adopted theme interface to barcharts
adopted theme interface to barcharts

File last commit:

r86:84e7b4b4f9e0
r106:bc1381ca9ce2
Show More
qchartview.h
46 lines | 1.1 KiB | text/x-c | CLexer
Michal Klocek
Adds rubberband for zooming...
r58 #ifndef QCHARTWIDGET_H
#define QCHARTWIDGET_H
#include "qchartglobal.h"
#include "qchartseries.h"
Michal Klocek
Add gradient bacground support...
r86 #include "qchart.h"
Michal Klocek
Adds rubberband for zooming...
r58 #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);
Michal Klocek
Add gradient bacground support...
r86 void setBackground(const QColor& startColor, const QColor& endColor = Qt::white, QChart::GradientOrientation orientation = QChart::VerticalGradientOrientation);
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