diff options
-rw-r--r-- | .qmake.conf | 4 | ||||
-rw-r--r-- | examples/datavisualization/texturesurface/custominputhandler.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/engine/abstract3dcontroller_p.h | 4 | ||||
-rw-r--r-- | src/datavisualization/input/q3dinputhandler.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/utils/utils.cpp | 6 | ||||
-rw-r--r-- | src/datavisualizationqml2/plugins.qmltypes | 278 | ||||
-rw-r--r-- | tests/manual/barstest/chart.cpp | 6 |
7 files changed, 290 insertions, 12 deletions
diff --git a/.qmake.conf b/.qmake.conf index 10a6c6b4..de5c3ff9 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,5 +1,7 @@ load(qt_build_config) -MODULE_VERSION = 5.13.2 +DEFINES += QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST + +MODULE_VERSION = 5.14.0 CONFIG += warning_clean CMAKE_MODULE_TESTS=- diff --git a/examples/datavisualization/texturesurface/custominputhandler.cpp b/examples/datavisualization/texturesurface/custominputhandler.cpp index 07608c90..e8e693a0 100644 --- a/examples/datavisualization/texturesurface/custominputhandler.cpp +++ b/examples/datavisualization/texturesurface/custominputhandler.cpp @@ -58,7 +58,7 @@ void CustomInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mouse //! [1] void CustomInputHandler::wheelEvent(QWheelEvent *event) { - float delta = float(event->delta()); + float delta = float(event->angleDelta().y()); m_axisXMinValue += delta; m_axisXMaxValue -= delta; diff --git a/src/datavisualization/engine/abstract3dcontroller_p.h b/src/datavisualization/engine/abstract3dcontroller_p.h index 56b7a45e..97ea2bf5 100644 --- a/src/datavisualization/engine/abstract3dcontroller_p.h +++ b/src/datavisualization/engine/abstract3dcontroller_p.h @@ -48,7 +48,7 @@ #include "q3dscene_p.h" #include "qcustom3ditem.h" #include <QtGui/QLinearGradient> -#include <QtCore/QTime> +#include <QtCore/QElapsedTimer> #include <QtCore/QLocale> #include <QtCore/QMutex> @@ -211,7 +211,7 @@ protected: QList<QAbstract3DSeries *> m_seriesList; bool m_measureFps; - QTime m_frameTimer; + QElapsedTimer m_frameTimer; int m_numFrames; qreal m_currentFps; diff --git a/src/datavisualization/input/q3dinputhandler.cpp b/src/datavisualization/input/q3dinputhandler.cpp index 5e6f10af..3d5dd059 100644 --- a/src/datavisualization/input/q3dinputhandler.cpp +++ b/src/datavisualization/input/q3dinputhandler.cpp @@ -262,7 +262,7 @@ void Q3DInputHandler::wheelEvent(QWheelEvent *event) zoomLevel = qBound(minZoomLevel, zoomLevel, maxZoomLevel); if (isZoomAtTargetEnabled()) { - scene()->setGraphPositionQuery(event->pos()); + scene()->setGraphPositionQuery(event->position().toPoint()); d_ptr->m_zoomAtTargetPending = true; // If zoom at target is enabled, we don't want to zoom yet, as that causes // jitter. Instead, we zoom next frame, when we apply the camera position. diff --git a/src/datavisualization/utils/utils.cpp b/src/datavisualization/utils/utils.cpp index d5850d86..e80058db 100644 --- a/src/datavisualization/utils/utils.cpp +++ b/src/datavisualization/utils/utils.cpp @@ -265,11 +265,11 @@ QString Utils::formatLabelSprintf(const QByteArray &format, Utils::ParamType par { switch (paramType) { case ParamTypeInt: - return QString().sprintf(format, (qint64)value); + return QString::asprintf(format.constData(), qint64(value)); case ParamTypeUInt: - return QString().sprintf(format, (quint64)value); + return QString::asprintf(format.constData(), quint64(value)); case ParamTypeReal: - return QString().sprintf(format, value); + return QString::asprintf(format.constData(), value); default: // Return format string to detect errors. Bars selection label logic also depends on this. return QString::fromUtf8(format); diff --git a/src/datavisualizationqml2/plugins.qmltypes b/src/datavisualizationqml2/plugins.qmltypes index b4b91a81..69a48706 100644 --- a/src/datavisualizationqml2/plugins.qmltypes +++ b/src/datavisualizationqml2/plugins.qmltypes @@ -4,11 +4,287 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -defaultplatform QtDataVisualization 1.13' +// 'qmlplugindump -nonrelocatable -defaultplatform QtDataVisualization 1.14' Module { dependencies: ["QtQuick 2.0"] Component { + name: "QAbstractItemModel" + prototype: "QObject" + exports: ["QtDataVisualization/AbstractItemModel 1.0"] + isCreatable: false + exportMetaObjectRevisions: [0] + Enum { + name: "LayoutChangeHint" + values: { + "NoLayoutChangeHint": 0, + "VerticalSortHint": 1, + "HorizontalSortHint": 2 + } + } + Enum { + name: "CheckIndexOption" + values: { + "NoOption": 0, + "IndexIsValid": 1, + "DoNotUseParent": 2, + "ParentIsInvalid": 4 + } + } + Signal { + name: "dataChanged" + Parameter { name: "topLeft"; type: "QModelIndex" } + Parameter { name: "bottomRight"; type: "QModelIndex" } + Parameter { name: "roles"; type: "QVector<int>" } + } + Signal { + name: "dataChanged" + Parameter { name: "topLeft"; type: "QModelIndex" } + Parameter { name: "bottomRight"; type: "QModelIndex" } + } + Signal { + name: "headerDataChanged" + Parameter { name: "orientation"; type: "Qt::Orientation" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "layoutChanged" + Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } + Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } + } + Signal { + name: "layoutChanged" + Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } + } + Signal { name: "layoutChanged" } + Signal { + name: "layoutAboutToBeChanged" + Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } + Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } + } + Signal { + name: "layoutAboutToBeChanged" + Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" } + } + Signal { name: "layoutAboutToBeChanged" } + Signal { + name: "rowsAboutToBeInserted" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "rowsInserted" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "rowsAboutToBeRemoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "rowsRemoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "columnsAboutToBeInserted" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "columnsInserted" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "columnsAboutToBeRemoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { + name: "columnsRemoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Signal { name: "modelAboutToBeReset" } + Signal { name: "modelReset" } + Signal { + name: "rowsAboutToBeMoved" + Parameter { name: "sourceParent"; type: "QModelIndex" } + Parameter { name: "sourceStart"; type: "int" } + Parameter { name: "sourceEnd"; type: "int" } + Parameter { name: "destinationParent"; type: "QModelIndex" } + Parameter { name: "destinationRow"; type: "int" } + } + Signal { + name: "rowsMoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + Parameter { name: "destination"; type: "QModelIndex" } + Parameter { name: "row"; type: "int" } + } + Signal { + name: "columnsAboutToBeMoved" + Parameter { name: "sourceParent"; type: "QModelIndex" } + Parameter { name: "sourceStart"; type: "int" } + Parameter { name: "sourceEnd"; type: "int" } + Parameter { name: "destinationParent"; type: "QModelIndex" } + Parameter { name: "destinationColumn"; type: "int" } + } + Signal { + name: "columnsMoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + Parameter { name: "destination"; type: "QModelIndex" } + Parameter { name: "column"; type: "int" } + } + Method { name: "submit"; type: "bool" } + Method { name: "revert" } + Method { + name: "hasIndex" + type: "bool" + Parameter { name: "row"; type: "int" } + Parameter { name: "column"; type: "int" } + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { + name: "hasIndex" + type: "bool" + Parameter { name: "row"; type: "int" } + Parameter { name: "column"; type: "int" } + } + Method { + name: "index" + type: "QModelIndex" + Parameter { name: "row"; type: "int" } + Parameter { name: "column"; type: "int" } + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { + name: "index" + type: "QModelIndex" + Parameter { name: "row"; type: "int" } + Parameter { name: "column"; type: "int" } + } + Method { + name: "parent" + type: "QModelIndex" + Parameter { name: "child"; type: "QModelIndex" } + } + Method { + name: "sibling" + type: "QModelIndex" + Parameter { name: "row"; type: "int" } + Parameter { name: "column"; type: "int" } + Parameter { name: "idx"; type: "QModelIndex" } + } + Method { + name: "rowCount" + type: "int" + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { name: "rowCount"; type: "int" } + Method { + name: "columnCount" + type: "int" + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { name: "columnCount"; type: "int" } + Method { + name: "hasChildren" + type: "bool" + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { name: "hasChildren"; type: "bool" } + Method { + name: "data" + type: "QVariant" + Parameter { name: "index"; type: "QModelIndex" } + Parameter { name: "role"; type: "int" } + } + Method { + name: "data" + type: "QVariant" + Parameter { name: "index"; type: "QModelIndex" } + } + Method { + name: "setData" + type: "bool" + Parameter { name: "index"; type: "QModelIndex" } + Parameter { name: "value"; type: "QVariant" } + Parameter { name: "role"; type: "int" } + } + Method { + name: "setData" + type: "bool" + Parameter { name: "index"; type: "QModelIndex" } + Parameter { name: "value"; type: "QVariant" } + } + Method { + name: "headerData" + type: "QVariant" + Parameter { name: "section"; type: "int" } + Parameter { name: "orientation"; type: "Qt::Orientation" } + Parameter { name: "role"; type: "int" } + } + Method { + name: "headerData" + type: "QVariant" + Parameter { name: "section"; type: "int" } + Parameter { name: "orientation"; type: "Qt::Orientation" } + } + Method { + name: "fetchMore" + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { + name: "canFetchMore" + type: "bool" + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { + name: "flags" + type: "Qt::ItemFlags" + Parameter { name: "index"; type: "QModelIndex" } + } + Method { + name: "match" + type: "QModelIndexList" + Parameter { name: "start"; type: "QModelIndex" } + Parameter { name: "role"; type: "int" } + Parameter { name: "value"; type: "QVariant" } + Parameter { name: "hits"; type: "int" } + Parameter { name: "flags"; type: "Qt::MatchFlags" } + } + Method { + name: "match" + type: "QModelIndexList" + Parameter { name: "start"; type: "QModelIndex" } + Parameter { name: "role"; type: "int" } + Parameter { name: "value"; type: "QVariant" } + Parameter { name: "hits"; type: "int" } + } + Method { + name: "match" + type: "QModelIndexList" + Parameter { name: "start"; type: "QModelIndex" } + Parameter { name: "role"; type: "int" } + Parameter { name: "value"; type: "QVariant" } + } + } + Component { name: "QtDataVisualization::AbstractDeclarative" defaultProperty: "data" prototype: "QQuickItem" diff --git a/tests/manual/barstest/chart.cpp b/tests/manual/barstest/chart.cpp index 528b32a5..2cc52ecf 100644 --- a/tests/manual/barstest/chart.cpp +++ b/tests/manual/barstest/chart.cpp @@ -39,7 +39,7 @@ #include <QtDataVisualization/q3dinputhandler.h> #include <QtDataVisualization/qcustom3ditem.h> #include <QtCore/QRandomGenerator> -#include <QtCore/QTime> +#include <QtCore/QElapsedTimer> #include <QtCore/qmath.h> using namespace QtDataVisualization; @@ -354,7 +354,7 @@ void GraphModifier::flipViews() void GraphModifier::createMassiveArray() { const int arrayDimension = 1000; - QTime timer; + QElapsedTimer timer; timer.start(); QStringList genericColumnLabels; @@ -495,7 +495,7 @@ void GraphModifier::insertRow() void GraphModifier::insertRows() { - QTime timer; + QElapsedTimer timer; timer.start(); QBarDataArray dataArray; QStringList labels; |