##// END OF EJS Templates
Refactored series creation with QChart
Refactored series creation with QChart

File last commit:

r61:45d3de5e814a
r61:45d3de5e814a
Show More
qchartwidget.h
40 lines | 1.0 KiB | text/x-c | CLexer
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 #ifndef QCHARTWIDGET_H
#define QCHARTWIDGET_H
Tero Ahola
Renamed to QtCommercialChart
r30 #include "qchartglobal.h"
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 #include "qchart.h"
Tero Ahola
Refactoring: QChartWidget is now a QGraphicsView
r55 #include <QGraphicsView>
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19
Michal Klocek
Removes PIMPL for now...
r53 class QGraphicsScene;
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19
Michal Klocek
Refactor current draft to fit int current design specs...
r21 class QChartSeries;
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 class QChartWidgetPrivate;
Tero Ahola
Refactoring: QChartWidget is now a QGraphicsView
r55 class QTCOMMERCIALCHART_EXPORT QChartWidget : public QGraphicsView
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 {
Q_OBJECT
public:
explicit QChartWidget(QWidget *parent = 0);
~QChartWidget();
Michal Klocek
Refactor current draft to fit int current design specs...
r21 //implement from QWidget
void resizeEvent(QResizeEvent *event);
Tero Ahola
Added size hint for the widget
r29 QSize sizeHint() const;
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19
Tero Ahola
Integrated scatter type series...
r42 // TODO: addSeries and createSeries are optional solutions
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 // TODO: currently createSeries assumes x, y value pairs. This isn't case with all charts. So is there another createSeries for other types (for example one list of ints)?
Michal Klocek
Refactor current draft to fit int current design specs...
r21 void addSeries(QChartSeries* series);
Tero Ahola
Refactored series creation with QChart
r61 QChartSeries* createSeries(QChartSeries::QChartSeriesType type);
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19
private:
Q_DISABLE_COPY(QChartWidget)
Michal Klocek
Removes PIMPL for now...
r53 QGraphicsScene *m_scene;
QChart* m_chart;
Michal Klocek
Refactor current draft to fit int current design specs...
r21
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 };
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_END_NAMESPACE
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19
#endif // QCHARTWIDGET_H