##// END OF EJS Templates
Spline initial
Marek Rosa -
r295:698d88c3d4c1
parent child
Show More
@@ -0,0 +1,6
1 #include "qsplineseries.h"
2
3 QSplineSeries::QSplineSeries(QObject *parent) :
4 QObject(parent)
5 {
6 }
@@ -0,0 +1,24
1 #ifndef QSPLINESERIES_H
2 #define QSPLINESERIES_H
3
4 #include "qchartseries.h"
5
6 QTCOMMERCIALCHART_BEGIN_NAMESPACE
7
8 class QSplineSeries : public QChartSeries
9 {
10 Q_OBJECT
11 public:
12 explicit QSplineSeries(QObject *parent = 0);
13
14 public: // from QChartSeries
15 QChartSeriesType type() const { return QChartSeries::SeriesTypeSpline; }
16 signals:
17
18 public slots:
19
20 };
21
22 QTCOMMERCIALCHART_END_NAMESPACE
23
24 #endif // QSPLINESERIES_H
@@ -0,0 +1,15
1 INCLUDEPATH += $$PWD
2 DEPENDPATH += $$PWD
3
4 SOURCES += \
5 $$PWD/qsplineseries.cpp \
6 splinechart/splinepresenter.cpp
7
8 PRIVATE_HEADERS +=
9
10 PUBLIC_HEADERS += \
11 $$PWD/qsplineseries.h
12
13 HEADERS += \
14 splinechart/qsplineseries.h \
15 splinechart/splinepresenter_p.h
@@ -0,0 +1,16
1 #include "splinepresenter_p.h"
2
3 SplinePresenter::SplinePresenter(QObject *parent) :
4 QObject(parent)
5 {
6 }
7
8 void SplinePresenter::handleGeometryChanged(const QRectF&)
9 {
10 //
11 }
12
13 void SplinePresenter::handleDomainChanged(const Domain& domain)
14 {
15 //
16 }
@@ -0,0 +1,26
1 #ifndef SPLINEPRESENTER_P_H
2 #define SPLINEPRESENTER_P_H
3
4 #include "chartitem_p.h"
5 #include <QObject>
6
7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
8
9 class SplinePresenter : public QObject, public ChartItem
10 {
11 Q_OBJECT
12 public:
13 SplinePresenter(QObject *parent = 0);
14
15 void handleGeometryChanged(const QRectF&);
16 void handleDomainChanged(const Domain& domain);
17
18 signals:
19
20 public slots:
21
22 };
23
24 QTCOMMERCIALCHART_END_NAMESPACE
25
26 #endif // SPLINEPRESENTER_P_H
@@ -10,6 +10,7
10 10 #include "qlinechartseries.h"
11 11 #include "qpieseries.h"
12 12 #include "qscatterseries.h"
13 #include "qsplineseries.h"
13 14 //items
14 15 #include "axisitem_p.h"
15 16 #include "barpresenter.h"
@@ -19,6 +20,7
19 20 #include "linechartanimationitem_p.h"
20 21 #include "piepresenter.h"
21 22 #include "scatterpresenter_p.h"
23 #include "splinepresenter_p.h"
22 24
23 25 QTCOMMERCIALCHART_BEGIN_NAMESPACE
24 26
@@ -162,6 +164,11 void ChartPresenter::handleSeriesAdded(QChartSeries* series)
162 164 m_chartItems.insert(series, pie);
163 165 break;
164 166 }
167 case QChartSeries::SeriesTypeSpline: {
168 QSplineSeries* splineSeries = qobject_cast<QSplineSeries*>(series);
169 SplinePresenter* splinePresenter = new SplinePresenter
170 break;
171 }
165 172 default: {
166 173 qDebug()<< "Series type" << series->type() << "not implemented.";
167 174 break;
@@ -19,8 +19,8 public:
19 19 SeriesTypeStackedBar,
20 20 SeriesTypePercentBar,
21 21 SeriesTypePie,
22 SeriesTypeScatter
23 // SeriesTypeSpline
22 SeriesTypeScatter,
23 SeriesTypeSpline
24 24 };
25 25
26 26 protected:
@@ -15,7 +15,7 SOURCES += \
15 15 qchart.cpp \
16 16 qchartaxis.cpp \
17 17 qchartseries.cpp \
18 qchartview.cpp
18 qchartview.cpp
19 19 PRIVATE_HEADERS += \
20 20 axisitem_p.h \
21 21 chartdataset_p.h \
@@ -34,6 +34,7 include(linechart/linechart.pri)
34 34 include(barchart/barchart.pri)
35 35 include(piechart/piechart.pri)
36 36 include(scatterseries/scatter.pri)
37 include(splinechart/splinechart.pri)
37 38
38 39 THEMES += themes/chartthemeicy_p.h \
39 40 themes/chartthemegrayscale_p.h \
@@ -88,5 +89,5 unix:QMAKE_DISTCLEAN += -r \
88 89 $$CHART_BUILD_LIB_DIR
89 90 win32:QMAKE_DISTCLEAN += /Q \
90 91 $$CHART_BUILD_HEADER_DIR \
91 $$CHART_BUILD_LIB_DIR
92 $$CHART_BUILD_LIB_DIR
92 93
General Comments 0
You need to be logged in to leave comments. Login now