diff options
author | Liang Qi <liang.qi@qt.io> | 2017-12-01 09:35:21 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-12-01 09:35:21 +0100 |
commit | d60ab44407c2bf399b3f5d77fe9cd21951629b19 (patch) | |
tree | a2762c0044c959e91628e44c281c7b985d453e54 /examples | |
parent | d7e43c00584f0d4590162cf0e0b3bd6118ef9d28 (diff) | |
parent | aa081a76fe19fd606469c53a829c6f00b190cafd (diff) | |
download | qtquickcontrols-d60ab44407c2bf399b3f5d77fe9cd21951629b19.tar.gz |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: Iadff14f78c9d4b5aca9cba8a2728c10b7963d8fc
Diffstat (limited to 'examples')
5 files changed, 38 insertions, 14 deletions
diff --git a/examples/quickcontrols/controls/basiclayouts/main.qml b/examples/quickcontrols/controls/basiclayouts/main.qml index b6694b45..cc4c0d4f 100644 --- a/examples/quickcontrols/controls/basiclayouts/main.qml +++ b/examples/quickcontrols/controls/basiclayouts/main.qml @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp b/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp index 55f76d67..b93641a9 100644 --- a/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp +++ b/examples/quickcontrols/controls/tableview/src/sortfilterproxymodel.cpp @@ -54,8 +54,8 @@ SortFilterProxyModel::SortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent), m_complete(false) { - connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SIGNAL(countChanged())); - connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(countChanged())); + connect(this, &QSortFilterProxyModel::rowsInserted, this, &SortFilterProxyModel::countChanged); + connect(this, &QSortFilterProxyModel::rowsRemoved, this, &SortFilterProxyModel::countChanged); } int SortFilterProxyModel::count() const diff --git a/examples/quickcontrols/controls/touch/src/main.cpp b/examples/quickcontrols/controls/touch/src/main.cpp index e66387f7..be01f287 100644 --- a/examples/quickcontrols/controls/touch/src/main.cpp +++ b/examples/quickcontrols/controls/touch/src/main.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml b/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml index b132510e..c0fb6720 100644 --- a/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml +++ b/examples/quickcontrols/extras/dashboard/qml/TurnIndicator.qml @@ -59,7 +59,7 @@ Item { property bool flashing: false scale: direction === Qt.LeftArrow ? 1 : -1 - +//! [1] Timer { id: flashTimer interval: 500 @@ -67,7 +67,8 @@ Item { repeat: true onTriggered: flashing = !flashing } - +//! [1] +//! [2] function paintOutlinePath(ctx) { ctx.beginPath(); ctx.moveTo(0, height * 0.5); @@ -79,7 +80,7 @@ Item { ctx.lineTo(0.6 * width, height); ctx.lineTo(0, height * 0.5); } - +//! [2] Canvas { id: backgroundCanvas anchors.fill: parent @@ -95,7 +96,7 @@ Item { ctx.stroke(); } } - +//! [3] Canvas { id: foregroundCanvas anchors.fill: parent @@ -111,4 +112,5 @@ Item { ctx.fill(); } } +//! [3] } diff --git a/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml b/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml index 7225be48..44913621 100644 --- a/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml +++ b/examples/quickcontrols/extras/dashboard/qml/ValueSource.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.2 - +//! [0] Item { id: valueSource property real kph: 0 @@ -79,6 +79,7 @@ Item { property int turnSignal: gear == "P" && !start ? randomDirection() : -1 property real temperature: 0.6 property bool start: true +//! [0] function randomDirection() { return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow; @@ -101,7 +102,7 @@ Item { SequentialAnimation { loops: Animation.Infinite - +//! [1] ParallelAnimation { NumberAnimation { target: valueSource @@ -120,6 +121,7 @@ Item { duration: 3000 } } +//! [1] ParallelAnimation { // We changed gears so we lost a bit of speed. NumberAnimation { |