##// END OF EJS Templates
Modifying QScatterSeries API
Modifying QScatterSeries API

File last commit:

r176:6a1519e364a3
r179:0dff3ce36275
Show More
qchartview.h
77 lines | 1.9 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;
Michal Klocek
Removes QChartWidget...
r136 class QRubberBand;
Michal Klocek
Adds rubberband for zooming...
r58
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QChart;
class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView
{
public:
Michal Klocek
Removes QChartWidget...
r136 enum RubberBandPolicy { NoRubberBand, VerticalRubberBand, HorizonalRubberBand, RectangleRubberBand };
Michal Klocek
Adds rubberband for zooming...
r58 explicit QChartView(QWidget *parent = 0);
~QChartView();
//implement from QWidget
void resizeEvent(QResizeEvent *event);
void addSeries(QChartSeries* series);
Michal Klocek
Removes QChartWidget...
r136
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
Removes QChartWidget...
r136
Michal Klocek
Add background to chart...
r69 void setTitle(const QString& title);
Michal Klocek
Change background gradient to use ObjectBoundingMode...
r122 void setChartBackgroundBrush(const QBrush& brush);
void setChartBackgroundPen(const QPen& pen);
Michal Klocek
Add zoom support...
r67 void zoomInToRect(const QRect& rectangle);
void zoomIn();
void zoomOut();
Michal Klocek
Adds rubberband for zooming...
r58
Michal Klocek
Removes QChartWidget...
r136 void setRubberBandPolicy(const RubberBandPolicy );
RubberBandPolicy rubberBandPolicy() const;
Michal Klocek
Adds missing ids to theme classes
r153 void setChartTheme(QChart::ChartTheme theme);
QChart::ChartTheme chartTheme() const;
Michal Klocek
Removes QChartWidget...
r136
Michal Klocek
Adds more axis handling...
r176 void setDefaultAxisX(const QChartAxis& axis);
void setDefaultAxisY(const QChartAxis& axis);
QChartAxis defaultAxisX() const;
QChartAxis defaultAxisY() const;
QChartAxis axisY(int id) const;
int addAxisY(const QChartAxis& axis);
void removeAxisY(int id);
Michal Klocek
Add public function for axis hadnling to qchart
r155
Michal Klocek
Removes QChartWidget...
r136 protected:
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
Michal Klocek
Adds rubberband for zooming...
r58 private:
QGraphicsScene *m_scene;
QChart* m_chart;
Michal Klocek
Removes QChartWidget...
r136 QPoint m_rubberBandOrigin;
QRubberBand* m_rubberBand;
bool m_verticalRubberBand;
bool m_horizonalRubberBand;
Michal Klocek
Adds rubberband for zooming...
r58 Q_DISABLE_COPY(QChartView)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QCHARTWIDGET_H