##// END OF EJS Templates
correct drawing for barchart
correct drawing for barchart

File last commit:

r77:a102be07cf92
r82:144fd3c1acc4
Show More
qchartwidget.h
56 lines | 1.6 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
Theme now affects background, enabled zoom by default in QChartWidget
r77 #include <QRubberBand>
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
Theme now affects background, enabled zoom by default in QChartWidget
r77 class QRubberBand;
Michal Klocek
Removes PIMPL for now...
r53
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();
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)?
Tero Ahola
Theme now affects background, enabled zoom by default in QChartWidget
r77 public Q_SLOTS:
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
Tero Ahola
Draft implementation for setting color themes for a chart
r64 /*!
* Set color theme for the chart. Themes define harmonic colors for the graphical elements of
* the chart.
*/
Tero Ahola
Color themes now enabled for scatter, pie and line series.
r75 void setTheme(QChart::ChartThemeId theme);
Tero Ahola
Draft implementation for setting color themes for a chart
r64
Tero Ahola
Theme now affects background, enabled zoom by default in QChartWidget
r77 void setZoomEnabled(bool enabled);
private: // From QWidget TODO: should these be protected instead? Is QChartWidget meant to be extened by the user?
void resizeEvent(QResizeEvent *event);
QSize sizeHint() const;
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
Tero Ahola
Started to refactor the API to allow integrating different plot types
r19 private:
Q_DISABLE_COPY(QChartWidget)
Tero Ahola
Theme now affects background, enabled zoom by default in QChartWidget
r77 // TODO: move the following to pimpl
Michal Klocek
Removes PIMPL for now...
r53 QGraphicsScene *m_scene;
QChart* m_chart;
Tero Ahola
Theme now affects background, enabled zoom by default in QChartWidget
r77 QRubberBand m_rubberBand;
QPoint m_origin;
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