diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-06 09:22:20 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-09-06 11:22:58 +0300 |
commit | 83d5e7fc85cc07fb180498876d1a346573f747e7 (patch) | |
tree | c451bf6f083a49fe21244c60b2bb9912c28407cb /examples/charts | |
parent | 144474348803564eaa7bb4d17bd609d146e74f9f (diff) | |
parent | bf26aa9d15e525fdcf6fd3f59268418533f06790 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
examples/charts/charts.pro
src/charts/glwidget.cpp
src/chartsqml2/declarativechart.cpp
src/chartsqml2/declarativeopenglrendernode.cpp
tests/auto/auto.pro
Change-Id: If909b4b13844c474bf4898a66ee01ac111d0a248
Diffstat (limited to 'examples/charts')
55 files changed, 503 insertions, 374 deletions
diff --git a/examples/charts/areachart/areachart.pro b/examples/charts/areachart/areachart.pro index e8e1a074..96e138ab 100644 --- a/examples/charts/areachart/areachart.pro +++ b/examples/charts/areachart/areachart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = areachart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/areachart +INSTALLS += target diff --git a/examples/charts/audio/audio.pro b/examples/charts/audio/audio.pro index 6a3b6917..c6df9be0 100644 --- a/examples/charts/audio/audio.pro +++ b/examples/charts/audio/audio.pro @@ -1,15 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts multimedia -QT += multimedia - -TARGET = audio -TEMPLATE = app +HEADERS += \ + widget.h \ + xyseriesiodevice.h -SOURCES += main.cpp\ - widget.cpp \ +SOURCES += \ + main.cpp\ + widget.cpp \ xyseriesiodevice.cpp -HEADERS += widget.h \ - xyseriesiodevice.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/audio +INSTALLS += target diff --git a/examples/charts/barchart/barchart.pro b/examples/charts/barchart/barchart.pro index 14db3c88..eaa7a037 100644 --- a/examples/charts/barchart/barchart.pro +++ b/examples/charts/barchart/barchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = barchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/barchart +INSTALLS += target diff --git a/examples/charts/barmodelmapper/barmodelmapper.pro b/examples/charts/barmodelmapper/barmodelmapper.pro index 91b8f367..45a5e224 100644 --- a/examples/charts/barmodelmapper/barmodelmapper.pro +++ b/examples/charts/barmodelmapper/barmodelmapper.pro @@ -1,16 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -QT += core gui +HEADERS += \ + customtablemodel.h \ + tablewidget.h -TARGET = barmodelmapper -TEMPLATE = app +SOURCES += \ + customtablemodel.cpp \ + main.cpp \ + tablewidget.cpp - -SOURCES += main.cpp\ - tablewidget.cpp \ - customtablemodel.cpp - -HEADERS += tablewidget.h \ - customtablemodel.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/barmodelmapper +INSTALLS += target diff --git a/examples/charts/boxplotchart/boxplotchart.pro b/examples/charts/boxplotchart/boxplotchart.pro index c2483511..10ed4515 100644 --- a/examples/charts/boxplotchart/boxplotchart.pro +++ b/examples/charts/boxplotchart/boxplotchart.pro @@ -1,13 +1,14 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = boxplotchart -SOURCES += main.cpp \ - boxdatareader.cpp +HEADERS += \ + boxdatareader.h + +SOURCES += \ + boxdatareader.cpp \ + main.cpp \ RESOURCES += \ boxplotdata.qrc -HEADERS += \ - boxdatareader.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/boxplotchart +INSTALLS += target diff --git a/examples/charts/callout/callout.cpp b/examples/charts/callout/callout.cpp index 2c843393..bb37802a 100644 --- a/examples/charts/callout/callout.cpp +++ b/examples/charts/callout/callout.cpp @@ -32,15 +32,17 @@ #include <QtGui/QFontMetrics> #include <QtWidgets/QGraphicsSceneMouseEvent> #include <QtGui/QMouseEvent> +#include <QtCharts/QChart> -Callout::Callout(QGraphicsItem * parent): - QGraphicsItem(parent) +Callout::Callout(QChart *chart): + QGraphicsItem(chart), + m_chart(chart) { } QRectF Callout::boundingRect() const { - QPointF anchor = mapFromParent(m_anchor); + QPointF anchor = mapFromParent(m_chart->mapToPosition(m_anchor)); QRectF rect; rect.setLeft(qMin(m_rect.left(), anchor.x())); rect.setRight(qMax(m_rect.right(), anchor.x())); @@ -56,7 +58,7 @@ void Callout::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q QPainterPath path; path.addRoundedRect(m_rect, 5, 5); - QPointF anchor = mapFromParent(m_anchor); + QPointF anchor = mapFromParent(m_chart->mapToPosition(m_anchor)); if (!m_rect.contains(anchor)) { QPointF point1, point2; @@ -88,7 +90,7 @@ void Callout::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q point2.setY(y2); path.moveTo(point1); - path.lineTo(mapFromParent(m_anchor)); + path.lineTo(anchor); path.lineTo(point2); path = path.simplified(); } @@ -126,3 +128,9 @@ void Callout::setAnchor(QPointF point) { m_anchor = point; } + +void Callout::updateGeometry() +{ + prepareGeometryChange(); + setPos(m_chart->mapToPosition(m_anchor) + QPoint(10, -50)); +} diff --git a/examples/charts/callout/callout.h b/examples/charts/callout/callout.h index 35de08d5..67cc76ff 100644 --- a/examples/charts/callout/callout.h +++ b/examples/charts/callout/callout.h @@ -30,6 +30,7 @@ #ifndef CALLOUT_H #define CALLOUT_H +#include <QtCharts/QChartGlobal> #include <QtWidgets/QGraphicsItem> #include <QtGui/QFont> @@ -37,13 +38,20 @@ QT_BEGIN_NAMESPACE class QGraphicsSceneMouseEvent; QT_END_NAMESPACE +QT_CHARTS_BEGIN_NAMESPACE +class QChart; +QT_CHARTS_END_NAMESPACE + +QT_CHARTS_USE_NAMESPACE + class Callout : public QGraphicsItem { public: - Callout(QGraphicsItem * parent = 0); + Callout(QChart *parent); void setText(const QString &text); void setAnchor(QPointF point); + void updateGeometry(); QRectF boundingRect() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,QWidget *widget); @@ -58,6 +66,7 @@ private: QRectF m_rect; QPointF m_anchor; QFont m_font; + QChart *m_chart; }; #endif // CALLOUT_H diff --git a/examples/charts/callout/callout.pro b/examples/charts/callout/callout.pro index b0da66d6..688b69e9 100644 --- a/examples/charts/callout/callout.pro +++ b/examples/charts/callout/callout.pro @@ -1,15 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = callout -TEMPLATE = app +HEADERS += \ + callout.h \ + view.h SOURCES += \ - main.cpp\ - callout.cpp \ - view.cpp + callout.cpp \ + main.cpp\ + view.cpp -HEADERS += \ - callout.h \ - view.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/callout +INSTALLS += target diff --git a/examples/charts/callout/view.cpp b/examples/charts/callout/view.cpp index 1c90eef0..9c1eca69 100644 --- a/examples/charts/callout/view.cpp +++ b/examples/charts/callout/view.cpp @@ -98,6 +98,8 @@ void View::resizeEvent(QResizeEvent *event) m_chart->resize(event->size()); m_coordX->setPos(m_chart->size().width()/2 - 50, m_chart->size().height() - 20); m_coordY->setPos(m_chart->size().width()/2 + 50, m_chart->size().height() - 20); + foreach (Callout *callout, m_callouts) + callout->updateGeometry(); } QGraphicsView::resizeEvent(event); } @@ -111,6 +113,7 @@ void View::mouseMoveEvent(QMouseEvent *event) void View::keepCallout() { + m_callouts.append(m_tooltip); m_tooltip = new Callout(m_chart); } @@ -121,10 +124,9 @@ void View::tooltip(QPointF point, bool state) if (state) { m_tooltip->setText(QString("X: %1 \nY: %2 ").arg(point.x()).arg(point.y())); - QXYSeries *series = qobject_cast<QXYSeries *>(sender()); - m_tooltip->setAnchor(m_chart->mapToPosition(point, series)); - m_tooltip->setPos(m_chart->mapToPosition(point, series) + QPoint(10, -50)); + m_tooltip->setAnchor(point); m_tooltip->setZValue(11); + m_tooltip->updateGeometry(); m_tooltip->show(); } else { m_tooltip->hide(); diff --git a/examples/charts/callout/view.h b/examples/charts/callout/view.h index 4744a1c3..4d17461b 100644 --- a/examples/charts/callout/view.h +++ b/examples/charts/callout/view.h @@ -66,6 +66,7 @@ private: QGraphicsSimpleTextItem *m_coordY; QChart *m_chart; Callout *m_tooltip; + QList<Callout *> m_callouts; }; #endif diff --git a/examples/charts/candlestickchart/candlestickchart.pro b/examples/charts/candlestickchart/candlestickchart.pro index 9a334bd6..f7080e77 100644 --- a/examples/charts/candlestickchart/candlestickchart.pro +++ b/examples/charts/candlestickchart/candlestickchart.pro @@ -1,6 +1,4 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts TARGET = candlestickchart @@ -12,3 +10,6 @@ HEADERS += \ RESOURCES += \ candlestickdata.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/candlestickchart +INSTALLS += target diff --git a/examples/charts/chartinteractions/chartinteractions.pro b/examples/charts/chartinteractions/chartinteractions.pro index 8cf4c36c..4027eb3c 100644 --- a/examples/charts/chartinteractions/chartinteractions.pro +++ b/examples/charts/chartinteractions/chartinteractions.pro @@ -1,11 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -QT += core gui +HEADERS += \ + chart.h \ + chartview.h -TARGET = chartinteractions -TEMPLATE = app +SOURCES += \ + chart.cpp \ + chartview.cpp \ + main.cpp -HEADERS += chart.h chartview.h -SOURCES += main.cpp chart.cpp chartview.cpp +target.path = $$[QT_INSTALL_EXAMPLES]/charts/chartinteractions +INSTALLS += target diff --git a/examples/charts/charts.pro b/examples/charts/charts.pro index 704d9cc0..b64b464f 100644 --- a/examples/charts/charts.pro +++ b/examples/charts/charts.pro @@ -1,52 +1,55 @@ TEMPLATE = subdirs -SUBDIRS += areachart \ +SUBDIRS += \ + areachart \ + barchart \ + barmodelmapper \ + boxplotchart \ + callout \ + candlestickchart \ + chartinteractions \ + chartthemes \ customchart \ + donutbreakdown \ + donutchart \ + dynamicspline \ + horizontalbarchart \ + horizontalpercentbarchart \ + horizontalstackedbarchart \ + legend \ + legendmarkers \ + lineandbar \ linechart \ + logvalueaxis \ + modeldata \ + multiaxis \ + nesteddonuts \ percentbarchart \ piechart \ + piechartcustomization \ piechartdrilldown \ + polarchart \ scatterchart \ scatterinteractions \ splinechart \ stackedbarchart \ stackedbarchartdrilldown \ - zoomlinechart \ - modeldata \ - barchart \ - boxplotchart \ - candlestickchart \ - legend \ - barmodelmapper \ - lineandbar \ - horizontalbarchart \ - horizontalstackedbarchart \ - horizontalpercentbarchart \ - donutbreakdown \ temperaturerecords \ - donutchart \ - multiaxis \ - legendmarkers \ - logvalueaxis \ - polarchart \ - piechartcustomization \ - dynamicspline \ - nesteddonuts \ - chartinteractions \ - callout \ - chartthemes + zoomlinechart qtHaveModule(quick) { - SUBDIRS += qmlboxplot \ + SUBDIRS += \ + qmlaxes \ + qmlboxplot \ qmlcandlestick \ - qmlpiechart \ - qmlweather \ - qmlf1legends \ + qmlchart \ qmlcustomizations \ - qmlaxes \ qmlcustomlegend \ + qmlf1legends \ + qmloscilloscope \ + qmlpiechart \ qmlpolarchart \ - qmlchart \ - qmloscilloscope + qmlweather + } qtHaveModule(multimedia) { diff --git a/examples/charts/chartthemes/chartthemes.pro b/examples/charts/chartthemes/chartthemes.pro index 2a414557..5985f55c 100644 --- a/examples/charts/chartthemes/chartthemes.pro +++ b/examples/charts/chartthemes/chartthemes.pro @@ -1,7 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = chartthemes -SOURCES = main.cpp themewidget.cpp -HEADERS = themewidget.h +HEADERS += \ + themewidget.h + +SOURCES += \ + main.cpp \ + themewidget.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/chartthemes +INSTALLS += target diff --git a/examples/charts/customchart/customchart.pro b/examples/charts/customchart/customchart.pro index 5f3f7382..e82b94ae 100644 --- a/examples/charts/customchart/customchart.pro +++ b/examples/charts/customchart/customchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = customchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/customchart +INSTALLS += target diff --git a/examples/charts/datetimeaxis/datetimeaxis.pro b/examples/charts/datetimeaxis/datetimeaxis.pro index 0ec9d715..09869b05 100644 --- a/examples/charts/datetimeaxis/datetimeaxis.pro +++ b/examples/charts/datetimeaxis/datetimeaxis.pro @@ -1,8 +1,10 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = datetimeaxis -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp RESOURCES += \ sundata.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/datetimeaxis +INSTALLS += target diff --git a/examples/charts/donutbreakdown/donutbreakdown.pro b/examples/charts/donutbreakdown/donutbreakdown.pro index fecef7b8..85ef9d3a 100644 --- a/examples/charts/donutbreakdown/donutbreakdown.pro +++ b/examples/charts/donutbreakdown/donutbreakdown.pro @@ -1,12 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = donutbreakdown -SOURCES += main.cpp\ +HEADERS += \ + donutbreakdownchart.h \ + mainslice.h + +SOURCES += \ donutbreakdownchart.cpp \ + main.cpp \ mainslice.cpp -HEADERS += \ - donutbreakdownchart.h \ - mainslice.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/donutbreakdown +INSTALLS += target diff --git a/examples/charts/donutchart/donutchart.pro b/examples/charts/donutchart/donutchart.pro index 72d4ea4d..71017d12 100644 --- a/examples/charts/donutchart/donutchart.pro +++ b/examples/charts/donutchart/donutchart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = donutchart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/donutchart +INSTALLS += target diff --git a/examples/charts/dynamicspline/dynamicspline.pro b/examples/charts/dynamicspline/dynamicspline.pro index feb26895..1aedeca4 100644 --- a/examples/charts/dynamicspline/dynamicspline.pro +++ b/examples/charts/dynamicspline/dynamicspline.pro @@ -1,7 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = dynamicspline -HEADERS += chart.h -SOURCES += main.cpp chart.cpp +HEADERS += \ + chart.h + +SOURCES += \ + chart.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/dynamicspline +INSTALLS += target diff --git a/examples/charts/examples.pri b/examples/charts/examples.pri deleted file mode 100644 index 7b2eaaa7..00000000 --- a/examples/charts/examples.pri +++ /dev/null @@ -1,17 +0,0 @@ - -INCLUDEPATH += ../../../include - -LIBS += -L$$OUT_PWD/../../../lib - -TEMPLATE = app - -QT += charts -QT += core gui widgets - -contains(TARGET, qml.*) { - QT += qml quick -} - -target.path = $$[QT_INSTALL_EXAMPLES]/charts/$$TARGET -INSTALLS += target - diff --git a/examples/charts/horizontalbarchart/horizontalbarchart.pro b/examples/charts/horizontalbarchart/horizontalbarchart.pro index 61ec088e..f0acf2bc 100644 --- a/examples/charts/horizontalbarchart/horizontalbarchart.pro +++ b/examples/charts/horizontalbarchart/horizontalbarchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = horizontalbarchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/horizontalbarchart +INSTALLS += target diff --git a/examples/charts/horizontalpercentbarchart/horizontalpercentbarchart.pro b/examples/charts/horizontalpercentbarchart/horizontalpercentbarchart.pro index d6168695..5bd65774 100644 --- a/examples/charts/horizontalpercentbarchart/horizontalpercentbarchart.pro +++ b/examples/charts/horizontalpercentbarchart/horizontalpercentbarchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = horizontalpercentbarchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/horizontalpercentbarchart +INSTALLS += target diff --git a/examples/charts/horizontalstackedbarchart/horizontalstackedbarchart.pro b/examples/charts/horizontalstackedbarchart/horizontalstackedbarchart.pro index 5c08d212..b6ba1612 100644 --- a/examples/charts/horizontalstackedbarchart/horizontalstackedbarchart.pro +++ b/examples/charts/horizontalstackedbarchart/horizontalstackedbarchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = horizontalstackedbarchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/horizontalstackedbarchart +INSTALLS += target diff --git a/examples/charts/legend/legend.pro b/examples/charts/legend/legend.pro index 5e22fb2a..5e832ed8 100644 --- a/examples/charts/legend/legend.pro +++ b/examples/charts/legend/legend.pro @@ -1,10 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -TARGET = legend -SOURCES += main.cpp \ - mainwidget.cpp +QT += charts HEADERS += \ mainwidget.h + +SOURCES += \ + main.cpp \ + mainwidget.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/legend +INSTALLS += target diff --git a/examples/charts/legendmarkers/legendmarkers.pro b/examples/charts/legendmarkers/legendmarkers.pro index f79bdba4..169393e0 100644 --- a/examples/charts/legendmarkers/legendmarkers.pro +++ b/examples/charts/legendmarkers/legendmarkers.pro @@ -1,10 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -TARGET = legendmarkers -SOURCES += main.cpp \ - mainwidget.cpp +QT += charts HEADERS += \ mainwidget.h + +SOURCES += \ + main.cpp \ + mainwidget.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/legendmarkers +INSTALLS += target diff --git a/examples/charts/lineandbar/lineandbar.pro b/examples/charts/lineandbar/lineandbar.pro index dd94abd5..073cca49 100644 --- a/examples/charts/lineandbar/lineandbar.pro +++ b/examples/charts/lineandbar/lineandbar.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = lineandbar -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/lineandbar +INSTALLS += target diff --git a/examples/charts/linechart/linechart.pro b/examples/charts/linechart/linechart.pro index d3eb640a..71f70965 100644 --- a/examples/charts/linechart/linechart.pro +++ b/examples/charts/linechart/linechart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = linechart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/linechart +INSTALLS += target diff --git a/examples/charts/logvalueaxis/logvalueaxis.pro b/examples/charts/logvalueaxis/logvalueaxis.pro index ede43079..196a062a 100644 --- a/examples/charts/logvalueaxis/logvalueaxis.pro +++ b/examples/charts/logvalueaxis/logvalueaxis.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = logvalueaxis -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/logvalueaxis +INSTALLS += target diff --git a/examples/charts/modeldata/modeldata.pro b/examples/charts/modeldata/modeldata.pro index 7c302bd9..95d3d689 100644 --- a/examples/charts/modeldata/modeldata.pro +++ b/examples/charts/modeldata/modeldata.pro @@ -1,16 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -QT += core gui +HEADERS += \ + customtablemodel.h \ + tablewidget.h -TARGET = modeldata -TEMPLATE = app +SOURCES += \ + customtablemodel.cpp \ + main.cpp \ + tablewidget.cpp - -SOURCES += main.cpp\ - tablewidget.cpp \ - customtablemodel.cpp - -HEADERS += tablewidget.h \ - customtablemodel.h +target.path = $$[QT_INSTALL_EXAMPLES]/charts/modeldata +INSTALLS += target diff --git a/examples/charts/multiaxis/multiaxis.pro b/examples/charts/multiaxis/multiaxis.pro index 33de57cb..9edca6ba 100644 --- a/examples/charts/multiaxis/multiaxis.pro +++ b/examples/charts/multiaxis/multiaxis.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = multiaxis -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/multiaxis +INSTALLS += target diff --git a/examples/charts/nesteddonuts/nesteddonuts.pro b/examples/charts/nesteddonuts/nesteddonuts.pro index fadab0cd..571f1a06 100644 --- a/examples/charts/nesteddonuts/nesteddonuts.pro +++ b/examples/charts/nesteddonuts/nesteddonuts.pro @@ -1,8 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = nesteddonuts -SOURCES += main.cpp\ - widget.cpp -HEADERS += widget.h +HEADERS += \ + widget.h + +SOURCES += \ + main.cpp \ + widget.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/nesteddonuts +INSTALLS += target diff --git a/examples/charts/openglseries/openglseries.pro b/examples/charts/openglseries/openglseries.pro index 0ae11595..e0c13cfe 100644 --- a/examples/charts/openglseries/openglseries.pro +++ b/examples/charts/openglseries/openglseries.pro @@ -1,9 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = openglseries -SOURCES += main.cpp \ - datasource.cpp -HEADERS += datasource.h +HEADERS += \ + datasource.h +SOURCES += \ + datasource.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/openglseries +INSTALLS += target diff --git a/examples/charts/percentbarchart/percentbarchart.pro b/examples/charts/percentbarchart/percentbarchart.pro index 983159d1..cfb718b0 100644 --- a/examples/charts/percentbarchart/percentbarchart.pro +++ b/examples/charts/percentbarchart/percentbarchart.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = percentbarchart -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/percentbarchart +INSTALLS += target diff --git a/examples/charts/piechart/piechart.pro b/examples/charts/piechart/piechart.pro index 7bd48514..e3767910 100644 --- a/examples/charts/piechart/piechart.pro +++ b/examples/charts/piechart/piechart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = piechart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/piechart +INSTALLS += target diff --git a/examples/charts/piechartcustomization/piechartcustomization.pro b/examples/charts/piechartcustomization/piechartcustomization.pro index 722744de..081e9105 100644 --- a/examples/charts/piechartcustomization/piechartcustomization.pro +++ b/examples/charts/piechartcustomization/piechartcustomization.pro @@ -1,16 +1,17 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -TARGET = piechartcustomization -SOURCES += main.cpp \ - pentool.cpp \ - brushtool.cpp \ - customslice.cpp \ - mainwidget.cpp +QT += charts HEADERS += \ - pentool.h \ brushtool.h \ customslice.h \ - mainwidget.h + mainwidget.h \ + pentool.h + +SOURCES += \ + brushtool.cpp \ + customslice.cpp \ + main.cpp \ + mainwidget.cpp \ + pentool.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/piechartcustomization +INSTALLS += target diff --git a/examples/charts/piechartdrilldown/piechartdrilldown.pro b/examples/charts/piechartdrilldown/piechartdrilldown.pro index 0f9626c9..60866fc3 100644 --- a/examples/charts/piechartdrilldown/piechartdrilldown.pro +++ b/examples/charts/piechartdrilldown/piechartdrilldown.pro @@ -1,11 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = piechartdrilldown -SOURCES += main.cpp \ - drilldownslice.cpp \ - drilldownchart.cpp +QT += charts HEADERS += \ drilldownchart.h \ drilldownslice.h + +SOURCES += \ + drilldownchart.cpp \ + drilldownslice.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/piechartdrilldown +INSTALLS += target diff --git a/examples/charts/polarchart/polarchart.pro b/examples/charts/polarchart/polarchart.pro index 8759c1ce..a046ca86 100644 --- a/examples/charts/polarchart/polarchart.pro +++ b/examples/charts/polarchart/polarchart.pro @@ -1,6 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = polarchart -SOURCES += main.cpp chartview.cpp -HEADERS += chartview.h +QT += charts + +HEADERS += \ + chartview.h + +SOURCES += \ + chartview.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/polarchart +INSTALLS += target diff --git a/examples/charts/qmlaxes/qmlaxes.pro b/examples/charts/qmlaxes/qmlaxes.pro index 50b4c012..6fb5b4f9 100644 --- a/examples/charts/qmlaxes/qmlaxes.pro +++ b/examples/charts/qmlaxes/qmlaxes.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlaxes/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlaxes/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlaxes +INSTALLS += target diff --git a/examples/charts/qmlboxplot/qmlboxplot.pro b/examples/charts/qmlboxplot/qmlboxplot.pro index 237f05f1..3afed6af 100644 --- a/examples/charts/qmlboxplot/qmlboxplot.pro +++ b/examples/charts/qmlboxplot/qmlboxplot.pro @@ -1,9 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp +SOURCES += \ + main.cpp -OTHER_FILES += \ - qml/qmlboxplot/main.qml +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlboxplot/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlboxplot +INSTALLS += target diff --git a/examples/charts/qmlcandlestick/qmlcandlestick.pro b/examples/charts/qmlcandlestick/qmlcandlestick.pro index 58e63037..83f08895 100644 --- a/examples/charts/qmlcandlestick/qmlcandlestick.pro +++ b/examples/charts/qmlcandlestick/qmlcandlestick.pro @@ -1,6 +1,4 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick RESOURCES += resources.qrc @@ -8,3 +6,9 @@ SOURCES += main.cpp OTHER_FILES += \ qml/qmlcandlestick/main.qml + +DISTFILES += \ + qml/qmlcandlestick/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlcandlestick +INSTALLS += target diff --git a/examples/charts/qmlchart/qmlchart.pro b/examples/charts/qmlchart/qmlchart.pro index 82426424..f665ee12 100644 --- a/examples/charts/qmlchart/qmlchart.pro +++ b/examples/charts/qmlchart/qmlchart.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlchart/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlchart/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlchart +INSTALLS += target diff --git a/examples/charts/qmlcustomizations/qmlcustomizations.pro b/examples/charts/qmlcustomizations/qmlcustomizations.pro index ae2d4e5b..a2d316d6 100644 --- a/examples/charts/qmlcustomizations/qmlcustomizations.pro +++ b/examples/charts/qmlcustomizations/qmlcustomizations.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlcustomizations/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlcustomizations/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlcustomizations +INSTALLS += target diff --git a/examples/charts/qmlcustomlegend/qmlcustomlegend.pro b/examples/charts/qmlcustomlegend/qmlcustomlegend.pro index d42afded..478b68ac 100644 --- a/examples/charts/qmlcustomlegend/qmlcustomlegend.pro +++ b/examples/charts/qmlcustomlegend/qmlcustomlegend.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlcustomlegend/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlcustomlegend/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlcustomlegend +INSTALLS += target diff --git a/examples/charts/qmlf1legends/qmlf1legends.pro b/examples/charts/qmlf1legends/qmlf1legends.pro index fc8c04f4..a3081f15 100644 --- a/examples/charts/qmlf1legends/qmlf1legends.pro +++ b/examples/charts/qmlf1legends/qmlf1legends.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlf1legends/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlf1legends/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlf1legends +INSTALLS += target diff --git a/examples/charts/qmloscilloscope/qmloscilloscope.pro b/examples/charts/qmloscilloscope/qmloscilloscope.pro index a66fabcd..34ef74db 100644 --- a/examples/charts/qmloscilloscope/qmloscilloscope.pro +++ b/examples/charts/qmloscilloscope/qmloscilloscope.pro @@ -1,11 +1,17 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} - -RESOURCES += resources.qrc -SOURCES += main.cpp \ - datasource.cpp -OTHER_FILES += qml/qmloscilloscope/* +QT += charts qml quick HEADERS += \ datasource.h + +SOURCES += \ + main.cpp \ + datasource.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmloscilloscope/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmloscilloscope +INSTALLS += target diff --git a/examples/charts/qmlpiechart/qmlpiechart.pro b/examples/charts/qmlpiechart/qmlpiechart.pro index 926f9c2d..7f87bb1a 100644 --- a/examples/charts/qmlpiechart/qmlpiechart.pro +++ b/examples/charts/qmlpiechart/qmlpiechart.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlpiechart/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlpiechart/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlpiechart +INSTALLS += target diff --git a/examples/charts/qmlpolarchart/qmlpolarchart.pro b/examples/charts/qmlpolarchart/qmlpolarchart.pro index aa3341a5..340fbf86 100644 --- a/examples/charts/qmlpolarchart/qmlpolarchart.pro +++ b/examples/charts/qmlpolarchart/qmlpolarchart.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlpolarchart/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlpolarchart/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlpolarchart +INSTALLS += target diff --git a/examples/charts/qmlweather/qmlweather.pro b/examples/charts/qmlweather/qmlweather.pro index 5e0d8df4..f51e6c8f 100644 --- a/examples/charts/qmlweather/qmlweather.pro +++ b/examples/charts/qmlweather/qmlweather.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts qml quick -RESOURCES += resources.qrc -SOURCES += main.cpp -OTHER_FILES += qml/qmlweather/* +SOURCES += \ + main.cpp + +RESOURCES += \ + resources.qrc + +DISTFILES += \ + qml/qmlweather/* + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/qmlweather +INSTALLS += target diff --git a/examples/charts/scatterchart/scatterchart.pro b/examples/charts/scatterchart/scatterchart.pro index 8170d6f4..fdb468d6 100644 --- a/examples/charts/scatterchart/scatterchart.pro +++ b/examples/charts/scatterchart/scatterchart.pro @@ -1,9 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = scatterchart -SOURCES += main.cpp \ - chartview.cpp +QT += charts HEADERS += \ chartview.h + +SOURCES += \ + chartview.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/scatterchart +INSTALLS += target diff --git a/examples/charts/scatterinteractions/scatterinteractions.pro b/examples/charts/scatterinteractions/scatterinteractions.pro index 596fe020..e069df7f 100644 --- a/examples/charts/scatterinteractions/scatterinteractions.pro +++ b/examples/charts/scatterinteractions/scatterinteractions.pro @@ -1,9 +1,11 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = scatterinteractions -SOURCES += main.cpp \ - chartview.cpp -HEADERS += \ +HEADERS += \ chartview.h + +SOURCES += \ + chartview.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/scatterinteractions +INSTALLS += target diff --git a/examples/charts/splinechart/splinechart.pro b/examples/charts/splinechart/splinechart.pro index b2624f53..e71b7780 100644 --- a/examples/charts/splinechart/splinechart.pro +++ b/examples/charts/splinechart/splinechart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = splinechart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/splinechart +INSTALLS += target diff --git a/examples/charts/stackedbarchart/stackedbarchart.pro b/examples/charts/stackedbarchart/stackedbarchart.pro index f6a77b6a..1034c61d 100644 --- a/examples/charts/stackedbarchart/stackedbarchart.pro +++ b/examples/charts/stackedbarchart/stackedbarchart.pro @@ -1,5 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = stackedbarchart -SOURCES += main.cpp +QT += charts + +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/stackedbarchart +INSTALLS += target diff --git a/examples/charts/stackedbarchartdrilldown/stackedbarchartdrilldown.pro b/examples/charts/stackedbarchartdrilldown/stackedbarchartdrilldown.pro index c10066f4..7cd09466 100644 --- a/examples/charts/stackedbarchartdrilldown/stackedbarchartdrilldown.pro +++ b/examples/charts/stackedbarchartdrilldown/stackedbarchartdrilldown.pro @@ -1,6 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = stackedbarchartdrilldown -SOURCES += main.cpp drilldownseries.cpp drilldownchart.cpp -HEADERS += drilldownseries.h drilldownchart.h +QT += charts + +HEADERS += \ + drilldownchart.h \ + drilldownseries.h + +SOURCES += \ + drilldownchart.cpp \ + drilldownseries.cpp \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/stackedbarchartdrilldown +INSTALLS += target diff --git a/examples/charts/temperaturerecords/temperaturerecords.pro b/examples/charts/temperaturerecords/temperaturerecords.pro index e2eb6be3..b8f34907 100644 --- a/examples/charts/temperaturerecords/temperaturerecords.pro +++ b/examples/charts/temperaturerecords/temperaturerecords.pro @@ -1,6 +1,7 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} +QT += charts -TARGET = temperaturerecords -SOURCES += main.cpp +SOURCES += \ + main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/temperaturerecords +INSTALLS += target diff --git a/examples/charts/zoomlinechart/zoomlinechart.pro b/examples/charts/zoomlinechart/zoomlinechart.pro index c98161b2..a9f38f14 100644 --- a/examples/charts/zoomlinechart/zoomlinechart.pro +++ b/examples/charts/zoomlinechart/zoomlinechart.pro @@ -1,7 +1,13 @@ -!include( ../examples.pri ) { - error( "Couldn't find the examples.pri file!" ) -} -TARGET = zoomlinechart -HEADERS += chart.h chartview.h - -SOURCES += main.cpp chart.cpp chartview.cpp +QT += charts + +HEADERS += \ + chart.h \ + chartview.h + +SOURCES += \ + main.cpp \ + chart.cpp \ + chartview.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/charts/zoomlinechart +INSTALLS += target |