##// END OF EJS Templates
Removed unused slot from declarative series
Tero Ahola -
r842:3fe7b44cf49b
parent child
Show More
@@ -1,57 +1,51
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #include "declarativelineseries.h"
22 22 #include "declarativechart.h"
23 23 #include "qchart.h"
24 24 #include "qlineseries.h"
25 25
26 26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27 27
28 28 DeclarativeLineSeries::DeclarativeLineSeries(QObject *parent) :
29 29 QLineSeries(parent)
30 30 {
31 31 }
32 32
33 33 void DeclarativeLineSeries::componentComplete()
34 34 {
35 35 DeclarativeChart *declarativeChart = qobject_cast<DeclarativeChart *>(parent());
36 36
37 37 if (declarativeChart) {
38 38 QChart *chart = qobject_cast<QChart *>(declarativeChart->m_chart);
39 39 Q_ASSERT(chart);
40 40 chart->addSeries(this);
41 41 }
42 42 }
43 43
44 44 QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeLineSeries::points()
45 45 {
46 46 return QDeclarativeListProperty<DeclarativeXyPoint>(this, 0, &DeclarativeXySeries::appendPoints);
47 47 }
48 48
49 void DeclarativeLineSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
50 DeclarativeXyPoint *element)
51 {
52 DeclarativeXySeries::appendPoints(list, element);
53 }
54
55 49 #include "moc_declarativelineseries.cpp"
56 50
57 51 QTCOMMERCIALCHART_END_NAMESPACE
@@ -1,50 +1,46
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef DECLARATIVELINESERIES_H
22 22 #define DECLARATIVELINESERIES_H
23 23
24 24 #include "qchartglobal.h"
25 25 #include "qlineseries.h"
26 26 #include "declarativexyseries.h"
27 27 #include <QDeclarativeParserStatus>
28 28
29 29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 30
31 31 class DeclarativeLineSeries : public QLineSeries, public DeclarativeXySeries
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(QDeclarativeListProperty<DeclarativeXyPoint> points READ points)
35 35
36 36 public:
37 37 explicit DeclarativeLineSeries(QObject *parent = 0);
38 38
39 39 public:
40 40 void componentComplete();
41 41 QDeclarativeListProperty<DeclarativeXyPoint> points();
42
43 public Q_SLOTS:
44 static void appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
45 DeclarativeXyPoint *element);
46 42 };
47 43
48 44 QTCOMMERCIALCHART_END_NAMESPACE
49 45
50 46 #endif // DECLARATIVELINESERIES_H
@@ -1,58 +1,52
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #include "declarativescatterseries.h"
22 22 #include "declarativechart.h"
23 23 #include "qchart.h"
24 24 #include "qscatterseries.h"
25 25
26 26 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27 27
28 28 DeclarativeScatterSeries::DeclarativeScatterSeries(QObject *parent) :
29 29 QScatterSeries(parent)
30 30 {
31 31 }
32 32
33 33 void DeclarativeScatterSeries::componentComplete()
34 34 {
35 35 DeclarativeChart *declarativeChart = qobject_cast<DeclarativeChart *>(parent());
36 36
37 37 if (declarativeChart) {
38 38 QChart *chart = qobject_cast<QChart *>(declarativeChart->m_chart);
39 39 Q_ASSERT(chart);
40 40 qDebug() << "chart:" << chart;
41 41 chart->addSeries(this);
42 42 }
43 43 }
44 44
45 45 QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeScatterSeries::points()
46 46 {
47 47 return QDeclarativeListProperty<DeclarativeXyPoint>(this, 0, &DeclarativeXySeries::appendPoints);
48 48 }
49 49
50 void DeclarativeScatterSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
51 DeclarativeXyPoint *element)
52 {
53 DeclarativeXySeries::appendPoints(list, element);
54 }
55
56 50 #include "moc_declarativescatterseries.cpp"
57 51
58 52 QTCOMMERCIALCHART_END_NAMESPACE
@@ -1,50 +1,46
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef DECLARATIVESCATTERSERIES_H
22 22 #define DECLARATIVESCATTERSERIES_H
23 23
24 24 #include "qchartglobal.h"
25 25 #include "qscatterseries.h"
26 26 #include "declarativexyseries.h"
27 27 #include <QDeclarativeParserStatus>
28 28
29 29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 30
31 31 class DeclarativeScatterSeries : public QScatterSeries, public DeclarativeXySeries
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(QDeclarativeListProperty<DeclarativeXyPoint> points READ points)
35 35
36 36 public:
37 37 explicit DeclarativeScatterSeries(QObject *parent = 0);
38 38
39 39 public:
40 40 void componentComplete();
41 41 QDeclarativeListProperty<DeclarativeXyPoint> points();
42
43 public Q_SLOTS:
44 static void appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
45 DeclarativeXyPoint *element);
46 42 };
47 43
48 44 QTCOMMERCIALCHART_END_NAMESPACE
49 45
50 46 #endif // DECLARATIVESCATTERSERIES_H
@@ -1,56 +1,50
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #include "declarativesplineseries.h"
22 22 #include "declarativechart.h"
23 23 #include "qchart.h"
24 24
25 25 QTCOMMERCIALCHART_BEGIN_NAMESPACE
26 26
27 27 DeclarativeSplineSeries::DeclarativeSplineSeries(QObject *parent) :
28 28 QSplineSeries(parent)
29 29 {
30 30 }
31 31
32 32 void DeclarativeSplineSeries::componentComplete()
33 33 {
34 34 DeclarativeChart *declarativeChart = qobject_cast<DeclarativeChart *>(parent());
35 35
36 36 if (declarativeChart) {
37 37 QChart *chart = qobject_cast<QChart *>(declarativeChart->m_chart);
38 38 Q_ASSERT(chart);
39 39 chart->addSeries(this);
40 40 }
41 41 }
42 42
43 43 QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeSplineSeries::points()
44 44 {
45 45 return QDeclarativeListProperty<DeclarativeXyPoint>(this, 0, &DeclarativeXySeries::appendPoints);
46 46 }
47 47
48 void DeclarativeSplineSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
49 DeclarativeXyPoint *element)
50 {
51 DeclarativeXySeries::appendPoints(list, element);
52 }
53
54 48 #include "moc_declarativesplineseries.cpp"
55 49
56 50 QTCOMMERCIALCHART_END_NAMESPACE
@@ -1,50 +1,46
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef DECLARATIVESPLINESERIES_H
22 22 #define DECLARATIVESPLINESERIES_H
23 23
24 24 #include "qchartglobal.h"
25 25 #include "qsplineseries.h"
26 26 #include "declarativexyseries.h"
27 27 #include <QDeclarativeParserStatus>
28 28
29 29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 30
31 31 class DeclarativeSplineSeries : public QSplineSeries, public DeclarativeXySeries
32 32 {
33 33 Q_OBJECT
34 34 Q_PROPERTY(QDeclarativeListProperty<DeclarativeXyPoint> points READ points)
35 35
36 36 public:
37 37 explicit DeclarativeSplineSeries(QObject *parent = 0);
38 38
39 39 public:
40 40 virtual void componentComplete();
41 41 QDeclarativeListProperty<DeclarativeXyPoint> points();
42
43 public Q_SLOTS:
44 static void appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
45 DeclarativeXyPoint *element);
46 42 };
47 43
48 44 QTCOMMERCIALCHART_END_NAMESPACE
49 45
50 46 #endif // DECLARATIVESPLINESERIES_H
General Comments 0
You need to be logged in to leave comments. Login now