##// END OF EJS Templates
include headers without the .h in examples
Jani Honkonen -
r838:b700a1337503
parent child
Show More
@@ -20,11 +20,10
20 20
21 21 #include <QtGui/QApplication>
22 22 #include <QMainWindow>
23 #include <qchartglobal.h>
24 #include <qchartview.h>
25 #include <qpieseries.h>
26 #include <qpieslice.h>
27 23 #include <QTime>
24 #include <QChartView>
25 #include <QPieSeries>
26 #include <QPieSlice>
28 27
29 28 QTCOMMERCIALCHART_USE_NAMESPACE
30 29
@@ -19,13 +19,11
19 19 ****************************************************************************/
20 20
21 21 #include "splinewidget.h"
22 #include "qchartview.h"
23 #include "qlineseries.h"
24 22 #include <QGridLayout>
25 23 #include <QPushButton>
26 #include "qchartaxis.h"
27 #include <qmath.h>
28 24 #include <QTime>
25 #include <QChartView>
26 #include <QSplineSeries>
29 27
30 28 QTCOMMERCIALCHART_USE_NAMESPACE
31 29
@@ -20,13 +20,9
20 20
21 21 #include <QtGui/QApplication>
22 22 #include <QMainWindow>
23 #include <qchartglobal.h>
24 #include <qchartview.h>
25 #include <qstackedbarseries.h>
26 #include <qbarset.h>
27 #include <qchartaxis.h>
28 #include <QStringList>
29 #include <QDebug>
23 #include <QChartView>
24 #include <QStackedBarSeries>
25 #include <QBarSet>
30 26
31 27 QTCOMMERCIALCHART_USE_NAMESPACE
32 28
@@ -35,7 +31,11 class DrilldownBarSeries : public QStackedBarSeries
35 31 {
36 32 Q_OBJECT
37 33 public:
38 DrilldownBarSeries(QStringList categories, QObject *parent = 0) : QStackedBarSeries(categories,parent) {}
34 DrilldownBarSeries(QStringList categories, QObject *parent = 0)
35 :QStackedBarSeries(categories, parent)
36 {
37
38 }
39 39
40 40 void mapDrilldownSeries(QString category, DrilldownBarSeries* drilldownSeries)
41 41 {
@@ -47,10 +47,7 public:
47 47 return mDrilldownSeries[category];
48 48 }
49 49
50 public Q_SLOTS:
51
52 50 private:
53
54 51 QMap<QString, DrilldownBarSeries*> mDrilldownSeries;
55 52 };
56 53 //! [1]
@@ -60,7 +57,12 class DrilldownChart : public QChart
60 57 {
61 58 Q_OBJECT
62 59 public:
63 explicit DrilldownChart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0) : QChart(parent, wFlags), m_currentSeries(0) {}
60 explicit DrilldownChart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0)
61 :QChart(parent, wFlags),
62 m_currentSeries(0)
63 {
64
65 }
64 66
65 67 void changeSeries(QSeries* series)
66 68 {
@@ -75,6 +77,7 public Q_SLOTS:
75 77 void handleClicked(QBarSet *barset, QString category, Qt::MouseButtons button)
76 78 {
77 79 Q_UNUSED(barset)
80 Q_UNUSED(button)
78 81 DrilldownBarSeries* series = static_cast<DrilldownBarSeries*> (sender());
79 82 changeSeries(series->drilldownSeries(category));
80 83 }
General Comments 0
You need to be logged in to leave comments. Login now