##// END OF EJS Templates
Fix previous broken commit
Michal Klocek -
r145:251cad7c49ee
parent child
Show More
@@ -1,7 +1,7
1 1 #include <QApplication>
2 2 #include <QMainWindow>
3 3 #include <qchartview.h>
4 #include <qxychartseries.h>
4 #include <qlinechartseries.h>
5 5 #include <qchart.h>
6 6 #include <cmath>
7 7
@@ -15,11 +15,11 int main(int argc, char *argv[])
15 15
16 16 QMainWindow window;
17 17
18 QXYChartSeries* series0 = QXYChartSeries::create();
18 QLineChartSeries* series0 = QLineChartSeries::create();
19 19 QPen blue(Qt::blue);
20 20 blue.setWidth(3);
21 21 series0->setPen(blue);
22 QXYChartSeries* series1 = QXYChartSeries::create();
22 QLineChartSeries* series1 = QLineChartSeries::create();
23 23 QPen red(Qt::red);
24 24 red.setWidth(3);
25 25 series1->setPen(red);
@@ -8,7 +8,7
8 8
9 9 TARGET = dynamicLineChart
10 10 TEMPLATE = app
11 QT += core gui
11 QT += core gui opengl
12 12 SOURCES += main.cpp
13 13 HEADERS += wavegenerator.h
14 14
@@ -1,10 +1,11
1 1 #include <QApplication>
2 2 #include <QMainWindow>
3 3 #include <qchartview.h>
4 #include <qxychartseries.h>
4 #include <qlinechartseries.h>
5 5 #include <qchart.h>
6 6 #include <cmath>
7 7 #include "wavegenerator.h"
8 #include <QGLWidget>
8 9
9 10 int main(int argc, char *argv[])
10 11 {
@@ -12,11 +13,11 int main(int argc, char *argv[])
12 13
13 14 QMainWindow window;
14 15
15 QXYChartSeries* series0 = QXYChartSeries::create();
16 QLineChartSeries* series0 = QLineChartSeries::create();
16 17 QPen blue(Qt::blue);
17 18 blue.setWidth(3);
18 19 series0->setPen(blue);
19 QXYChartSeries* series1 = QXYChartSeries::create();
20 QLineChartSeries* series1 = QLineChartSeries::create();
20 21 QPen red(Qt::red);
21 22 red.setWidth(3);
22 23 series1->setPen(red);
@@ -25,6 +26,7 int main(int argc, char *argv[])
25 26
26 27 QChartView* chartView = new QChartView(&window);
27 28
29 chartView->setViewport( new QGLWidget() );
28 30 chartView->setRenderHint(QPainter::Antialiasing);
29 31 chartView->setTitle("This is wave generator buahha.");
30 32 chartView->addSeries(series0);
@@ -2,7 +2,7
2 2 #include <QTime>
3 3 #include <QObject>
4 4 #include <cmath>
5 #include <qxychartseries.h>
5 #include <qlinechartseries.h>
6 6
7 7 QTCOMMERCIALCHART_USE_NAMESPACE
8 8
@@ -14,7 +14,7 class WaveGenerator: public QObject
14 14 Q_OBJECT
15 15
16 16 public:
17 WaveGenerator(QXYChartSeries* series1, QXYChartSeries* series2) :
17 WaveGenerator(QLineChartSeries* series1, QLineChartSeries* series2) :
18 18 m_series1(series1),
19 19 m_series2(series2),
20 20 m_wave(0),
@@ -52,8 +52,8 public slots:
52 52 }
53 53
54 54 private:
55 QXYChartSeries* m_series1;
56 QXYChartSeries* m_series2;
55 QLineChartSeries* m_series1;
56 QLineChartSeries* m_series2;
57 57 int m_wave;
58 58 qreal m_step;
59 59 QTimer m_timer;
@@ -1,7 +1,7
1 1 #include <QApplication>
2 2 #include <QMainWindow>
3 3 #include <qchartview.h>
4 #include <qxychartseries.h>
4 #include <qlinechartseries.h>
5 5 #include <qchart.h>
6 6 #include <cmath>
7 7
@@ -15,11 +15,11 int main(int argc, char *argv[])
15 15
16 16 QMainWindow window;
17 17
18 QXYChartSeries* series0 = QXYChartSeries::create();
18 QLineChartSeries* series0 = QLineChartSeries::create();
19 19 QPen blue(Qt::blue);
20 20 blue.setWidth(3);
21 21 series0->setPen(blue);
22 QXYChartSeries* series1 = QXYChartSeries::create();
22 QLineChartSeries* series1 = QLineChartSeries::create();
23 23 QPen red(Qt::red);
24 24 red.setWidth(3);
25 25 series1->setPen(red);
@@ -1,7 +1,7
1 1 #include "chartwidget.h"
2 2 #include <QApplication>
3 3 #include <QMainWindow>
4 #include <qxychartseries.h>
4 #include <qlinechartseries.h>
5 5 #include <cmath>
6 6
7 7 QTCOMMERCIALCHART_USE_NAMESPACE
@@ -14,11 +14,11 int main(int argc, char *argv[])
14 14
15 15 QMainWindow window;
16 16
17 QXYChartSeries* series0 = QXYChartSeries::create();
17 QLineChartSeries* series0 = QLineChartSeries::create();
18 18 QPen blue(Qt::blue);
19 19 blue.setWidth(3);
20 20 series0->setPen(blue);
21 QXYChartSeries* series1 = QXYChartSeries::create();
21 QLineChartSeries* series1 = QLineChartSeries::create();
22 22 QPen red(Qt::red);
23 23 red.setWidth(3);
24 24 series1->setPen(red);
@@ -1,6 +1,6
1 1 #include "declarativeseries.h"
2 2 #include "declarativechart.h"
3 #include <qxychartseries.h>
3 #include <qlinechartseries.h>
4 4 #include <cmath>
5 5 #include <QDebug>
6 6
@@ -44,9 +44,9 void DeclarativeSeries::initSeries()
44 44
45 45 switch (m_seriesType) {
46 46 case SeriesTypeLine: {
47 m_series = QXYChartSeries::create(this);
47 m_series = QLineChartSeries::create(this);
48 48 for (qreal i(0.0); i < 100.0; i += 1.0)
49 ((QXYChartSeries *)m_series)->add(i, i);
49 ((QLineChartSeries *)m_series)->add(i, i);
50 50 chart->addSeries(m_series);
51 51 break;
52 52 }
@@ -13,27 +13,14 AxisItem::AxisItem(QChartAxis* axis,AxisType type,QGraphicsItem* parent) :
13 13 m_ticks(4),
14 14 m_type(type)
15 15 {
16 //initial initialization
17 handleAxisChanged();
16 18 }
17 19
18 20 AxisItem::~AxisItem()
19 21 {
20 22 }
21 23
22 void AxisItem::setLength(int length)
23 {
24 QPainterPath path;
25 path.moveTo(QPointF(0,0));
26 path.lineTo(length,0);
27 // path.lineTo(length-4,0);
28 // path.lineTo(length,3);
29 // path.lineTo(length-4,6);
30 // path.lineTo(length-4,4);
31 // path.lineTo(0,4);
32 // path.lineTo(0,2);
33 m_path=path;
34 update();
35 }
36
37 24 QRectF AxisItem::boundingRect() const
38 25 {
39 26 return m_rect;
@@ -97,8 +84,10 void AxisItem::createItems()
97 84
98 85 if(!m_rect.isValid()) return;
99 86
100 if(m_type==X_AXIS) {
101
87 switch (m_type)
88 {
89 case X_AXIS:
90 {
102 91 const qreal deltaX = m_rect.width() / m_ticks;
103 92
104 93 for (int i = 0; i <= m_ticks; ++i) {
@@ -116,9 +105,10 void AxisItem::createItems()
116 105 m_labels<<text;
117 106 }
118 107 }
108 break;
119 109
120 if(m_type==Y_AXIS) {
121
110 case Y_AXIS:
111 {
122 112 const qreal deltaY = m_rect.height()/ m_ticks;
123 113
124 114 for (int j = 0; j <= m_ticks; ++j) {
@@ -131,15 +121,17 void AxisItem::createItems()
131 121 m_grid<<new QGraphicsLineItem(m_rect.left() , y, m_rect.right(), y,this);
132 122 QGraphicsSimpleTextItem* text = new QGraphicsSimpleTextItem(QString::number(label),this);
133 123 QPointF center = text->boundingRect().center();
134
135 124 text->setPos(m_rect.left() - text->boundingRect().width() - LABEL_PADDING , y-center.y());
136 //text->rotate(-45);
125
137 126 m_labels<<text;
138 127
139 128 }
140 129 }
141
142 //painter->drawRect(m_rect.adjusted(0, 0, -1, -1));
130 break;
131 default:
132 qDebug()<<"Unknown axis type";
133 break;
134 }
143 135 }
144 136
145 137 void AxisItem::clear()
@@ -34,8 +34,6 private:
34 34 void clear();
35 35
36 36 public:
37 void setLength(int length);
38 void setWidth(int width);
39 37 AxisType axisType() const {return m_type;};
40 38
41 39 protected:
@@ -49,9 +47,6 private:
49 47 AxisType m_type;
50 48 int m_ticks;
51 49 Domain m_domain;
52
53
54
55 50 QRectF m_rect;
56 51
57 52 QPainterPath m_path;
@@ -1,6 +1,6
1 1 #include "chartdataset_p.h"
2 2 //series
3 #include "qxychartseries.h"
3 #include "qlinechartseries.h"
4 4 #include "barchartseries.h"
5 5 #include "stackedbarchartseries.h"
6 6 #include "percentbarchartseries.h"
@@ -38,7 +38,7 void ChartDataSet::addSeries(QChartSeries* series)
38 38 {
39 39 case QChartSeries::SeriesTypeLine: {
40 40
41 QXYChartSeries* xyseries = static_cast<QXYChartSeries*>(series);
41 QLineChartSeries* xyseries = static_cast<QLineChartSeries*>(series);
42 42
43 43 for (int i = 0; i < xyseries->count(); i++)
44 44 {
@@ -7,20 +7,17
7 7 #include "barchartseries.h"
8 8 #include "stackedbarchartseries.h"
9 9 #include "percentbarchartseries.h"
10 #include "qxychartseries.h"
10 #include "qlinechartseries.h"
11 11 #include "qpieseries.h"
12 12 //items
13 13 #include "axisitem_p.h"
14 14 #include "bargroup.h"
15 15 #include "stackedbargroup.h"
16 #include "xylinechartitem_p.h"
16 #include "linechartitem_p.h"
17 17 #include "percentbargroup.h"
18 18 #include "linechartanimationitem_p.h"
19 19 #include "piepresentation.h"
20 20
21 #include <QAbstractAnimation>
22 #include <QPropertyAnimation>
23
24 21 QTCOMMERCIALCHART_BEGIN_NAMESPACE
25 22
26 23 ChartPresenter::ChartPresenter(QChart* chart,ChartDataSet* dataset):QObject(chart),
@@ -83,8 +80,8 void ChartPresenter::handleSeriesAdded(QChartSeries* series)
83 80 switch(series->type())
84 81 {
85 82 case QChartSeries::SeriesTypeLine: {
86 QXYChartSeries* lineSeries = static_cast<QXYChartSeries*>(series);
87 XYLineChartItem* item = new LineChartAnimationItem(this,lineSeries,m_chart);
83 QLineChartSeries* lineSeries = static_cast<QLineChartSeries*>(series);
84 LineChartItem* item = new LineChartAnimationItem(this,lineSeries,m_chart);
88 85 m_chartTheme->decorate(item,lineSeries,m_chartItems.count());
89 86 QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),item,SLOT(handleGeometryChanged(const QRectF&)));
90 87 QObject::connect(m_dataset,SIGNAL(domainChanged(const Domain&)),item,SLOT(handleDomainChanged(const Domain&)));
@@ -6,12 +6,12
6 6 #include "barchartseries.h"
7 7 #include "stackedbarchartseries.h"
8 8 #include "percentbarchartseries.h"
9 #include "qxychartseries.h"
9 #include "qlinechartseries.h"
10 10 //items
11 11 #include "axisitem_p.h"
12 12 #include "bargroup.h"
13 13 #include "stackedbargroup.h"
14 #include "xylinechartitem_p.h"
14 #include "linechartitem_p.h"
15 15 #include "percentbargroup.h"
16 16
17 17 //themes
@@ -74,8 +74,8 void ChartTheme::decorate(ChartItem* item, QChartSeries* series,int count)
74 74 switch(series->type())
75 75 {
76 76 case QChartSeries::SeriesTypeLine: {
77 QXYChartSeries* s = static_cast<QXYChartSeries*>(series);
78 XYLineChartItem* i = static_cast<XYLineChartItem*>(item);
77 QLineChartSeries* s = static_cast<QLineChartSeries*>(series);
78 LineChartItem* i = static_cast<LineChartItem*>(item);
79 79 decorate(i,s,count);
80 80 break;
81 81 }
@@ -104,7 +104,7 void ChartTheme::decorate(ChartItem* item, QChartSeries* series,int count)
104 104
105 105 }
106 106
107 void ChartTheme::decorate(XYLineChartItem* item, QXYChartSeries* series,int count)
107 void ChartTheme::decorate(LineChartItem* item, QLineChartSeries* series,int count)
108 108 {
109 109 item->setPen(series->pen());
110 110 }
@@ -9,8 +9,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
9 9
10 10 class ChartItem;
11 11 class QChartSeries;
12 class XYLineChartItem;
13 class QXYChartSeries;
12 class LineChartItem;
13 class QLineChartSeries;
14 14 class BarGroup;
15 15 class BarChartSeries;
16 16 class StackedBarGroup;
@@ -26,7 +26,7 public:
26 26 static ChartTheme* createTheme(QChart::ChartThemeId theme);
27 27 void decorate(QChart* chart);
28 28 void decorate(ChartItem* item, QChartSeries* series,int count);
29 void decorate(XYLineChartItem* item, QXYChartSeries*, int count);
29 void decorate(LineChartItem* item, QLineChartSeries*, int count);
30 30 void decorate(BarGroup* item, BarChartSeries* series,int count);
31 31 void decorate(StackedBarGroup* item, StackedBarChartSeries* series,int count);
32 32 void decorate(PercentBarGroup* item, PercentBarChartSeries* series,int count);
@@ -1,5 +1,5
1 1 #include "linechartanimationitem_p.h"
2 #include "xylinechartitem_p.h"
2 #include "linechartitem_p.h"
3 3 #include <QPropertyAnimation>
4 4
5 5 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -7,8 +7,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
7 7 const static int duration = 500;
8 8
9 9
10 LineChartAnimationItem::LineChartAnimationItem(ChartPresenter* presenter, QXYChartSeries* series,QGraphicsItem *parent):
11 XYLineChartItem(presenter,series,parent)
10 LineChartAnimationItem::LineChartAnimationItem(ChartPresenter* presenter, QLineChartSeries* series,QGraphicsItem *parent):
11 LineChartItem(presenter,series,parent)
12 12 {
13 13
14 14 }
@@ -44,7 +44,7 void LineChartAnimationItem::aw_addPoints(int points)
44 44 {
45 45 int index = count();
46 46 for(int i = index;i< points ;i++){
47 XYLineChartItem::addPoint(m_data.at(i));
47 LineChartItem::addPoint(m_data.at(i));
48 48 }
49 49 updateGeometry();
50 50 update();
@@ -52,7 +52,7 void LineChartAnimationItem::aw_addPoints(int points)
52 52
53 53 void LineChartAnimationItem::aw_setPoint(int index,const QPointF& point)
54 54 {
55 XYLineChartItem::setPoint(index,point);
55 LineChartItem::setPoint(index,point);
56 56 updateGeometry();
57 57 update();
58 58 }
@@ -1,20 +1,20
1 #ifndef XYLINEPRESENTER_P_H_
2 #define XYLINEPRESENTER_P_H_
1 #ifndef LINECHARTANIMATIONITEM_P_H_
2 #define LINECHARTANIMATIONITEM_P_H_
3 3
4 4 #include "qchartglobal.h"
5 #include "xylinechartitem_p.h"
5 #include "linechartitem_p.h"
6 6 #include "domain_p.h"
7 7
8 8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
9 9
10 class XYLineChartItem;
10 class LineChartItem;
11 11
12 class LineChartAnimationItem : public XYLineChartItem {
12 class LineChartAnimationItem : public LineChartItem {
13 13 Q_OBJECT
14 14 Q_PROPERTY(int a_addPoints READ ar_addPoints WRITE aw_addPoints);
15 15 // Q_PROPERTY(QPointF a_setPoint READ ar_setPoint WRITE aw_setPoint);
16 16 public:
17 LineChartAnimationItem(ChartPresenter* presenter, QXYChartSeries *series, QGraphicsItem *parent = 0);
17 LineChartAnimationItem(ChartPresenter* presenter, QLineChartSeries *series, QGraphicsItem *parent = 0);
18 18 virtual ~LineChartAnimationItem();
19 19
20 20 void addPoints(const QVector<QPointF>& points);
@@ -52,4 +52,4 public:
52 52
53 53 QTCOMMERCIALCHART_END_NAMESPACE
54 54
55 #endif /* XYLINEPRESENTER_P_H_ */
55 #endif
@@ -15,7 +15,7
15 15 #include "barchartseries.h"
16 16 #include "stackedbarchartseries.h"
17 17 #include "percentbarchartseries.h"
18 #include "qxychartseries.h"
18 #include "qlinechartseries.h"
19 19
20 20 #include <QGraphicsScene>
21 21 #include <QGraphicsSceneResizeEvent>
@@ -47,7 +47,7 QChartSeries* QChart::createSeries(QChartSeries::QChartSeriesType type)
47 47
48 48 switch (type) {
49 49 case QChartSeries::SeriesTypeLine: {
50 series = QXYChartSeries::create();
50 series = QLineChartSeries::create();
51 51 break;
52 52 }
53 53 case QChartSeries::SeriesTypeBar: {
@@ -2,7 +2,7
2 2 #include "qchartseries.h"
3 3
4 4 #include "barchartseries.h"
5 #include "qxychartseries.h"
5 #include "qlinechartseries.h"
6 6
7 7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
8 8
@@ -12,7 +12,7 QChartSeries* QChartSeries::create(QChartSeriesType type, QObject* parent)
12 12 // TODO: Other types
13 13 switch (type) {
14 14 case QChartSeries::SeriesTypeLine: {
15 QXYChartSeries* s = QXYChartSeries::create(parent); // TODO: do we need create method for derived implementations?
15 QLineChartSeries* s = QLineChartSeries::create(parent); // TODO: do we need create method for derived implementations?
16 16 return s;
17 17 }
18 18 case QChartSeries::SeriesTypePie: {
@@ -1,18 +1,12
1 !include( ../common.pri ) {
2 error( Couldn't find the common.pri file! )
3 }
4
1 !include( ../common.pri ):error( Couldn't find the common.pri file! )
5 2 TARGET = QtCommercialChart
6 3 DESTDIR = $$CHART_BUILD_LIB_DIR
7 4 TEMPLATE = lib
8 5 QT += core \
9 6 gui
10
11 7 CONFIG += debug_and_release
12 8 CONFIG(debug, debug|release):TARGET = QtCommercialChartd
13
14 SOURCES += \
15 barchart/barchartseries.cpp \
9 SOURCES += barchart/barchartseries.cpp \
16 10 barchart/bargroup.cpp \
17 11 barchart/bar.cpp \
18 12 barchart/stackedbarchartseries.cpp \
@@ -20,12 +14,15 SOURCES += \
20 14 barchart/percentbarchartseries.cpp \
21 15 barchart/percentbargroup.cpp \
22 16 barchart/barlabel.cpp \
23 xylinechart/qxychartseries.cpp \
24 xylinechart/xylinechartitem.cpp \
25 xylinechart/linechartanimationitem.cpp \
17 linechart/linechartanimationitem.cpp \
18 linechart/linechartitem.cpp \
19 linechart/qlinechartseries.cpp \
26 20 piechart/qpieseries.cpp \
27 21 piechart/pieslice.cpp \
28 22 piechart/piepresentation.cpp \
23 barchart/separator.cpp \
24 barchart/bargroupbase.cpp \
25 barchart/barchartseriesbase.cpp \
29 26 plotdomain.cpp \
30 27 qscatterseries.cpp \
31 28 qchart.cpp \
@@ -34,18 +31,11 SOURCES += \
34 31 qchartseries.cpp \
35 32 qchartaxis.cpp \
36 33 charttheme.cpp \
37 barchart/separator.cpp \
38 barchart/bargroupbase.cpp \
39 barchart/barchartseriesbase.cpp \
40 34 chartdataset.cpp \
41 35 chartpresenter.cpp \
42 36 domain.cpp
43
44
45
46 PRIVATE_HEADERS += \
47 xylinechart/xylinechartitem_p.h \
48 xylinechart/linechartanimationitem_p.h \
37 PRIVATE_HEADERS += linechart/linechartitem_p.h \
38 linechart/linechartanimationitem_p.h \
49 39 barchart/barlabel_p.h \
50 40 barchart/bar_p.h \
51 41 barchart/separator_p.h \
@@ -59,13 +49,7 PRIVATE_HEADERS += \
59 49 chartdataset_p.h \
60 50 chartpresenter_p.h \
61 51 domain_p.h
62
63 PUBLIC_HEADERS += \
64 qchartseries.h \
65 qscatterseries.h \
66 qchart.h \
67 qchartglobal.h \
68 xylinechart/qxychartseries.h \
52 PUBLIC_HEADERS += linechart/qlinechartseries.h \
69 53 barchart/barchartseries.h \
70 54 barchart/bargroup.h \
71 55 barchart/stackedbarchartseries.h \
@@ -75,67 +59,56 PUBLIC_HEADERS += \
75 59 barchart/barchartseriesbase.h \
76 60 barchart/bargroupbase.h \
77 61 piechart/qpieseries.h \
62 qchartseries.h \
63 qscatterseries.h \
64 qchart.h \
65 qchartglobal.h \
78 66 qchartview.h \
79 67 qchartaxis.h
80
81 THEMES += \
82 themes/chartthemeicy_p.h \
68 THEMES += themes/chartthemeicy_p.h \
83 69 themes/chartthemegrayscale_p.h \
84 70 themes/chartthemescientific_p.h \
85 themes/chartthemevanilla_p.h \
86
87
71 themes/chartthemevanilla_p.h
88 72 HEADERS += $$PUBLIC_HEADERS
89 73 HEADERS += $$PRIVATE_HEADERS
90 74 HEADERS += $$THEMES
91
92 INCLUDEPATH += xylinechart \
75 INCLUDEPATH += linechart \
93 76 barchart \
94 77 piechart \
95 78 themes \
96 79 .
97
98 80 OBJECTS_DIR = $$CHART_BUILD_DIR/lib
99 81 MOC_DIR = $$CHART_BUILD_DIR/lib
100 82 UI_DIR = $$CHART_BUILD_DIR/lib
101 83 RCC_DIR = $$CHART_BUILD_DIR/lib
102
103
104 84 DEFINES += QTCOMMERCIALCHART_LIBRARY
105
106 85 public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
107 86 public_headers.files = $$PUBLIC_HEADERS
108 87 target.path = $$[QT_INSTALL_LIBS]
109 88 INSTALLS += target \
110 89 public_headers
111
112
113 90 install_build_headers.name = bild_headers
114 91 install_build_headers.output = $$CHART_BUILD_HEADER_DIR/${QMAKE_FILE_BASE}.h
115 92 install_build_headers.input = PUBLIC_HEADERS
116 install_build_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} $$CHART_BUILD_HEADER_DIR
117 install_build_headers.CONFIG += target_predeps no_link
93 install_build_headers.commands = $$QMAKE_COPY \
94 ${QMAKE_FILE_NAME} \
95 $$CHART_BUILD_HEADER_DIR
96 install_build_headers.CONFIG += target_predeps \
97 no_link
118 98 QMAKE_EXTRA_COMPILERS += install_build_headers
119
120 99 chartversion.target = qchartversion_p.h
121 chartversion.commands = @echo "build_time" > $$chartversion.target;
122 chartversion.depends = $$HEADERS $$SOURCES
100 chartversion.commands = @echo \
101 "build_time" \
102 > \
103 $$chartversion.target;
104 chartversion.depends = $$HEADERS \
105 $$SOURCES
123 106 PRE_TARGETDEPS += qchartversion_p.h
124 107 QMAKE_CLEAN+= qchartversion_p.h
125 108 QMAKE_EXTRA_TARGETS += chartversion
126
127 unix:QMAKE_DISTCLEAN += -r $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR
128 win32:QMAKE_DISTCLEAN += /Q $$CHART_BUILD_HEADER_DIR $$CHART_BUILD_LIB_DIR
129
130
131
132
133
134
135
136
137
138
139
140
141
109 unix:QMAKE_DISTCLEAN += -r \
110 $$CHART_BUILD_HEADER_DIR \
111 $$CHART_BUILD_LIB_DIR
112 win32:QMAKE_DISTCLEAN += /Q \
113 $$CHART_BUILD_HEADER_DIR \
114 $$CHART_BUILD_LIB_DIR
@@ -2,7 +2,7
2 2 #include "dataseriedialog.h"
3 3 #include "qchartseries.h"
4 4 #include "qpieseries.h"
5 #include <qxychartseries.h>
5 #include <qlinechartseries.h>
6 6 #include <barchartseries.h>
7 7 #include <QPushButton>
8 8 #include <QComboBox>
@@ -223,7 +223,7 void MainWidget::addSeries(QString series, QString data)
223 223 // lineSeries->add(x.at(i), y.at(i));
224 224 // }
225 225 //Q_ASSERT(newSeries->setData(x, y));
226 QXYChartSeries* series0 = QXYChartSeries::create();
226 QLineChartSeries* series0 = QLineChartSeries::create();
227 227 for (int i(0); i < x.count() && i < y.count(); i++)
228 228 series0->add(x.at(i), y.at(i));
229 229 m_chartWidget->addSeries(series0);
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now