Merge remote-tracking branch 'origin/5.11.0' into 5.11

Change-Id: Iba471895b413b5d2d048d679b4dc47a547e2d59f
This commit is contained in:
Qt Forward Merge Bot 2018-05-18 11:23:14 +02:00
commit 4c65ec0101
159 changed files with 2 additions and 13765 deletions

2
dist/changes-5.11.0 vendored
View File

@ -35,6 +35,6 @@ information about a particular change.
- Embedded Linux: Documented advanced eglfs_kms features.
- Updated qtcluster demo with new graphical design.
- Removed qtcluster demo.
- Fixed multiple instances of missing, incorrect, or obsolete information.

View File

@ -1,263 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "circularindicator.h"
CircularIndicator::CircularIndicator(QQuickItem *parent)
: QQuickPaintedItem(parent)
, mStartAngle(0)
, mEndAngle(360)
, mMinimumValue(0.0)
, mMaximumValue(100.0)
, mValue(0.0)
, mLineWidth(10)
, mProgressColor(QColor(255, 0, 0))
, mBackgroundColor(QColor(240, 240, 240))
, mPadding(1)
{
}
CircularIndicator::~CircularIndicator()
{
}
int CircularIndicator::startAngle() const
{
return mStartAngle;
}
void CircularIndicator::setStartAngle(int angle)
{
if (angle == mStartAngle)
return;
mStartAngle = angle;
emit startAngleChanged(mStartAngle);
update();
}
int CircularIndicator::endAngle() const
{
return mEndAngle;
}
void CircularIndicator::setEndAngle(int angle)
{
if (angle == mEndAngle)
return;
mEndAngle = angle;
emit endAngleChanged(mEndAngle);
update();
}
qreal CircularIndicator::minimumValue() const
{
return mMinimumValue;
}
void CircularIndicator::setMinimumValue(qreal value)
{
if (qFuzzyCompare(value, mMinimumValue))
return;
if (value > mMaximumValue) {
qWarning() << this << "\nMinimum value can't exceed maximum value.";
return;
}
mMinimumValue = value;
emit minimumValueChanged(mMinimumValue);
update();
}
qreal CircularIndicator::maximumValue() const
{
return mMaximumValue;
}
void CircularIndicator::setMaximumValue(qreal value)
{
if (qFuzzyCompare(value, mMaximumValue))
return;
if (value < mMinimumValue) {
qWarning() << this << "\nMaximum value can't be less than minimum value.";
return;
}
mMaximumValue = value;
emit maximumValueChanged(value);
update();
}
qreal CircularIndicator::value() const
{
return mValue;
}
void CircularIndicator::setValue(qreal value)
{
if (qFuzzyCompare(value, mValue))
return;
if (value < mMinimumValue) {
qWarning() << this << "\nValue can't be less than minimum value.";
return;
}
if (value > mMaximumValue) {
qWarning() << this << "\nValue can't exceed maximum value.";
return;
}
mValue = value;
emit valueChanged(mValue);
update();
}
int CircularIndicator::lineWidth() const
{
return mLineWidth;
}
void CircularIndicator::setLineWidth(int width)
{
if (width == mLineWidth)
return;
mLineWidth = width;
emit lineWidthChanged(mLineWidth);
update();
}
QColor CircularIndicator::progressColor() const
{
return mProgressColor;
}
void CircularIndicator::setProgressColor(QColor color)
{
if (color == mProgressColor)
return;
mProgressColor = color;
emit progressColorChanged(mProgressColor);
update();
}
QColor CircularIndicator::backgroundColor() const
{
return mBackgroundColor;
}
void CircularIndicator::setBackgroundColor(QColor color)
{
if (color == mBackgroundColor)
return;
mBackgroundColor = color;
emit backgroundColorChanged(mBackgroundColor);
update();
}
int CircularIndicator::padding() const
{
return mPadding;
}
void CircularIndicator::setPadding(int padding)
{
if (padding == mPadding)
return;
mPadding = padding;
emit paddingChanged(mPadding);
update();
}
void CircularIndicator::paint(QPainter *painter)
{
painter->setRenderHint(QPainter::Antialiasing);
int indicatorSize = qMin(width(), height()) - mPadding * 2 - mLineWidth;
if (indicatorSize <= 0)
return;
QRect indicatorRect(width() / 2 - indicatorSize / 2,
height() / 2 - indicatorSize / 2,
indicatorSize,
indicatorSize);
QPen pen;
pen.setCapStyle(Qt::FlatCap);
pen.setWidth(mLineWidth);
pen.setColor(mBackgroundColor);
painter->setPen(pen);
int endAngle = (qAbs(mEndAngle) > 360) ? mEndAngle % 360 : mEndAngle;
// See http://doc.qt.io/qt-5/qpainter.html#drawArc for details
int minimumAngle = (90 - mStartAngle) * 16;
int maximumAngle = (90 - endAngle) * 16 - minimumAngle;
painter->drawArc(indicatorRect, minimumAngle, maximumAngle);
if (qFuzzyCompare(mValue, mMinimumValue))
return;
pen.setColor(mProgressColor);
painter->setPen(pen);
int currentAngle = ((mValue - mMinimumValue) / (mMaximumValue - mMinimumValue)) * maximumAngle;
painter->drawArc(indicatorRect, minimumAngle, currentAngle);
}

View File

@ -1,121 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef CIRCULARINDICATOR_H
#define CIRCULARINDICATOR_H
#include <QQuickPaintedItem>
#include <QPainter>
class CircularIndicator : public QQuickPaintedItem
{
Q_OBJECT
Q_PROPERTY(int startAngle READ startAngle WRITE setStartAngle NOTIFY startAngleChanged)
Q_PROPERTY(int endAngle READ endAngle WRITE setEndAngle NOTIFY endAngleChanged)
Q_PROPERTY(qreal minimumValue READ minimumValue WRITE setMinimumValue NOTIFY minimumValueChanged)
Q_PROPERTY(qreal maximumValue READ maximumValue WRITE setMaximumValue NOTIFY maximumValueChanged)
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged)
Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth NOTIFY lineWidthChanged)
Q_PROPERTY(QColor progressColor READ progressColor WRITE setProgressColor NOTIFY progressColorChanged)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged)
public:
CircularIndicator(QQuickItem *parent = 0);
~CircularIndicator();
int startAngle() const;
int endAngle() const;
qreal minimumValue() const;
qreal maximumValue() const;
qreal value() const;
int lineWidth() const;
QColor progressColor() const;
QColor backgroundColor() const;
int padding() const;
public slots:
void setStartAngle(int angle);
void setEndAngle(int angle);
void setMinimumValue(qreal value);
void setMaximumValue(qreal value);
void setValue(qreal value);
void setLineWidth(int width);
void setProgressColor(QColor color);
void setBackgroundColor(QColor color);
void setPadding(int padding);
signals:
void startAngleChanged(int);
void endAngleChanged(int);
void minimumValueChanged(qreal);
void maximumValueChanged(qreal);
void valueChanged(qreal);
void lineWidthChanged(int);
void progressColorChanged(QColor);
void backgroundColorChanged(QColor);
void paddingChanged(int);
protected:
void paint(QPainter *painter);
private:
int mStartAngle;
int mEndAngle;
qreal mMinimumValue;
qreal mMaximumValue;
qreal mValue;
int mLineWidth;
QColor mProgressColor;
QColor mBackgroundColor;
int mPadding;
};
#endif // CIRCULARINDICATOR_H

View File

@ -1,101 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
pragma Singleton
import QtQuick 2.6
Item {
id: valueSource
property real kph: 30
property real consumeKW: 0
property real maxConsumeKWValue: 90
property real maxChargeKWValue: 40
property real chargeKW: 10
property real maxRange: 600
property real range: (batteryLevel / 100) * maxRange
property bool runningInDesigner: true
property var consumption: [300, 600, 700, 800, 900, 700, 600, 300, 50, 50, -100, 50, -100, -150,
-200, 50, 150, 200, 300, 200, 300, 200, 500, 50, -100, -100, -150, -80, 50, 300, 600, 700, 800,
600, 700, 300, 50, 50]
property var turnSignal
property var currentDate: new Date()
//property string date: currentDate.toLocaleDateString(Qt.locale("fi_FI"), "ddd d. MMM")
//property string time: currentDate.toLocaleTimeString(Qt.locale("fi_FI"), "hh:mm")
property string date: currentDate.toLocaleDateString(Qt.locale("en_GB"))
property string time: currentDate.toLocaleTimeString(Qt.locale("en_GB"), "hh:mm")
property real latitude: 0
property real longitude: 0
property real direction: 0
property bool lowBeam: false
property int carId: 4
property bool lightFailure: true
property bool flatTire: false
property bool frontLeftOpen: false
property bool frontRightOpen: true
property bool rearLeftDoorOpen: false
property bool rearRighDoorOpen: true
property bool hoodOpen: false
property bool trunkOpen: true
property double batteryLevel: 45
property double fuelLevel: 55
property int gear: -1
property bool parkingBrake: true
// TODO: These two are hacks. View change messages might not come through CAN.
property bool viewChange: false
property bool rightViewChange: false
property string gearString: "1"
property int rpm: 1450
property double engineTemperature: 40
property int totalDistance: 42300
property int kmSinceCharge: 8
property int avRangePerCharge: 425
property int energyPerKm: 324
property real totalDistanceSince: 10
}

View File

@ -1,71 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** 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.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../../etcprovider.h"
#include "../../circularindicator.h"
#include "../../gauge.h"
#include <QtQml/qqmlextensionplugin.h>
#include <QDebug>
class ClusterDemoPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
ClusterDemoPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) {}
void registerTypes(const char *) override
{
qmlRegisterType<CircularIndicator>("ClusterDemo", 1, 0, "CircularIndicator");
qmlRegisterType<Gauge>("ClusterDemo", 1, 0, "GaugeFiller");
qmlRegisterSingletonType(QUrl("qrc:/ValueSource.qml"), "ClusterDemo", 1, 0, "ValueSource");
}
void initializeEngine(QQmlEngine *engine, const char *uri) override
{
EtcProvider *etcProvider = new EtcProvider();
etcProvider->setBaseUrl(QUrl("qrc:///images/"));
engine->addImageProvider("etc", etcProvider);
QQmlExtensionPlugin::initializeEngine(engine, uri);
}
};
#include "plugin.moc"

View File

@ -1,40 +0,0 @@
CXX_MODULE = qml
TARGET = clusterdemo
QT += qml quick
TEMPLATE = lib
CONFIG -= debug
CONFIG += release
DESTDIR = $$PWD
TARGET = $$qtLibraryTarget($$TARGET)
OUT_PWD = $$PWD
SOURCES += \
plugin.cpp \
../../etcprovider.cpp \
../../circularindicator.cpp \
../../gauge.cpp \
../../gaugenode.cpp
HEADERS += \
../../etcprovider.h \
../../circularindicator.h \
../../gauge.h \
../../gaugenode.h
RESOURCES += plugin.qrc \
../../images.qrc \
../../sportsimages.qrc \
../../hybridimages.qrc
DISTFILES = qmldir
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
copy_qmldir.target = $$OUT_PWD/qmldir
copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
QMAKE_EXTRA_TARGETS += copy_qmldir
PRE_TARGETDEPS += $$copy_qmldir.target
}

View File

@ -1,5 +0,0 @@
<RCC>
<qresource prefix="/">
<file>ValueSource.qml</file>
</qresource>
</RCC>

View File

@ -1,3 +0,0 @@
module ClusterDemo
plugin clusterdemo
singleton ValueSource 1.0 ValueSource.qml

View File

@ -1,76 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "etcprovider.h"
#include <QFile>
#include <QDebug>
#include <qopenglfunctions.h>
#include <qqmlfile.h>
QImage EtcProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
{
Q_UNUSED(requestedSize);
QImage ret;
QUrl url = QUrl(id);
if (url.isRelative() && !m_baseUrl.isEmpty())
url = m_baseUrl.resolved(url);
QString path = QQmlFile::urlToLocalFileOrQrc(url);
ret.load(path);
*size = ret.size();
return ret;
}
void EtcProvider::setBaseUrl(const QUrl &base)
{
m_baseUrl = base;
}

View File

@ -1,55 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef ETCPROVIDER_H
#define ETCPROVIDER_H
#include <qopengl.h>
#include <QQuickImageProvider>
#include <QtQuick/QSGTexture>
#include <QUrl>
class EtcProvider : public QQuickImageProvider
{
public:
EtcProvider() : QQuickImageProvider(QQuickImageProvider::Image)
{}
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize);
void setBaseUrl(const QUrl &base);
private:
QUrl m_baseUrl;
};
#endif // ETCPROVIDER_H

View File

@ -1,286 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "gauge.h"
#include "gaugenode.h"
#include <QtQuick/qsgnode.h>
#include <QtQuick/qsgflatcolormaterial.h>
#include <QtMath>
Gauge::Gauge(QQuickItem *parent)
: QQuickItem(parent)
, m_value(0)
, m_angle(0)
, m_numVertices(128)
, m_fillWidth(10)
, m_radius(0)
, m_updateGeometry(true)
, m_lefttoright(true)
, m_minAngle(0)
, m_maxAngle(270)
, m_minValue(0)
, m_maxValue(240)
, m_doNotFill(false)
, m_color(QColor(255, 0, 0))
, arc_length(0)
, arc_dist_per_vertices(0)
, frontCutDeg(0.0)
, backCutDeg(0.0)
, frontCutRad(0.0)
, backCutRad(0.0)
, m_cutRad(0)
{
setFlag(ItemHasContents, true);
}
Gauge::~Gauge()
{
}
void Gauge::setValue(qreal value)
{
if (m_value == value)
return;
m_value = value;
updateValue();
emit valueChanged(value);
update();
}
void Gauge::setNumVertices(int numVertices)
{
if (m_numVertices == numVertices)
return;
m_numVertices = numVertices;
emit numVerticesChanged(numVertices);
update();
}
void Gauge::setFillWidth(double fillWidth)
{
if (m_fillWidth == fillWidth)
return;
m_fillWidth = fillWidth;
emit fillWidthChanged(m_fillWidth);
update();
}
void Gauge::setRadius(int radius)
{
if (m_radius == radius)
return;
m_radius = radius;
emit radiusChanged(m_radius);
update();
}
void Gauge::setMinAngle(double minAngle)
{
if (m_minAngle == minAngle)
return;
m_minAngle = minAngle;
backCutDeg = m_minAngle;
backCutRad = qDegreesToRadians(backCutDeg);
if (m_minAngle < m_maxAngle)
m_lefttoright = true;
else
m_lefttoright = false;
updateValue();
emit minAngleChanged(m_minAngle);
update();
}
void Gauge::setMaxAngle(double maxAngle)
{
if (m_maxAngle == maxAngle)
return;
m_maxAngle = maxAngle;
if (m_minAngle < m_maxAngle)
m_lefttoright = true;
else
m_lefttoright = false;
updateValue();
emit maxAngleChanged(m_maxAngle);
update();
}
void Gauge::setMinValue(double minValue)
{
if (m_minValue == minValue)
return;
m_minValue = minValue;
emit minValueChanged(m_minValue);
update();
}
void Gauge::setMaxValue(double maxValue)
{
if (m_maxValue == maxValue)
return;
m_maxValue = maxValue;
emit maxValueChanged(m_maxValue);
update();
}
void Gauge::setDoNotFill(bool doNotFill)
{
if (m_doNotFill == doNotFill)
return;
m_doNotFill = doNotFill;
emit doNotFillChanged(m_doNotFill);
update();
}
void Gauge::setColor(QColor color)
{
if (m_color == color)
return;
m_color = color;
emit colorChanged(m_color);
update();
}
void Gauge::setUpdateGeometry(bool updateGeometry)
{
if (m_updateGeometry == updateGeometry)
return;
m_updateGeometry = updateGeometry;
if (m_updateGeometry)
calcArc();
else
m_cutRad = calcValueAsRad(m_value);
update();
}
float Gauge::calcValueAsRad(qreal value)
{
return qDegreesToRadians((m_minAngle + ((m_maxAngle - m_minAngle) / (m_maxValue - m_minValue))
* (value - m_minValue)) - 180.);
}
void Gauge::updateValue()
{
if (m_updateGeometry)
calcArc();
else
m_cutRad = calcValueAsRad(m_value);
}
void Gauge::calcArc()
{
backCutDeg = m_minAngle;
backCutRad = qDegreesToRadians(backCutDeg - 270);
if (m_updateGeometry) {
m_angle = ((m_maxAngle - m_minAngle) / (m_maxValue - m_minValue))
* (m_value - m_minValue);
} else {
m_angle = ((m_maxAngle - m_minAngle) / (m_maxValue - m_minValue))
* (m_maxValue - m_minValue);
}
arc_length = qDegreesToRadians(m_angle);
arc_dist_per_vertices = arc_length / m_numVertices;
emit angleChanged(m_angle);
}
QSGNode *Gauge::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
{
GaugeNode *n = static_cast<GaugeNode *>(oldNode);
if (!n)
n = new GaugeNode(m_numVertices, m_color, m_doNotFill);
n->setLeftToRight(m_lefttoright);
n->setColor(m_color);
n->setBoundingRect(boundingRect());
n->setUpdateGeometry(m_updateGeometry);
n->setDoNotFill(m_doNotFill);
n->setBackCutRad(backCutRad);
n->setRadius(m_radius);
n->setArcDistPerVert(arc_dist_per_vertices);
n->setNumVertices(m_numVertices);
n->setFillWidth(m_fillWidth);
if (!m_updateGeometry)
n->setCutRad(m_cutRad);
n->draw();
return n;
}
void Gauge::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
QQuickItem::geometryChanged(newGeometry, oldGeometry);
if (m_radius == 0)
setRadius(newGeometry.height() * 0.5);
calcArc();
update();
}

View File

@ -1,161 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef GAUGE_H
#define GAUGE_H
#include <QQuickItem>
#include <QColor>
class Gauge : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged)
Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged)
Q_PROPERTY(int numVertices READ numVertices WRITE setNumVertices NOTIFY numVerticesChanged)
Q_PROPERTY(bool updateGeometry READ updateGeometry WRITE setUpdateGeometry NOTIFY updateGeometryChanged)
Q_PROPERTY(double fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged)
Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(double minAngle READ minAngle WRITE setMinAngle NOTIFY minAngleChanged)
Q_PROPERTY(double maxAngle READ maxAngle WRITE setMaxAngle NOTIFY maxAngleChanged)
Q_PROPERTY(double minValue READ minValue WRITE setMinValue NOTIFY minValueChanged)
Q_PROPERTY(double maxValue READ maxValue WRITE setMaxValue NOTIFY maxValueChanged)
Q_PROPERTY(bool doNotFill READ doNotFill WRITE setDoNotFill NOTIFY doNotFillChanged)
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
public:
Gauge(QQuickItem *parent = 0);
~Gauge();
QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
qreal value() const { return m_value; }
qreal angle() const { return m_angle; }
bool updateGeometry() const { return m_updateGeometry; }
int numVertices() const { return m_numVertices; }
double fillWidth() const { return m_fillWidth; }
int radius() const { return m_radius; }
double minAngle() const { return m_minAngle; }
double maxAngle() const { return m_maxAngle; }
double minValue() const { return m_minValue; }
double maxValue() const { return m_maxValue; }
bool doNotFill() const { return m_doNotFill; }
QColor color() const { return m_color; }
void setValue(qreal value);
void setNumVertices(int numVertices);
void setFillWidth(double fillWidth);
void setRadius(int radius);
void setMinAngle(double minAngle);
void setMaxAngle(double maxAngle);
void setMinValue(double minValue);
void setMaxValue(double maxValue);
void setDoNotFill(bool doNotFill);
void setColor(QColor color);
void setUpdateGeometry(bool updateGeometry);
signals:
void valueChanged(qreal value);
void angleChanged(qreal angle);
void numVerticesChanged(int numVertices);
void fillWidthChanged(double fillWidth);
void radiusChanged(int radius);
void minAngleChanged(double minAngle);
void maxAngleChanged(double maxAngle);
void minValueChanged(double minValue);
void maxValueChanged(double maxValue);
void doNotFillChanged(bool doNotFill);
void colorChanged(QColor color);
void updateGeometryChanged(bool updateGeometry);
public slots:
private:
void calcArc();
float calcValueAsRad(qreal value);
void updateValue();
private:
qreal m_value;
double m_angle;
int m_numVertices;
double m_fillWidth;
int m_radius;
bool m_updateGeometry;
bool m_lefttoright;
double m_minAngle;
double m_maxAngle;
double m_minValue;
double m_maxValue;
bool m_doNotFill;
QColor m_color;
//Internal
double arc_length;
double arc_dist_per_vertices;
double frontCutDeg;
double backCutDeg;
double frontCutRad;
double backCutRad;
float m_cutRad;
};
#endif // GAUGE_H

View File

@ -1,328 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "gaugenode.h"
#include <QtQuick/qsgnode.h>
#include <QtQuick/qsgflatcolormaterial.h>
#include <QtMath>
#define EXTRAVERTICES 3
GaugeNode::GaugeNode(const int &numVertices, const QColor &color = QColor(255, 0, 0),
const bool &doNotFill = false)
: QSGGeometryNode()
//Could be optimized more. If only geometry update used we do not need to map textured points.
//, m_geometry(QSGGeometry::defaultAttributes_Point2D(), numVertices+EXTRAVERTICES)
, m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), numVertices+EXTRAVERTICES)
, m_material(nullptr)
, m_numVertices(numVertices)
, m_doNotFill(doNotFill)
, m_color(color)
, m_cutRad(0.0)
, m_updateGeometry(true)
, m_lefttoright(true)
, m_dirtyBits(0)
{
initGeometry();
}
GaugeNode::~GaugeNode()
{
if (m_material)
delete m_material;
}
void GaugeNode::setColor(const QColor &color)
{
if (m_color == color)
return;
m_color = color;
m_dirtyBits |= QSGNode::DirtyMaterial;
}
void GaugeNode::setCutRad(const float &cutRad)
{
if (m_cutRad == cutRad)
return;
m_cutRad = cutRad;
if (!m_updateGeometry)
m_dirtyBits |= QSGNode::DirtyMaterial;
}
void GaugeNode::setDoNotFill(const bool &doNotFill)
{
if (m_doNotFill == doNotFill)
return;
m_doNotFill = doNotFill;
if (m_doNotFill)
m_geometry.setDrawingMode(GL_LINE_STRIP);
else
m_geometry.setDrawingMode(GL_TRIANGLE_STRIP);
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setBackCutRad(const double &backCutRad)
{
if (backCutRad == m_backCutRad)
return;
m_backCutRad = backCutRad;
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setRadius(const double &radius)
{
if (m_radius == radius)
return;
m_radius = radius;
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setArcDistPerVert(const double &dist)
{
if (dist == m_arc_dist_per_vertices)
return;
m_arc_dist_per_vertices = dist;
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setNumVertices(const int &numVertices)
{
if (numVertices == m_numVertices)
return;
m_numVertices = numVertices;
m_geometry.allocate(m_numVertices + 3);
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setFillWidth(const double &fillWidth)
{
if (m_fillWidth == fillWidth)
return;
m_fillWidth = fillWidth;
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setBoundingRect(const QRectF &rect)
{
if (rect.width() == m_width && rect.height() == m_height)
return;
m_height = rect.height();
m_width = rect.width();
setCenterPoint(rect.center());
m_dirtyBits |= QSGNode::DirtyGeometry;
}
void GaugeNode::setCenterPoint(const QPointF &center)
{
m_center_x = center.x();
m_center_y = center.y();
}
void GaugeNode::setUpdateGeometry(const bool &updateGeometry)
{
if (m_updateGeometry == updateGeometry)
return;
m_updateGeometry = updateGeometry;
if (m_material)
delete m_material;
if (m_updateGeometry) {
QSGFlatColorMaterial *material = new QSGFlatColorMaterial;
m_material = static_cast<QSGMaterial *>(material);
material->setColor(m_color);
setMaterial(m_material);
} else {
QSGSimpleMaterial<GaugeState> *material = GaugeShader::createMaterial();
m_material = static_cast<QSGMaterial *>(material);
material->state()->color = m_color;
material->state()->cutRad = m_cutRad;
material->state()->leftToRight = m_lefttoright;
material->setFlag(QSGMaterial::Blending);
setMaterial(m_material);
}
m_dirtyBits |= QSGNode::DirtyMaterial;
}
void GaugeNode::setLeftToRight(const bool &ltr)
{
if (m_lefttoright == ltr)
return;
m_lefttoright = ltr;
m_dirtyBits |= QSGNode::DirtyMaterial;
}
void GaugeNode::drawGeometryTexturePoint2D()
{
QSGGeometry::TexturedPoint2D *vertices = m_geometry.vertexDataAsTexturedPoint2D();
double current_angle_rad = 0.0;
double currentRadius = m_radius;
double d_arc_point_x = m_center_x + (currentRadius - m_fillWidth) * cos(m_backCutRad);
double d_arc_point_y = m_center_y + (currentRadius - m_fillWidth) * sin(m_backCutRad);
vertices[0].set(d_arc_point_x, d_arc_point_y,
d_arc_point_x / m_width, d_arc_point_y / m_height);
d_arc_point_x = m_center_x + currentRadius * cos(m_backCutRad);
d_arc_point_y = m_center_y + currentRadius * sin(m_backCutRad);
vertices[1].set(d_arc_point_x, d_arc_point_y,
d_arc_point_x / m_width, d_arc_point_y / m_height);
d_arc_point_x = 0;
d_arc_point_y = 0;
for (int i = 0; i < m_numVertices; ++i) {
current_angle_rad = m_backCutRad + i * m_arc_dist_per_vertices + m_arc_dist_per_vertices;
if (i % 2 == 0)
currentRadius -= m_fillWidth;
else
currentRadius += m_fillWidth;
d_arc_point_x = m_center_x + currentRadius * cos(current_angle_rad);
d_arc_point_y = m_center_y + currentRadius * sin(current_angle_rad);
vertices[i + 2].set(d_arc_point_x, d_arc_point_y,
d_arc_point_x / m_width, d_arc_point_y / m_height);
}
d_arc_point_x = m_center_x + (currentRadius - m_fillWidth) * cos(current_angle_rad);
d_arc_point_y = m_center_y + (currentRadius - m_fillWidth) * sin(current_angle_rad);
vertices[m_numVertices + 2].set(d_arc_point_x, d_arc_point_y,
d_arc_point_x / m_width, d_arc_point_y / m_height);
}
void GaugeNode::drawMaterial()
{
if (m_updateGeometry) {
static_cast<QSGFlatColorMaterial *>(m_material)->setColor(m_color);
} else {
GaugeState *s = static_cast<QSGSimpleMaterial<GaugeState> *>(m_material)->state();
s->color = m_color;
s->cutRad = m_cutRad;
s->leftToRight = m_lefttoright;
}
}
void GaugeNode::draw()
{
if (m_dirtyBits == 0)
return;
if (m_dirtyBits.testFlag(QSGNode::DirtyGeometry))
drawGeometryTexturePoint2D();
if (m_dirtyBits.testFlag(QSGNode::DirtyMaterial))
drawMaterial();
markDirty(m_dirtyBits);
m_dirtyBits = 0;
}
//Could be used to optimize vertices if only geometry is changed
void GaugeNode::drawGeometry()
{
QSGGeometry::Point2D *vertices = m_geometry.vertexDataAsPoint2D();
double d_arc_point_x = 0.0;
double d_arc_point_y = 0.0;
double current_angle_rad = 0.0;
double currentRadius = m_radius;
vertices[0].set(m_center_x + (currentRadius - m_fillWidth) * cos(m_backCutRad), m_center_y
+ (currentRadius - m_fillWidth) * sin(m_backCutRad));
vertices[1].set(m_center_x + currentRadius * cos(m_backCutRad), m_center_y
+ currentRadius * sin(m_backCutRad));
for (int i = 0; i < m_numVertices; ++i) {
current_angle_rad = m_backCutRad + i * m_arc_dist_per_vertices + m_arc_dist_per_vertices;
if (i % 2 == 0)
currentRadius -= m_fillWidth;
else
currentRadius += m_fillWidth;
d_arc_point_x = m_center_x + currentRadius * cos(current_angle_rad);
d_arc_point_y = m_center_y + currentRadius * sin(current_angle_rad);
vertices[i + 2].set(d_arc_point_x, d_arc_point_y);
}
vertices[m_numVertices + 2].set(m_center_x + (currentRadius - m_fillWidth)
* cos(current_angle_rad), m_center_y
+ (currentRadius - m_fillWidth) * sin(current_angle_rad));
markDirty(QSGNode::DirtyGeometry | QSGNode::DirtyMaterial);
}
void GaugeNode::initGeometry()
{
m_geometry.setLineWidth(1);
if (m_doNotFill)
m_geometry.setDrawingMode(GL_LINE_STRIP);
else
m_geometry.setDrawingMode(GL_TRIANGLE_STRIP);
setGeometry(&m_geometry);
QSGFlatColorMaterial *material = new QSGFlatColorMaterial;
material->setColor(m_color);
m_material = static_cast<QSGMaterial *>(material);
setMaterial(m_material);
}

View File

@ -1,186 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef GAUGENODE_H
#define GAUGENODE_H
#include <QSGNode>
#include <QSGSimpleMaterial>
#include <QColor>
struct GaugeState
{
QColor color;
GLfloat cutRad;
bool leftToRight;
int compare(const GaugeState *other) const
{
const unsigned int c = color.rgba();
const unsigned int co = other->color.rgba();
return std::tie(c, cutRad) > std::tie(co, other->cutRad);
}
};
class GaugeShader : public QSGSimpleMaterialShader<GaugeState>
{
QSG_DECLARE_SIMPLE_COMPARABLE_SHADER(GaugeShader, GaugeState)
public:
const char *vertexShader() const {
return
"attribute highp vec4 aVertex; \n"
"attribute highp vec2 aTexCoord; \n"
"uniform highp mat4 qt_Matrix; \n"
"varying highp vec2 texCoord; \n"
"void main() { \n"
" gl_Position = qt_Matrix * aVertex; \n"
" texCoord = aTexCoord; \n"
"}";
}
const char *fragmentShader() const {
return
"uniform lowp float qt_Opacity; \n"
"uniform lowp vec4 color; \n"
"uniform highp float cutRad; \n"
"uniform lowp bool leftToRight; \n"
"varying highp vec2 texCoord; \n"
"void main() {\n"
" highp vec2 uv = vec2(.5 - texCoord.y, .5 - texCoord.x);\n"
" if (leftToRight ? (-atan(uv.y,uv.x) < cutRad) : (-atan(uv.y,uv.x) > cutRad)) {\n"
" gl_FragColor = color * qt_Opacity;\n"
" } else {\n"
//debug color " gl_FragColor = vec4(0.,1.,0.,1.0);\n"
" gl_FragColor = vec4(0.,0.,0.,0.);\n"
" } \n"
"}\n";
}
QList<QByteArray> attributes() const
{
return QList<QByteArray>() << "aVertex" << "aTexCoord";
}
void updateState(const GaugeState *state, const GaugeState *)
{
program()->setUniformValue(id_color, state->color);
program()->setUniformValue(id_cutRad, state->cutRad);
program()->setUniformValue(id_leftToRight, state->leftToRight);
}
void resolveUniforms()
{
id_color = program()->uniformLocation("color");
id_cutRad = program()->uniformLocation("cutRad");
id_leftToRight = program()->uniformLocation("leftToRight");
}
private:
int id_color;
int id_cutRad;
int id_leftToRight;
};
class GaugeNode : public QSGGeometryNode
{
public:
GaugeNode(const int &numVertices, const QColor &color, const bool &doNotFill);
~GaugeNode();
void setColor(const QColor &color);
void setCutRad(const float &cutRad);
void setDoNotFill(const bool &doNotFill);
void setBackCutRad(const double &backCutRad);
void setRadius(const double &radius);
void setArcDistPerVert(const double &dist);
void setNumVertices(const int &numVertices);
void setFillWidth(const double &fillWidth);
void setBoundingRect(const QRectF &rect);
void setUpdateGeometry(const bool &updateGeometry);
void setLeftToRight(const bool &ltr);
void draw();
private:
void initGeometry();
void setCenterPoint(const QPointF &center);
void drawGeometry();
void drawGeometryTexturePoint2D();
void drawMaterial();
private:
QSGGeometry m_geometry;
QSGMaterial *m_material;
int m_numVertices;
bool m_doNotFill;
QColor m_color;
float m_cutRad;
double m_radius;
bool m_updateGeometry;
bool m_lefttoright;
qreal m_width;
qreal m_height;
double m_center_y;
double m_center_x;
double m_backCutRad;
double m_fillWidth;
double m_arc_dist_per_vertices;
DirtyState m_dirtyBits;
};
#endif // GAUGENODE_H

View File

@ -1,27 +0,0 @@
<RCC>
<qresource prefix="/">
<file>images/Built_with_Qt.png</file>
<file>images/BottomPanel.png</file>
<file>images/Cluster8Gauges.png</file>
<file>images/SpeedometerNeedle.png</file>
<file>images/jane.png</file>
<file>images/john.png</file>
<file>images/calendar.png</file>
<file>images/CarInfoIcon.png</file>
<file>images/contacts.png</file>
<file>images/cover.png</file>
<file>images/Icon_TurnLeft_OFF_small.png</file>
<file>images/Icon_TurnLeft_ON_small.png</file>
<file>images/greenglow.png</file>
<file>images/knob.png</file>
<file>images/knob_small.png</file>
<file>images/left.png</file>
<file>images/leftgauge.png</file>
<file>images/redglow.png</file>
<file>images/right.png</file>
<file>images/rightgauge.png</file>
<file>images/temperature.png</file>
<file>images/center.png</file>
<file>images/SpeedometerNeedleSmall.png</file>
</qresource>
</RCC>

View File

@ -1,26 +0,0 @@
<RCC>
<qresource prefix="/">
<file>qml/dash_hybrid/BottomPanel.ui.qml</file>
<file>qml/dash_hybrid/CenterView.qml</file>
<file>qml/dash_hybrid/Dashboard.qml</file>
<file>qml/dash_hybrid/DashboardFrame.qml</file>
<file>qml/dash_hybrid/DashboardView.qml</file>
<file>qml/dash_hybrid/gauges/FpsMeter.qml</file>
<file>qml/dash_hybrid/gauges/TemperatureMeter.qml</file>
<file>qml/dash_hybrid/gauges/TurboMeter.qml</file>
<file>qml/dash_hybrid/CenterViewCalendar.qml</file>
<file>qml/dash_hybrid/CenterViewCarInfo.qml</file>
<file>qml/dash_hybrid/CenterViewContacts.qml</file>
<file>qml/dash_hybrid/CenterViewMusic.qml</file>
<file>qml/dash_hybrid/CarInfoField.qml</file>
<file>qml/dash_hybrid/DashboardForm.ui.qml</file>
<file>qml/dash_hybrid/SafeRendererPicture.qml</file>
<file>qml/dash_hybrid/DashboardBackground.qml</file>
<file>qml/dash_hybrid/DashboardBackgroundForm.ui.qml</file>
<file>qml/dash_hybrid/Gadget.qml</file>
<file>qml/dash_hybrid/gauges/LargeMeter.qml</file>
<file>qml/dash_hybrid/gauges/SmallMeter.qml</file>
<file>qml/dash_hybrid/gauges/SpeedometerNumbers.qml</file>
<file>qml/dash_hybrid/gauges/NumberLabel.qml</file>
</qresource>
</RCC>

View File

@ -1,14 +0,0 @@
<RCC>
<qresource prefix="/">
<file>images/Icon_TurnLeft_OFF.png</file>
<file>images/Icon_TurnLeft_ON.png</file>
<file>images/MapLocation.png</file>
<file>images/MusicPlayer_CircleRemaining.png</file>
<file>images/MusicPlayer_Cover.png</file>
<file>images/RearCameraOverlay.png</file>
<file>images/CarForParkSensors.png</file>
<file>images/ParkingSensorOff.png</file>
<file>images/InfoNoteBackground.png</file>
<file>images/RearCameraStill.jpg</file>
</qresource>
</RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,6 +0,0 @@
#!/bin/bash
while read -r line || [[ -n "$line" ]]; do
echo "Text: $line";
convert $line -write mpr:temp -background black -alpha Remove mpr:temp -compose Copy_Opacity -composite ../images-premultiplied-alpha/$line
done < "$1"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RCC>
<qresource prefix="/">
<file>iso-icons/iso_grs_7000_4_0083.dat</file>
<file>iso-icons/iso_grs_7000_4_1434A.dat</file>
<file>iso-icons/iso_grs_7000_4_0246.dat</file>
<file>iso-icons/iso_grs_7000_4_0245.dat</file>
<file>iso-icons/iso_grs_7000_4_0247.dat</file>
<file>iso-icons/iso_grs_7000_4_1555.dat</file>
<file>iso-icons/iso_grs_7000_4_1702.dat</file>
<file>iso-icons/iso_grs_7000_4_0249.dat</file>
<file>iso-icons/iso_grs_7000_4_0238.dat</file>
<file>iso-icons/iso_grs_7000_4_0456.dat</file>
</qresource>
</RCC>

View File

@ -1,119 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifdef QT_3DCORE_LIB
#include "scenehelper.h"
#endif
#include "gauge.h"
#include "qtiviclusterdata.h"
#include "circularindicator.h"
#include <QtQml/QQmlApplicationEngine>
#include <QtGui/QFont>
#include <QtGui/QFontDatabase>
#include <QtGui/QGuiApplication>
#include <QtQuick/QQuickView>
#include "etcprovider.h"
#ifdef STATIC
#include <QtPlugin>
#include <QQmlExtensionPlugin>
Q_IMPORT_PLUGIN(QtQuick2Plugin)
Q_IMPORT_PLUGIN(QtQuickScene3DPlugin)
Q_IMPORT_PLUGIN(Qt3DQuick3DCorePlugin)
Q_IMPORT_PLUGIN(Qt3DQuick3DRenderPlugin)
#endif
int main(int argc, char **argv)
{
qputenv("QT_QPA_EGLFS_HIDECURSOR", "1");
qputenv("QT_QPA_EGLFS_DISABLE_INPUT", "1");
// qputenv("QT_QPA_EGLFS_INTEGRATION", "eglfs_viv");
qputenv("FB_MULTI_BUFFER", "2");
qputenv("QT_QPA_EGLFS_WIDTH", "1280");
qputenv("QT_QPA_EGLFS_HEIGHT", "480");
qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", "1280");
qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", "480");
qputenv("QT_QPA_FONTDIR", ".");
// iPad Air, iPad Air 2, iPad Pro (9.7 inch), iPad Pro (12.9 inch), iPad Retina
// qputenv("QT_SCALE_FACTOR", "0.8");
// iPhone 5, iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone SE
// qputenv("QT_SCALE_FACTOR", "0.44");
#ifdef STATIC
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2Plugin().instance())->registerTypes("QtQuick");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuickScene3DPlugin().instance())->registerTypes("QtQuick.Scene3D");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_Qt3DQuick3DCorePlugin().instance())->registerTypes("Qt3D.Core");
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_Qt3DQuick3DRenderPlugin().instance())->registerTypes("Qt3D.Render");
#endif
QGuiApplication app(argc, argv);
#ifdef QT_3DCORE_LIB
qmlRegisterType<SceneHelper>("Qt3D.Examples", 2, 0, "SceneHelper");
#endif
qmlRegisterType<QtIVIClusterData>("ClusterDemoData", 1, 0, "ClusterData");
qmlRegisterType<Gauge>("ClusterDemo", 1, 0, "GaugeFiller");
qmlRegisterType<CircularIndicator>("ClusterDemo", 1, 0, "CircularIndicator");
qmlRegisterSingletonType(QUrl("qrc:/qml/ValueSource.qml"), "ClusterDemo", 1, 0, "ValueSource");
QQuickView view;
EtcProvider *etcProvider = new EtcProvider();
etcProvider->setBaseUrl(QUrl("qrc:///images/"));
view.engine()->addImageProvider("etc", etcProvider);
view.setColor(QColor(Qt::black));
view.setWidth(1280);
view.setHeight(480);
view.engine()->addImportPath("qrc:/imports/");
bool sportsCar = false;
if (app.arguments().count() > 1)
sportsCar = app.arguments().at(1) == "sports";
if (sportsCar)
view.setSource(QUrl("qrc:/qml/dash_sports/DashboardFrame.qml"));
else
view.setSource(QUrl("qrc:/qml/dash_hybrid/DashboardFrame.qml"));
view.show();
return app.exec();
}

View File

@ -1,186 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Scene3D 2.0
import QtQuick.Window 2.1
Window {
id: root
property bool leftView: true
visible: true
width: 1280
height: 480
color: "Black"
title: "iCluster"
property bool toggleCarView: false
property bool carVisible: true
property int carModelHighlightType
property bool actionInProgress
property bool rightStack
Timer {
// Dummy timer, does nothing
id: returnView
interval: 1.0
}
CarViewSports {
id: carView
width: root.width
height: root.height
visible: true
hidden: false
}
// CarViewElectric {
// id: carView
// width: root.width
// height: root.height
// visible: true
// hidden: false
// }
Rectangle {
id: buttonToggleVisible
width: 100
height: 50
radius: 5
border.color: "green"
border.width: 2
anchors.right: parent.right
anchors.rightMargin: 5
anchors.topMargin: 5
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "Visible"
}
MouseArea {
anchors.fill: parent
onClicked: {
if (carVisible == false) {
console.log("Show car")
carView.hidden = false
carVisible = true
buttonToggleVisible.border.color = "green"
} else {
console.log("Hide car")
carView.hidden = true
carVisible = false
buttonToggleVisible.border.color = "red"
}
}
}
}
Rectangle {
id: buttonHighlightTire
width: 100
height: 50
radius: 5
border.color: "green"
border.width: 2
anchors.right: parent.right
anchors.top: buttonToggleVisible.bottom
anchors.rightMargin: 5
anchors.topMargin: 5
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "Tire"
}
MouseArea {
anchors.fill: parent
onClicked: {
carView.highlightTire()
}
}
}
Rectangle {
id: buttonHighlightLamp
width: 100
height: 50
radius: 5
border.color: "green"
border.width: 2
anchors.right: parent.right
anchors.top: buttonHighlightTire.bottom
anchors.rightMargin: 5
anchors.topMargin: 5
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "Lamp"
}
MouseArea {
anchors.fill: parent
onClicked: {
carView.highlightLamp()
}
}
}
Rectangle {
id: buttonHighlightDoor
width: 100
height: 50
radius: 5
border.color: "green"
border.width: 2
anchors.right: parent.right
anchors.top: buttonHighlightLamp.bottom
anchors.rightMargin: 5
anchors.topMargin: 5
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "Doors"
}
MouseArea {
anchors.fill: parent
onClicked: {
carView.highlightDoors(Math.floor(Math.random() * 63) + 1)
}
}
}
// FpsCounter {
// visible: true
// z: 3
// }
}

View File

@ -1,569 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import Qt3D.Core 2.0
import Qt3D.Render 2.0
import Qt3D.Extras 2.0
import Qt3D.Examples 2.0
import QtQuick 2.5 as Quick
import QtQuick.Scene3D 2.0
Entity
{
id: carModelEntity
property bool hidden: true
property Scene3D scene
property real carRotation: 0.0
property var previousComponent: undefined
property var previousMaterial
property vector3d defaultCameraPosition: Qt.vector3d(0.0, 10.0, 30.0)
property vector3d defaultLightPosition: Qt.vector3d(0.0, 30.0, 11.0)
property vector3d lightPosition: defaultLightPosition
property vector3d cameraPos: defaultCameraPosition
property vector3d lightPos: defaultLightPosition
property real lightPosMultiplier: 1.75
property int door_left: 1
property int door_right: 2
property int door_trunk: 4
property int door_hood: 8
property bool highlighting: false
property bool doorAction: false
property int highlightType: 0
property int defaultHighlight: 99
// Preset camera positions for highlights
// Light positions can use the same vectors, but with a multiplier to move it further or closer
// Lamp highlights
property vector3d positionFrontLeftHigh: Qt.vector3d(5.0, 4.0, 15.0) // Left headlight
property vector3d positionFrontRightHigh: Qt.vector3d(-5.0, 4.0, 15.0) // Right headlight
property vector3d positionFrontLeftLow: Qt.vector3d(3.0, 2.0, 15.0) // Left day light
property vector3d positionFrontRightLow: Qt.vector3d(-3.0, 2.0, 15.0) // Right day light
property vector3d positionRearLeft: Qt.vector3d(5.0, 5.0, -15.0) // Left tail light
property vector3d positionRearRight: Qt.vector3d(-5.0, 5.0, -15.0) // Right tail light
// Tire highlights
property vector3d positionLeftRear: Qt.vector3d(10.0, 2.0, -12.5)
property vector3d positionLeftFront: Qt.vector3d(10.0, 2.0, 12.5)
property vector3d positionRightRear: Qt.vector3d(-10.0, 2.0, -12.5)
property vector3d positionRightFront: Qt.vector3d(-10.0, 2.0, 12.5)
// Door highlights
property vector3d positionLeft: Qt.vector3d(35.0, 10.0, 0.0) // Doors on the left
property vector3d positionRight: Qt.vector3d(-35.0, 10.0, 0.0) // Doors on the right
property vector3d positionTop: Qt.vector3d(0.0, 40.0, 1.0) // Doors on both sides
property vector3d positionBack: Qt.vector3d(0.0, 20.0, -20.0) // Trunk
property vector3d positionFront: Qt.vector3d(0.0, 20.0, 20.0) // Hood
// Original
property color bodyColor: Qt.rgba(0.6270588, 0.04137255, 0.04137255, 1.0)
property color interiorColor: Qt.rgba(0.17, 0.17, 0.18, 1.0)
property color highlightColor: "orange"
// Blue
// property color bodyColor: "navy"
// property color interiorColor: "darkslateblue"
// property color highlightColor: "orange"
// Perky
// property color bodyColor: "chartreuse"
// property color interiorColor: "orangered"
// property color highlightColor: "yellow"
// Pink
// property color bodyColor: "deeppink"
// property color interiorColor: "thistle"
// property color highlightColor: "orange"
// Orange
// property color bodyColor: "orangered"
// property color interiorColor: "saddlebrown"
// property color highlightColor: "yellow"
// Yellow
// property color bodyColor: "gold"
// property color interiorColor: "dimgray"
// property color highlightColor: "red"
Camera {
id: camera
projectionType: CameraLens.PerspectiveProjection
fieldOfView: 45
aspectRatio: scene.width / scene.height
nearPlane: 0.1
farPlane: 100.0
position: defaultCameraPosition
upVector: Qt.vector3d(0.0, 1.0, 0.0)
viewCenter: Qt.vector3d(0.0, 0.0, 0.0)
}
Entity {
components: [
Transform {
translation: lightPosition
},
PointLight {
color: "white"
intensity: 1.0
}
]
}
RenderSettings {
Viewport {
RenderSurfaceSelector {
ClearBuffers {
buffers: ClearBuffers.ColorDepthBuffer
NoDraw { } // Just clear
}
CameraSelector {
camera: camera
NoDraw {
enabled: hidden
}
}
}
}
}
// Materials for the parts that need highlighting
PhongMaterial {
id: bodyMaterial
ambient: Qt.rgba(0.05, 0.05, 0.05, 1.0)
diffuse: bodyColor
specular: Qt.rgba(0.7686275, 0.6196079, 0.3568628, 1.0)
shininess: 164
}
PhongMaterial {
id: bodyMaterialHighlight
ambient: Qt.rgba(0.05, 0.05, 0.05, 1.0)
diffuse: highlightColor
shininess: 164
}
PhongMaterial {
id: tireMaterial
ambient: Qt.rgba(0.05, 0.05, 0.05, 1.0)
specular: Qt.rgba(0.594, 0.594, 0.594, 1.0)
diffuse: "black"
shininess: 51
}
PhongMaterial {
id: tireMaterialHighlight
ambient: Qt.rgba(0.05, 0.05, 0.05, 1.0)
specular: Qt.rgba(0.594, 0.594, 0.594, 1.0)
diffuse: highlightColor
shininess: 51
}
DiffuseMapMaterial {
id: lampsMaterial
ambient: Qt.rgba(0.75, 0.75, 0.75, 1.0)
specular: Qt.rgba(0.279, 0.279, 0.279, 1.0)
diffuse: TextureLoader { source: "qrc:/Map11.jpg" }
shininess: 31
}
// bodyMaterialHighlight is used for lamp highlight
// Materials for the parts that do not otherwise work correctly
// Material {
// id: transparentGlassMaterial
// parameters: [
// Parameter { name: "alpha"; value: 0.95 },
// Parameter { name: "ka"; value: Qt.vector3d(0.2, 0.2, 0.2) },
// Parameter { name: "kd"; value: Qt.vector3d(0.1608937, 0.16512, 0.154057) },
// Parameter { name: "ks"; value: Qt.vector3d(1.0, 1.0, 1.0) },
// Parameter { name: "shininess"; value: 15 }
// ]
// effect: DefaultAlphaEffect {
// sourceRgbArg: BlendEquationArguments.SourceColor
// destinationRgbArg: BlendEquationArguments.OneMinusSourceColor
// }
// }
PhongAlphaMaterial {
id: transparentGlassMaterial
diffuse: Qt.rgba(0.1608937, 0.16512, 0.154057, 1.0)
specular: Qt.rgba(1.0, 1.0, 1.0, 1.0)
alpha: 0.75
shininess: 33
}
PhongMaterial {
id: interiorMaterial
ambient: "black"
diffuse: interiorColor
shininess: 30
}
SceneHelper {
id: sceneHelper
}
Entity {
id: carModel
Transform {
id: carTransform
matrix: {
var m = Qt.matrix4x4()
m.rotate(carRotation, Qt.vector3d(0, 1, 0))
m.rotate(-90, Qt.vector3d(1, 0, 0))
m.scale(1.35)
return m
}
}
SceneLoader {
id: modelLoader
source: "qrc:/sportscar.qgltf"
property var lampParts: [ "headlight_right", "headlight_left", "daylight_right",
"daylight_left", "taillight_left", "taillight_right" ]
property var bodyParts: [ "body", "door_left", "door_right",
"trunk", "hood" ]
property var transparentGlassParts: [ "d_glass" ]
property var tireParts: [ "tire_front_left", "tire_front_right",
"tire_rear_left", "tire_rear_right" ]
property var interiorParts: [ "interior" ]
// Note: If there are problems with transparent materials etc. check that you have
// exported the Collada file used to create the qgltf binary files using the following
// options in Blender (in Collada options category):
// - Triangulate (off)
// - Use Object Instances (on)
// - Sort by Object name (on)
// If just setting those is not enough, try changing the object names so that the
// object will be loaded in a different order.
// Use the following syntax for qgltf.exe:
// qgltf.exe file.dae -b -S
onStatusChanged: {
if (status === SceneLoader.Ready) {
sceneHelper.addBasicMaterials(modelLoader, bodyMaterial, bodyParts)
sceneHelper.addBasicMaterials(modelLoader, transparentGlassMaterial,
transparentGlassParts)
sceneHelper.addBasicMaterials(modelLoader, interiorMaterial, interiorParts)
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[0])
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[1])
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[2])
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[3])
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[4])
sceneHelper.addTextureMaterial(modelLoader, lampsMaterial, lampParts[5])
sceneHelper.addTextureMaterial(modelLoader, tireMaterial, tireParts[0])
sceneHelper.addTextureMaterial(modelLoader, tireMaterial, tireParts[1])
sceneHelper.addTextureMaterial(modelLoader, tireMaterial, tireParts[2])
sceneHelper.addTextureMaterial(modelLoader, tireMaterial, tireParts[3])
floorPlane.enabled = true
}
}
}
components : [carTransform, modelLoader]
}
Entity {
id: floorPlane
enabled: false
DiffuseMapMaterial {
id: planeMaterial
ambient: Qt.rgba(0, 0, 0, 1.0)
specular: Qt.rgba(0, 0, 0, 1.0)
diffuse: TextureLoader { source: "qrc:/images/SportCarFloorShadow.png" }
}
Transform {
id: planeRotation
matrix: {
var m = Qt.matrix4x4()
m.rotate(carRotation, Qt.vector3d(0, 1, 0))
m.scale(1.35)
return m
}
}
PlaneMesh {
id: planeMesh
width: 70
height: 70
}
components : [planeMesh, planeMaterial, planeRotation]
}
function highlightItem(idx) {
carRotationAnimation.stop()
carResetRotationAnimation.start()
highlighting = true
var highlightComponent
var highlightMaterial
var originalMaterial
switch (idx) {
case 1:
highlightComponent = "tire_front_left"
highlightMaterial = tireMaterialHighlight
originalMaterial = tireMaterial
lightPos = positionLeftFront.times(lightPosMultiplier)
cameraPos = positionLeftFront
break
case 2:
highlightComponent = "tire_front_right"
highlightMaterial = tireMaterialHighlight
originalMaterial = tireMaterial
lightPos = positionRightFront.times(lightPosMultiplier)
cameraPos = positionRightFront
break
case 3:
highlightComponent = "tire_rear_right"
highlightMaterial = tireMaterialHighlight
originalMaterial = tireMaterial
lightPos = positionRightRear.times(lightPosMultiplier)
cameraPos = positionRightRear
break
case 4:
highlightComponent = "tire_rear_left"
highlightMaterial = tireMaterialHighlight
originalMaterial = tireMaterial
lightPos = positionLeftRear.times(lightPosMultiplier)
cameraPos = positionLeftRear
break
case 5:
highlightComponent = "headlight_left"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionFrontLeftHigh.times(lightPosMultiplier)
cameraPos = positionFrontLeftHigh
break
case 6:
highlightComponent = "headlight_right"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionFrontRightHigh.times(lightPosMultiplier)
cameraPos = positionFrontRightHigh
break
case 7:
highlightComponent = "daylight_right"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionFrontRightLow.times(lightPosMultiplier)
cameraPos = positionFrontRightLow
break
case 8:
highlightComponent = "daylight_left"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionFrontLeftLow.times(lightPosMultiplier)
cameraPos = positionFrontLeftLow
break
case 9:
highlightComponent = "taillight_left"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionRearLeft.times(lightPosMultiplier)
cameraPos = positionRearLeft
break
case 10:
highlightComponent = "taillight_right"
highlightMaterial = bodyMaterialHighlight
originalMaterial = lampsMaterial
lightPos = positionRearRight.times(lightPosMultiplier)
cameraPos = positionRearRight
break
default:
lightPos = defaultLightPosition
cameraPos = defaultCameraPosition
}
if (previousComponent !== undefined)
sceneHelper.replaceMaterial(modelLoader, previousComponent, previousMaterial)
if (highlightComponent !== undefined)
sceneHelper.replaceMaterial(modelLoader, highlightComponent, highlightMaterial)
previousComponent = highlightComponent
previousMaterial = originalMaterial
}
function highlightOpenDoors(openDoors) {
carRotationAnimation.stop()
carResetRotationAnimation.start()
highlighting = true
var openLeft = false
var openRight = false
var openBack = false
var openFront = false
// Check with bitwise operators, as they can be open in any combination
if (openDoors & door_left) {
sceneHelper.replaceMaterial(modelLoader, "door_left", bodyMaterialHighlight)
openLeft = true
} else {
sceneHelper.replaceMaterial(modelLoader, "door_left", bodyMaterial)
}
if (openDoors & door_right) {
sceneHelper.replaceMaterial(modelLoader, "door_right", bodyMaterialHighlight)
openRight = true
} else {
sceneHelper.replaceMaterial(modelLoader, "door_right", bodyMaterial)
}
if (openDoors & door_trunk) {
sceneHelper.replaceMaterial(modelLoader, "trunk", bodyMaterialHighlight)
openBack = true
} else {
sceneHelper.replaceMaterial(modelLoader, "trunk", bodyMaterial)
}
if (openDoors & door_hood) {
openFront = true
sceneHelper.replaceMaterial(modelLoader, "hood", bodyMaterialHighlight)
} else {
sceneHelper.replaceMaterial(modelLoader, "hood", bodyMaterial)
}
if (openRight && openLeft || openBack && openFront) {
lightPos = positionTop.times(0.5)
cameraPos = positionTop
} else if (openRight) {
lightPos = positionRight.times(0.33)
lightPos.y += 15.0
cameraPos = positionRight
} else if (openLeft) {
lightPos = positionLeft.times(0.33)
lightPos.y += 15.0
cameraPos = positionLeft
} else if (openBack) {
lightPos = positionBack.times(0.75)
cameraPos = positionBack
} else if (openFront) {
lightPos = positionFront.times(1.0)
cameraPos = positionFront
} else {
lightPos = defaultLightPosition
cameraPos = defaultCameraPosition
}
}
onCameraPosChanged: {
if (!highlighting)
return
// Update both camera and light positions
cameraAnimation.to = cameraPos
lightAnimation.to = lightPos
cameraAnimation.restart()
lightAnimation.restart()
highlighting = false
}
Quick.PropertyAnimation {
running: false
id: cameraAnimation
target: camera
property: "position"
duration: 1000
easing.type: Easing.InOutQuad
}
Quick.PropertyAnimation {
running: false
id: lightAnimation
target: carModelEntity
property: "lightPosition"
duration: 1000
easing.type: Easing.Linear
}
Quick.RotationAnimation on carRotation {
id: carRotationAnimation
running: false
from: 0.0
to: 360.0
duration: 15000
loops: -1
}
Quick.RotationAnimation on carRotation {
id: carResetRotationAnimation
running: false
to: (carRotation > 180.0) ? 360.0 : 0.0 // TODO: Try to make animation "natural". Still works weirdly sometimes.
duration: 1000
loops: -1
easing.type: Easing.InOutQuad
}
function resetHighlight() {
if (doorAction)
highlightOpenDoors(0)
else
highlightItem(defaultHighlight)
doorAction = false
}
function highlightLamp() {
highlightType = Math.floor(Math.random() * 6) + 5
highlightItem(highlightType)
return highlightType
}
function highlightTire() {
highlightType = Math.floor(Math.random() * 4) + 1
highlightItem(highlightType)
return highlightType
}
function toggleIdleTimer(isVisible) {
if (isVisible) {
idleTimer.restart()
} else {
carRotationAnimation.stop()
carRotation = 0.0
idleTimer.stop()
}
}
Quick.Timer {
id: idleTimer
interval: 10000
onTriggered: {
carRotationAnimation.restart()
}
}
}

View File

@ -1,71 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
Item {
height: root.height
width: root.width / 3
Image {
id: carImage
height: root.height / 3
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
source:"qrc:/images/CarForParkSensors.png"
}
Image {
anchors.left: carImage.left
anchors.leftMargin: 5
anchors.bottom: carImage.bottom
anchors.bottomMargin: carImage.height * 0.86
source:"qrc:/images/ParkingSensorOff.png"
z: 1
}
Image {
scale: -1
anchors.left: carImage.left
anchors.leftMargin: 5
anchors.top: carImage.top
anchors.topMargin: carImage.height * 0.86
source:"qrc:/images/ParkingSensorOff.png"
z: 1
}
}

View File

@ -1,79 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
Item {
Image {
id: carImage
height: root.height / 3
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
source:"image://etc/SportCarForParkSensors.png"
}
Image {
anchors.horizontalCenter: carImage.horizontalCenter
anchors.leftMargin: 5
anchors.bottom: carImage.bottom
anchors.bottomMargin: carImage.height * 0.9
source:"image://etc/ParkingSensorOff.png"
z: 1
}
Image {
scale: -1
anchors.horizontalCenter: carImage.horizontalCenter
anchors.leftMargin: 5
anchors.top: carImage.top
anchors.topMargin: carImage.height * 0.86
source:"image://etc/ParkingSensorOff.png"
z: 1
}
}

View File

@ -1,108 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
import QtQuick.Scene3D 2.0
Item {
id: mainview
visible: true
width: root.width / 3
height: root.height
property alias hidden: carModel.hidden
Scene3D {
id: carScene
width: mainview.width
height: mainview.height
multisample: true
CarModelElectric {
id: carModel
scene: carScene
}
}
// Functions to control highlights from dashboard
function highlightLamp() {
var type = carModel.highlightLamp()
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
return type
}
function highlightDoors(doors) {
doorAction = true
carModel.doorAction = true
carModel.highlightOpenDoors(doors)
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
}
function highlightTire() {
var type = carModel.highlightTire()
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
return type
}
Timer {
id: resetModelTimer
interval: 3000
running: false
onTriggered: {
carModel.resetHighlight()
carModelHighlightType = 0
actionInProgress = false
doorAction = false
if (!rightStack.visible) // return previous view if we forced the car model
returnView.start()
if (visible)
carModel.toggleIdleTimer(true)
}
}
onVisibleChanged: {
// Start/stop idle timer, that will trigger camera rotation around the car model after X secs
carModel.toggleIdleTimer(visible)
}
// TODO: Don't use if car view is not the first one
Component.onCompleted: {
// Start/stop idle timer, that will trigger camera rotation around the car model after X secs
carModel.toggleIdleTimer(visible)
}
}

View File

@ -1,108 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
import QtQuick.Scene3D 2.0
Item {
id: mainview
visible: true
width: root.width / 3
height: root.height
property alias hidden: carModel.hidden
Scene3D {
id: carScene
width: mainview.width
height: mainview.height
multisample: true
CarModelSports {
id: carModel
scene: carScene
}
}
// Functions to control highlights from dashboard
function highlightLamp() {
var type = carModel.highlightLamp()
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
return type
}
function highlightDoors(doors) {
doorAction = true
carModel.doorAction = true
carModel.highlightOpenDoors(doors)
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
}
function highlightTire() {
var type = carModel.highlightTire()
carModel.toggleIdleTimer(true)
resetModelTimer.restart()
return type
}
Timer {
id: resetModelTimer
interval: 3000
running: false
onTriggered: {
carModel.resetHighlight()
carModelHighlightType = 0
doorAction = false
actionInProgress = false
if (!centerStack.visible) // return previous view if we forced the car model
returnView.start()
if (visible)
carModel.toggleIdleTimer(true)
}
}
onVisibleChanged: {
// Start/stop idle timer, that will trigger camera rotation around the car model after X secs
carModel.toggleIdleTimer(visible)
}
// TODO: Don't use if car view is not the first one
Component.onCompleted: {
// Start/stop idle timer, that will trigger camera rotation around the car model after X secs
carModel.toggleIdleTimer(visible)
}
}

View File

@ -1,595 +0,0 @@
2015-09-05T12:01:56Z 52.53471566 13.29339621 0
2015-09-05T12:01:56Z 52.53471566 13.29339621 0
2015-09-05T12:01:56Z 52.53471566 13.29339621 0
2015-09-05T12:01:56Z 52.53471566 13.29339621 0
2015-09-05T12:01:56Z 52.53471566 13.29339621 2
2015-09-05T12:01:57Z 52.53463307 13.29335113 4.5
2015-09-05T12:01:58Z 52.53456215 13.29326514 6
2015-09-05T12:01:59Z 52.53448055 13.2932033 10
2015-09-05T12:02:00Z 52.53439307 13.29317302 10.25
2015-09-05T12:02:02Z 52.53420541 13.29324536 11
2015-09-05T12:02:03Z 52.53415146 13.29334321 10.25
2015-09-05T12:02:04Z 52.5340858 13.29343789 9.5
2015-09-05T12:02:06Z 52.5339741 13.29363007 9
2015-09-05T12:02:08Z 52.53385702 13.29373682 9
2015-09-05T12:02:09Z 52.53379645 13.2937675 5
2015-09-05T12:02:10Z 52.53373904 13.29378906 3
2015-09-05T12:02:10Z 52.53370904 13.29379906 0
2015-09-05T12:02:11Z 52.53370904 13.29379906 0
2015-09-05T12:02:12Z 52.53370904 13.29379906 0
2015-09-05T12:02:13Z 52.53355432 13.29392855 5
2015-09-05T12:02:15Z 52.53337753 13.2940725 10
2015-09-05T12:02:16Z 52.53329909 13.29412793 10
2015-09-05T12:02:17Z 52.53321162 13.29419525 10.25
2015-09-05T12:02:18Z 52.53311057 13.29426683 11.5
2015-09-05T12:02:19Z 52.5330342 13.29433714 11.25
2015-09-05T12:02:21Z 52.5328361 13.2944545 11.5
2015-09-05T12:02:23Z 52.53268661 13.29457408 12
2015-09-05T12:02:24Z 52.5325904 13.29461498 12
2015-09-05T12:02:25Z 52.5324789 13.29467689 12
2015-09-05T12:02:26Z 52.53237304 13.29473805 12
2015-09-05T12:02:27Z 52.53226579 13.29481766 12
2015-09-05T12:02:28Z 52.53215667 13.29489104 12
2015-09-05T12:02:29Z 52.53205286 13.29495604 12
2015-09-05T12:02:31Z 52.53184432 13.29509601 12.25
2015-09-05T12:02:32Z 52.53173615 13.29516896 13
2015-09-05T12:02:33Z 52.53160734 13.29525339 14.5
2015-09-05T12:02:34Z 52.53147391 13.29533567 15
2015-09-05T12:02:35Z 52.53134531 13.29539001 15.25
2015-09-05T12:02:36Z 52.53120371 13.29544058 14.75
2015-09-05T12:02:37Z 52.5310736 13.29548352 14.5
2015-09-05T12:02:39Z 52.53082428 13.2955645 13.75
2015-09-05T12:02:40Z 52.53070713 13.29559606 14.5
2015-09-05T12:02:41Z 52.53057732 13.2956255 14.75
2015-09-05T12:02:43Z 52.53030912 13.29571386 15
2015-09-05T12:02:44Z 52.53017176 13.2957591 14.75
2015-09-05T12:02:45Z 52.5300513 13.29580222 14.5
2015-09-05T12:02:47Z 52.52979737 13.29587053 14.25
2015-09-05T12:02:48Z 52.52968082 13.29590694 14
2015-09-05T12:02:49Z 52.52956536 13.29595674 13.75
2015-09-05T12:02:51Z 52.52934973 13.29612906 13.5
2015-09-05T12:02:52Z 52.52924513 13.29620493 13.5
2015-09-05T12:02:53Z 52.52912119 13.29629417 13.5
2015-09-05T12:02:54Z 52.52901351 13.29639086 13.25
2015-09-05T12:02:55Z 52.52891751 13.29647808 12.25
2015-09-05T12:02:56Z 52.52884043 13.29650939 11.25
2015-09-05T12:02:58Z 52.52864407 13.29657869 12
2015-09-05T12:02:59Z 52.52852564 13.29660263 12.75
2015-09-05T12:03:00Z 52.52840086 13.29663652 12.75
2015-09-05T12:03:02Z 52.52818659 13.2966907 12.75
2015-09-05T12:03:03Z 52.52807177 13.29673764 12.75
2015-09-05T12:03:04Z 52.52798047 13.29677037 12.8
2015-09-05T12:03:05Z 52.52784213 13.29683006 14.5
2015-09-05T12:03:06Z 52.52769622 13.29689328 15.5
2015-09-05T12:03:07Z 52.52755741 13.2969383 16.25
2015-09-05T12:03:08Z 52.52741156 13.29698961 17
2015-09-05T12:03:10Z 52.52711709 13.2970757 17
2015-09-05T12:03:11Z 52.52695869 13.29711537 17
2015-09-05T12:03:12Z 52.52681712 13.29716064 17
2015-09-05T12:03:13Z 52.52666168 13.29722531 17
2015-09-05T12:03:14Z 52.52649001 13.29727856 17.75
2015-09-05T12:03:15Z 52.52633418 13.29734529 17.75
2015-09-05T12:03:16Z 52.52615007 13.29740601 18.25
2015-09-05T12:03:17Z 52.52598369 13.29744997 18.5
2015-09-05T12:03:18Z 52.52581637 13.29747817 18.25
2015-09-05T12:03:19Z 52.5256589 13.2975318 17.5
2015-09-05T12:03:20Z 52.52549785 13.2975591 17.5
2015-09-05T12:03:21Z 52.52533403 13.29757304 17
2015-09-05T12:03:22Z 52.52518512 13.2976005 16.75
2015-09-05T12:03:23Z 52.52505195 13.29764489 16.25
2015-09-05T12:03:24Z 52.52491452 13.29769758 15.25
2015-09-05T12:03:25Z 52.52478112 13.29775472 15.25
2015-09-05T12:03:26Z 52.52466234 13.29785345 15.25
2015-09-05T12:03:27Z 52.52453284 13.29795197 15.75
2015-09-05T12:03:29Z 52.52428926 13.29821484 16.25
2015-09-05T12:03:30Z 52.52417461 13.2983671 16.25
2015-09-05T12:03:31Z 52.52405376 13.29850187 16.25
2015-09-05T12:03:32Z 52.52393931 13.29865443 16.25
2015-09-05T12:03:33Z 52.52382556 13.29879402 16.25
2015-09-05T12:03:34Z 52.52369592 13.29894445 16.35
2015-09-05T12:03:35Z 52.52356831 13.29910014 16.5
2015-09-05T12:03:37Z 52.52335459 13.29937581 16
2015-09-05T12:03:38Z 52.52324243 13.29950933 18
2015-09-05T12:03:39Z 52.52312211 13.29963199 18
2015-09-05T12:03:40Z 52.52303124 13.29973969 18
2015-09-05T12:03:41Z 52.52295028 13.29984474 13
2015-09-05T12:03:42Z 52.52288635 13.29992611 8
2015-09-05T12:03:43Z 52.52270078 13.30014976 0
2015-09-05T12:03:44Z 52.52270078 13.30014976 0
2015-09-05T12:03:45Z 52.52270078 13.30014976 0
2015-09-05T12:03:46Z 52.52270078 13.30014976 0
2015-09-05T12:03:47Z 52.52270078 13.30014976 0
2015-09-05T12:03:48Z 52.52270078 13.30014976 0
2015-09-05T12:03:49Z 52.52270078 13.30014976 0
2015-09-05T12:03:50Z 52.52270078 13.30014976 0
2015-09-05T12:03:51Z 52.52270078 13.30014976 0
2015-09-05T12:03:52Z 52.52270078 13.30014976 0
2015-09-05T12:03:53Z 52.52270078 13.30014976 0
2015-09-05T12:03:54Z 52.52270078 13.30014976 0
2015-09-05T12:03:55Z 52.52270078 13.30014976 0
2015-09-05T12:03:56Z 52.52270078 13.30014976 0
2015-09-05T12:03:57Z 52.52270078 13.30014976 0
2015-09-05T12:03:58Z 52.52270078 13.30014976 0
2015-09-05T12:04:20Z 52.52270078 13.30014976 0
2015-09-05T12:04:21Z 52.52266043 13.30018077 5.25
2015-09-05T12:04:22Z 52.52258997 13.30024809 9
2015-09-05T12:04:23Z 52.5225277 13.30030886 12
2015-09-05T12:04:24Z 52.52244695 13.30031455 15
2015-09-05T12:04:25Z 52.52236198 13.30029215 15
2015-09-05T12:04:26Z 52.52226481 13.30024054 15
2015-09-05T12:04:27Z 52.52217005 13.30020629 15
2015-09-05T12:04:28Z 52.52206983 13.3001551 18
2015-09-05T12:04:30Z 52.52185322 13.30001279 18
2015-09-05T12:04:31Z 52.52172351 13.29992714 14
2015-09-05T12:04:32Z 52.52159554 13.2998622 14.75
2015-09-05T12:04:33Z 52.52146475 13.29978099 15.25
2015-09-05T12:04:34Z 52.52133872 13.29969814 15.75
2015-09-05T12:04:35Z 52.52120957 13.29961165 15.5
2015-09-05T12:04:36Z 52.52107981 13.2995404 15
2015-09-05T12:04:38Z 52.52086158 13.29941319 13.25
2015-09-05T12:04:40Z 52.52064769 13.29935942 12.25
2015-09-05T12:04:41Z 52.52054688 13.29936738 11.5
2015-09-05T12:04:43Z 52.52036739 13.29939421 10.25
2015-09-05T12:04:44Z 52.52027373 13.29942033 6
2015-09-05T12:04:45Z 52.52000411 13.29948771 0
2015-09-05T12:04:46Z 52.52000411 13.29948771 0
2015-09-05T12:04:47Z 52.52000411 13.29948771 0
2015-09-05T12:04:48Z 52.52000411 13.29948771 0
2015-09-05T12:04:49Z 52.52000411 13.29948771 0
2015-09-05T12:04:50Z 52.52000411 13.29948771 0
2015-09-05T12:04:51Z 52.52000411 13.29948771 0
2015-09-05T12:04:52Z 52.52000411 13.29948771 0
2015-09-05T12:04:53Z 52.52000411 13.29948771 0
2015-09-05T12:04:54Z 52.52000411 13.29948771 0
2015-09-05T12:04:55Z 52.52000411 13.29948771 0
2015-09-05T12:04:56Z 52.52000411 13.29948771 0
2015-09-05T12:04:57Z 52.52000411 13.29948771 0
2015-09-05T12:04:58Z 52.52000411 13.29948771 0
2015-09-05T12:04:59Z 52.52000411 13.29948771 0
2015-09-05T12:05:00Z 52.52000411 13.29948771 0
2015-09-05T12:05:01Z 52.52000411 13.29948771 0
2015-09-05T12:05:23Z 52.52000411 13.29948771 0
2015-09-05T12:05:24Z 52.51997058 13.29952102 5
2015-09-05T12:05:25Z 52.51992366 13.29953263 7
2015-09-05T12:05:26Z 52.51987437 13.29954327 7
2015-09-05T12:05:27Z 52.51980357 13.29954852 7.5
2015-09-05T12:05:28Z 52.51972331 13.29958992 9
2015-09-05T12:05:29Z 52.51964802 13.29963821 12
2015-09-05T12:05:30Z 52.51957361 13.29972032 12
2015-09-05T12:05:31Z 52.51950862 13.29986188 12
2015-09-05T12:05:32Z 52.51945385 13.30000737 12
2015-09-05T12:05:33Z 52.51938922 13.30018513 12.75
2015-09-05T12:05:34Z 52.51933148 13.30035667 13.75
2015-09-05T12:05:35Z 52.51926274 13.30054898 14.5
2015-09-05T12:05:36Z 52.51920375 13.3007182 15.5
2015-09-05T12:05:37Z 52.51913195 13.30090806 16.25
2015-09-05T12:05:38Z 52.51905919 13.30111873 16.75
2015-09-05T12:05:39Z 52.51898637 13.30134444 17.25
2015-09-05T12:05:40Z 52.51890618 13.30158713 17.75
2015-09-05T12:05:41Z 52.51882863 13.30181532 18.25
2015-09-05T12:05:42Z 52.51874697 13.30206403 18.75
2015-09-05T12:05:43Z 52.51866892 13.30232409 18.75
2015-09-05T12:05:44Z 52.51858636 13.30255307 18.75
2015-09-05T12:05:45Z 52.51850846 13.30280425 18.75
2015-09-05T12:05:46Z 52.51843293 13.30305877 18.25
2015-09-05T12:05:47Z 52.51836511 13.30327293 18
2015-09-05T12:05:48Z 52.51829479 13.30350592 17.75
2015-09-05T12:05:49Z 52.51821382 13.30374217 17.25
2015-09-05T12:05:50Z 52.51815266 13.30395237 16.75
2015-09-05T12:05:51Z 52.51808531 13.30418719 16.5
2015-09-05T12:05:52Z 52.51802467 13.30439865 16.5
2015-09-05T12:05:53Z 52.51796402 13.3046112 16
2015-09-05T12:05:54Z 52.51790743 13.30481738 16
2015-09-05T12:05:55Z 52.51784005 13.30502199 16
2015-09-05T12:05:56Z 52.51777177 13.30524862 16.25
2015-09-05T12:05:57Z 52.51770337 13.30544136 16.5
2015-09-05T12:05:58Z 52.51762094 13.30564341 16.75
2015-09-05T12:05:59Z 52.51752851 13.30586256 17
2015-09-05T12:06:00Z 52.51748413 13.30609422 17.5
2015-09-05T12:06:01Z 52.51741946 13.30632815 17.25
2015-09-05T12:06:02Z 52.51734146 13.30657572 17.5
2015-09-05T12:06:03Z 52.51728833 13.30679264 17.75
2015-09-05T12:06:04Z 52.51721395 13.30703329 18
2015-09-05T12:06:05Z 52.51713213 13.30726669 18.25
2015-09-05T12:06:06Z 52.51704695 13.30749755 18.25
2015-09-05T12:06:07Z 52.51695347 13.30776367 18.75
2015-09-05T12:06:08Z 52.51688035 13.30798499 18.5
2015-09-05T12:06:09Z 52.51683924 13.30826377 18.75
2015-09-05T12:06:10Z 52.51676332 13.30852511 18.75
2015-09-05T12:06:11Z 52.51666019 13.30876472 18.75
2015-09-05T12:06:12Z 52.51662237 13.30905154 18.5
2015-09-05T12:06:13Z 52.51656674 13.30928029 18.25
2015-09-05T12:06:14Z 52.51648419 13.30947686 17.5
2015-09-05T12:06:15Z 52.5163775 13.309703 17.25
2015-09-05T12:06:16Z 52.51628199 13.3099192 17.25
2015-09-05T12:06:17Z 52.51616648 13.31011033 17
2015-09-05T12:06:19Z 52.51602967 13.31055605 16.75
2015-09-05T12:06:20Z 52.51597211 13.31074222 16.25
2015-09-05T12:06:22Z 52.51582736 13.31114177 16.25
2015-09-05T12:06:23Z 52.51575417 13.31140106 17
2015-09-05T12:06:24Z 52.5157159 13.31160443 17
2015-09-05T12:06:25Z 52.5156643 13.31183259 17
2015-09-05T12:06:27Z 52.5155041 13.31225099 17
2015-09-05T12:06:28Z 52.51546634 13.31252787 17
2015-09-05T12:06:29Z 52.51539252 13.31276737 17.25
2015-09-05T12:06:30Z 52.51532149 13.31299404 17.25
2015-09-05T12:06:31Z 52.51524136 13.31317206 17
2015-09-05T12:06:32Z 52.51517672 13.31339142 17
2015-09-05T12:06:33Z 52.51509301 13.31364148 17
2015-09-05T12:06:34Z 52.51501412 13.31388762 17
2015-09-05T12:06:35Z 52.51495314 13.31406691 16
2015-09-05T12:06:36Z 52.51489388 13.31426441 14.75
2015-09-05T12:06:37Z 52.51485489 13.31442888 13
2015-09-05T12:06:38Z 52.51483603 13.31458792 11.5
2015-09-05T12:06:39Z 52.51474913 13.31465827 9.25
2015-09-05T12:06:40Z 52.51470297 13.31471572 1.5
2015-09-05T12:06:41Z 52.51469785 13.31480612 0
2015-09-05T12:06:42Z 52.51469785 13.31480612 0
2015-09-05T12:06:43Z 52.51469785 13.31480612 0
2015-09-05T12:06:44Z 52.51469785 13.31480612 0
2015-09-05T12:06:45Z 52.51469785 13.31480612 0
2015-09-05T12:06:46Z 52.51469785 13.31480612 0
2015-09-05T12:06:47Z 52.51469785 13.31480612 0
2015-09-05T12:06:48Z 52.51469785 13.31480612 0
2015-09-05T12:06:49Z 52.51469785 13.31480612 0
2015-09-05T12:06:50Z 52.51469785 13.31480612 0
2015-09-05T12:06:51Z 52.51469785 13.31480612 0
2015-09-05T12:06:52Z 52.51469785 13.31480612 0
2015-09-05T12:06:53Z 52.51469785 13.31480612 0
2015-09-05T12:06:54Z 52.51469785 13.31480612 0
2015-09-05T12:06:55Z 52.51469785 13.31480612 0
2015-09-05T12:06:56Z 52.51469785 13.31480612 0
2015-09-05T12:07:09Z 52.51465785 13.31490612 2.75
2015-09-05T12:07:10Z 52.51464824 13.31491989 9
2015-09-05T12:07:11Z 52.51460879 13.31503769 12
2015-09-05T12:07:13Z 52.51453201 13.3153324 13
2015-09-05T12:07:14Z 52.51448914 13.31549457 16
2015-09-05T12:07:15Z 52.51445648 13.31568393 18
2015-09-05T12:07:16Z 52.51439381 13.31588408 20
2015-09-05T12:07:17Z 52.51435193 13.31607364 16
2015-09-05T12:07:18Z 52.51429047 13.31627832 15.75
2015-09-05T12:07:19Z 52.51424136 13.31653842 15.75
2015-09-05T12:07:20Z 52.51415344 13.31669077 15.5
2015-09-05T12:07:21Z 52.51407088 13.31686736 15.5
2015-09-05T12:07:22Z 52.513984 13.31711846 16.25
2015-09-05T12:07:24Z 52.51384149 13.31750164 16.25
2015-09-05T12:07:25Z 52.5137931 13.31771783 16.25
2015-09-05T12:07:26Z 52.51378228 13.31797915 16.5
2015-09-05T12:07:27Z 52.51375122 13.31822475 16.75
2015-09-05T12:07:28Z 52.51374125 13.31847759 17
2015-09-05T12:07:29Z 52.51370054 13.31873135 17
2015-09-05T12:07:30Z 52.51367538 13.3189733 17
2015-09-05T12:07:31Z 52.51366241 13.3191887 16.5
2015-09-05T12:07:33Z 52.51353135 13.31964239 16.5
2015-09-05T12:07:34Z 52.51347898 13.31984191 15.5
2015-09-05T12:07:35Z 52.51343441 13.32006123 14.5
2015-09-05T12:07:36Z 52.51340483 13.32021639 13
2015-09-05T12:07:37Z 52.51336041 13.32036272 11
2015-09-05T12:07:38Z 52.51332265 13.32048619 0
2015-09-05T12:07:39Z 52.51329181 13.32056736 0
2015-09-05T12:07:40Z 52.51325586 13.32067519 0
2015-09-05T12:07:41Z 52.51325586 13.32067519 0
2015-09-05T12:07:42Z 52.51325586 13.32067519 0
2015-09-05T12:07:43Z 52.51325586 13.32067519 0
2015-09-05T12:07:44Z 52.51325586 13.32067519 0
2015-09-05T12:07:45Z 52.51325586 13.32067519 0
2015-09-05T12:07:46Z 52.51325586 13.32067519 0
2015-09-05T12:07:47Z 52.51325586 13.32067519 0
2015-09-05T12:07:50Z 52.5131997 13.32080423 1
2015-09-05T12:07:51Z 52.51317166 13.32084133 6
2015-09-05T12:07:52Z 52.51311109 13.32088309 6
2015-09-05T12:07:53Z 52.51303037 13.32092266 10
2015-09-05T12:07:54Z 52.51289099 13.32085504 10.5
2015-09-05T12:07:56Z 52.51274925 13.32076634 10
2015-09-05T12:07:57Z 52.51263743 13.32075369 10.5
2015-09-05T12:07:58Z 52.51255666 13.32076405 10.5
2015-09-05T12:08:00Z 52.51234885 13.32086301 11.25
2015-09-05T12:08:01Z 52.51225438 13.32093336 11.75
2015-09-05T12:08:02Z 52.51217009 13.32103141 11.75
2015-09-05T12:08:03Z 52.51207921 13.32116016 12.25
2015-09-05T12:08:05Z 52.51214781 13.32270956 12.7
2015-09-05T12:08:06Z 52.51230816 13.32284169 13.25
2015-09-05T12:08:08Z 52.51251695 13.32295316 12.75
2015-09-05T12:08:09Z 52.51262432 13.32292613 12.5
2015-09-05T12:08:10Z 52.51273709 13.32287272 12.75
2015-09-05T12:08:11Z 52.51285769 13.32281078 13.25
2015-09-05T12:08:12Z 52.51295951 13.32269025 13.75
2015-09-05T12:08:13Z 52.51304233 13.32254193 13.75
2015-09-05T12:08:14Z 52.5131087 13.32237261 14.25
2015-09-05T12:08:15Z 52.51311077 13.32217575 14.2
2015-09-05T12:08:16Z 52.51313152 13.32196235 14.1
2015-09-05T12:08:17Z 52.51314044 13.32174364 14
2015-09-05T12:08:18Z 52.51315201 13.3215268 13.5
2015-09-05T12:08:19Z 52.51318207 13.32133836 13.25
2015-09-05T12:08:20Z 52.51323447 13.32113891 13.75
2015-09-05T12:08:21Z 52.51329679 13.32095033 14.5
2015-09-05T12:08:22Z 52.51335489 13.32074722 15.25
2015-09-05T12:08:23Z 52.51341395 13.32053648 15.75
2015-09-05T12:08:24Z 52.51348638 13.32028898 17
2015-09-05T12:08:25Z 52.51354711 13.32003764 17.5
2015-09-05T12:08:26Z 52.51360387 13.31979319 18
2015-09-05T12:08:27Z 52.51363858 13.3195135 18
2015-09-05T12:08:28Z 52.51369441 13.31926256 17.75
2015-09-05T12:08:29Z 52.51372804 13.31902817 17.5
2015-09-05T12:08:30Z 52.51376256 13.31876519 17.25
2015-09-05T12:08:31Z 52.51381141 13.31855713 16.25
2015-09-05T12:08:32Z 52.51382721 13.3183204 16.25
2015-09-05T12:08:33Z 52.51386389 13.31809115 16
2015-09-05T12:08:34Z 52.51390202 13.31785843 16.25
2015-09-05T12:08:35Z 52.51394914 13.31761346 16.5
2015-09-05T12:08:36Z 52.51401622 13.31738128 17
2015-09-05T12:08:37Z 52.51408384 13.31716736 17
2015-09-05T12:08:38Z 52.51414812 13.31692614 16.75
2015-09-05T12:08:39Z 52.51421129 13.31671957 16
2015-09-05T12:08:40Z 52.51427263 13.31651899 15
2015-09-05T12:08:41Z 52.51434021 13.31633435 14.25
2015-09-05T12:08:42Z 52.51438284 13.31616873 12.75
2015-09-05T12:08:43Z 52.51443779 13.31602125 11.25
2015-09-05T12:08:44Z 52.51447041 13.31590413 6
2015-09-05T12:08:45Z 52.51450255 13.3158068 4
2015-09-05T12:08:46Z 52.51452573 13.31573601 2
2015-09-05T12:08:47Z 52.51458117 13.31561048 0
2015-09-05T12:08:48Z 52.51458117 13.31561048 0
2015-09-05T12:08:49Z 52.51458117 13.31561048 0
2015-09-05T12:08:50Z 52.51458117 13.31561048 0
2015-09-05T12:08:51Z 52.51458117 13.31561048 0
2015-09-05T12:08:52Z 52.51458117 13.31561048 0
2015-09-05T12:08:53Z 52.51458117 13.31561048 0
2015-09-05T12:08:54Z 52.51458117 13.31561048 0
2015-09-05T12:08:55Z 52.51458117 13.31561048 0
2015-09-05T12:08:56Z 52.51458117 13.31561048 0
2015-09-05T12:08:57Z 52.51458117 13.31561048 0
2015-09-05T12:08:58Z 52.51458117 13.31561048 0
2015-09-05T12:08:59Z 52.51458117 13.31561048 0
2015-09-05T12:09:00Z 52.51458117 13.31561048 0
2015-09-05T12:09:01Z 52.51458117 13.31561048 0
2015-09-05T12:09:25Z 52.51458117 13.31561048 0
2015-09-05T12:09:26Z 52.51458959 13.31557205 0.5
2015-09-05T12:09:27Z 52.5146037 13.31555254 2
2015-09-05T12:09:28Z 52.51462065 13.3154895 6
2015-09-05T12:09:29Z 52.51463745 13.31540706 8
2015-09-05T12:09:30Z 52.51468456 13.31529157 12
2015-09-05T12:09:31Z 52.51472741 13.3151552 13
2015-09-05T12:09:32Z 52.51477592 13.31501556 15
2015-09-05T12:09:33Z 52.51482271 13.3148667 15
2015-09-05T12:09:34Z 52.51488544 13.31471432 15
2015-09-05T12:09:35Z 52.51494017 13.31456723 15
2015-09-05T12:09:36Z 52.51498837 13.31438972 15
2015-09-05T12:09:37Z 52.51503578 13.31422477 15
2015-09-05T12:09:38Z 52.51508779 13.3140462 13
2015-09-05T12:09:39Z 52.51514339 13.31387257 13.25
2015-09-05T12:09:40Z 52.51519184 13.31369578 13.5
2015-09-05T12:09:42Z 52.51530435 13.3133285 14
2015-09-05T12:09:43Z 52.51535864 13.31315645 15
2015-09-05T12:09:45Z 52.5154552 13.31280059 18
2015-09-05T12:09:46Z 52.51551402 13.31263086 19
2015-09-05T12:09:48Z 52.51562248 13.31228079 20
2015-09-05T12:09:49Z 52.51568292 13.31213092 20
2015-09-05T12:09:51Z 52.51579681 13.31179846 20
2015-09-05T12:09:53Z 52.51589293 13.31146501 20
2015-09-05T12:09:55Z 52.51600254 13.31112553 20
2015-09-05T12:09:56Z 52.51605527 13.31095383 20
2015-09-05T12:09:57Z 52.51612055 13.31079039 20
2015-09-05T12:09:58Z 52.51618294 13.31060619 20
2015-09-05T12:10:00Z 52.51630298 13.31026351 13.5
2015-09-05T12:10:01Z 52.51635003 13.31008531 13.25
2015-09-05T12:10:02Z 52.51639668 13.30993061 13.25
2015-09-05T12:10:03Z 52.51645212 13.30975234 12
2015-09-05T12:10:04Z 52.51650975 13.30957448 10
2015-09-05T12:10:05Z 52.51656513 13.30939207 7
2015-09-05T12:10:06Z 52.51663388 13.30919918 7
2015-09-05T12:10:07Z 52.51670258 13.30900076 7
2015-09-05T12:10:08Z 52.51676824 13.30879639 10
2015-09-05T12:10:09Z 52.51683494 13.30859887 15.75
2015-09-05T12:10:10Z 52.51690757 13.308374 16
2015-09-05T12:10:11Z 52.51698065 13.3081616 16
2015-09-05T12:10:12Z 52.51704719 13.30794978 16
2015-09-05T12:10:13Z 52.51711191 13.30775863 15.75
2015-09-05T12:10:14Z 52.51719182 13.30754842 15.5
2015-09-05T12:10:15Z 52.51725976 13.30734841 15.5
2015-09-05T12:10:16Z 52.51732474 13.3071543 18
2015-09-05T12:10:18Z 52.51745021 13.30677966 18
2015-09-05T12:10:19Z 52.51750779 13.30658969 14.25
2015-09-05T12:10:20Z 52.51756293 13.30640322 14
2015-09-05T12:10:21Z 52.51761043 13.30621389 14
2015-09-05T12:10:22Z 52.51767758 13.30603651 13
2015-09-05T12:10:23Z 52.51774167 13.30586197 12
2015-09-05T12:10:24Z 52.51779302 13.30569393 10
2015-09-05T12:10:25Z 52.51784079 13.30553502 8
2015-09-05T12:10:26Z 52.51788982 13.30539687 5
2015-09-05T12:10:27Z 52.51793912 13.30525613 3
2015-09-05T12:10:28Z 52.51796748 13.30517596 2
2015-09-05T12:10:29Z 52.51798748 13.30508945 1
2015-09-05T12:10:30Z 52.51801022 13.30502392 1
2015-09-05T12:10:31Z 52.51802137 13.30495774 2
2015-09-05T12:10:32Z 52.51803007 13.30491356 2
2015-09-05T12:10:33Z 52.51804218 13.30488569 2
2015-09-05T12:10:35Z 52.51804912 13.30486271 1
2015-09-05T12:10:36Z 52.51804912 13.30486271 0
2015-09-05T12:10:37Z 52.51804912 13.30486271 0
2015-09-05T12:10:38Z 52.51804912 13.30486271 0
2015-09-05T12:10:39Z 52.51804912 13.30486271 0
2015-09-05T12:10:40Z 52.51804912 13.30486271 0
2015-09-05T12:10:41Z 52.51804912 13.30486271 0
2015-09-05T12:10:42Z 52.51804912 13.30486271 0
2015-09-05T12:10:43Z 52.51804912 13.30486271 0
2015-09-05T12:10:44Z 52.51804912 13.30486271 0
2015-09-05T12:10:48Z 52.51804912 13.30486271 0
2015-09-05T12:10:49Z 52.51804912 13.30486271 0
2015-09-05T12:11:01Z 52.51804912 13.30486271 0
2015-09-05T12:11:02Z 52.51804912 13.30486271 4
2015-09-05T12:11:03Z 52.51800781 13.30475134 5
2015-09-05T12:11:04Z 52.51801696 13.30469243 6
2015-09-05T12:11:06Z 52.5181044 13.30444051 9.25
2015-09-05T12:11:07Z 52.51815052 13.30429866 10.25
2015-09-05T12:11:08Z 52.51819516 13.30415184 11.5
2015-09-05T12:11:09Z 52.51825246 13.30401051 11.75
2015-09-05T12:11:10Z 52.51829686 13.30384851 11.25
2015-09-05T12:11:11Z 52.51833352 13.30372125 9.75
2015-09-05T12:11:13Z 52.51841078 13.30351054 7.75
2015-09-05T12:11:14Z 52.51843562 13.30340522 7.5
2015-09-05T12:11:16Z 52.51850442 13.30318839 8.25
2015-09-05T12:11:18Z 52.51856951 13.30294865 9.75
2015-09-05T12:11:19Z 52.51861796 13.30279111 11
2015-09-05T12:11:20Z 52.51866996 13.30262715 12.5
2015-09-05T12:11:21Z 52.51873058 13.30246211 13.25
2015-09-05T12:11:22Z 52.51879997 13.30228942 13.5
2015-09-05T12:11:23Z 52.51886097 13.30211154 13.75
2015-09-05T12:11:24Z 52.51892107 13.30193237 14
2015-09-05T12:11:25Z 52.51897777 13.30174976 14.5
2015-09-05T12:11:26Z 52.51905809 13.30155939 15
2015-09-05T12:11:27Z 52.51913377 13.301359 15.25
2015-09-05T12:11:28Z 52.51921977 13.30116434 15.75
2015-09-05T12:11:29Z 52.51930561 13.30095953 16.25
2015-09-05T12:11:30Z 52.51937872 13.30075751 16.25
2015-09-05T12:11:31Z 52.51944759 13.3005527 15.75
2015-09-05T12:11:32Z 52.51950584 13.30036324 14.5
2015-09-05T12:11:33Z 52.51955125 13.30018836 13.5
2015-09-05T12:11:34Z 52.51960489 13.30003223 12.25
2015-09-05T12:11:35Z 52.51965449 13.29988291 11
2015-09-05T12:11:37Z 52.51976052 13.2996446 10.5
2015-09-05T12:11:38Z 52.51987735 13.29962687 11.25
2015-09-05T12:11:40Z 52.52009518 13.29956333 12
2015-09-05T12:11:42Z 52.52037327 13.29950752 14.75
2015-09-05T12:11:43Z 52.52051321 13.29949076 15.25
2015-09-05T12:11:44Z 52.52066204 13.29951053 15.5
2015-09-05T12:11:45Z 52.5207916 13.29954042 15.25
2015-09-05T12:11:46Z 52.52093853 13.29962429 16.25
2015-09-05T12:11:47Z 52.52109696 13.29972242 17.25
2015-09-05T12:11:48Z 52.521241 13.29982149 17.25
2015-09-05T12:11:49Z 52.52137435 13.29989859 16.75
2015-09-05T12:11:50Z 52.52150827 13.29999164 16
2015-09-05T12:11:51Z 52.52164926 13.30004386 16
2015-09-05T12:11:52Z 52.5217681 13.30010016 15.25
2015-09-05T12:11:54Z 52.52200134 13.3002516 13
2015-09-05T12:11:55Z 52.52210925 13.30030384 12
2015-09-05T12:11:57Z 52.52231585 13.30038282 12
2015-09-05T12:11:58Z 52.52243302 13.30040604 12
2015-09-05T12:12:00Z 52.52261254 13.3003431 10.5
2015-09-05T12:12:01Z 52.52271428 13.30021824 12.5
2015-09-05T12:12:02Z 52.52281451 13.30008364 13.75
2015-09-05T12:12:03Z 52.52292202 13.29994087 14.75
2015-09-05T12:12:04Z 52.52303252 13.29978834 15.75
2015-09-05T12:12:05Z 52.5231482 13.29965158 16.5
2015-09-05T12:12:06Z 52.52327826 13.29949762 16.75
2015-09-05T12:12:07Z 52.52340368 13.29935447 16.75
2015-09-05T12:12:08Z 52.52352101 13.29920172 16.75
2015-09-05T12:12:09Z 52.52365446 13.29905746 17
2015-09-05T12:12:10Z 52.52378148 13.29890353 17.25
2015-09-05T12:12:12Z 52.52402153 13.29860641 16.75
2015-09-05T12:12:13Z 52.52411081 13.29841702 16.5
2015-09-05T12:12:14Z 52.52424135 13.29830058 16.5
2015-09-05T12:12:15Z 52.52436638 13.29816737 16
2015-09-05T12:12:16Z 52.52446716 13.2980157 16
2015-09-05T12:12:17Z 52.52462973 13.29798207 17
2015-09-05T12:12:18Z 52.52480111 13.29794531 17
2015-09-05T12:12:19Z 52.52494289 13.29786495 17
2015-09-05T12:12:20Z 52.52509265 13.29780823 16.75
2015-09-05T12:12:22Z 52.52539702 13.29770767 16.5
2015-09-05T12:12:23Z 52.52554415 13.29766138 16.25
2015-09-05T12:12:24Z 52.52566597 13.29762643 15.75
2015-09-05T12:12:25Z 52.52579703 13.29757963 15
2015-09-05T12:12:27Z 52.52602969 13.29751156 13.25
2015-09-05T12:12:28Z 52.52613122 13.29749605 8
2015-09-05T12:12:30Z 52.52626736 13.29744551 2
2015-09-05T12:12:31Z 52.52631239 13.29742453 6
2015-09-05T12:12:32Z 52.52636239 13.29741986 7
2015-09-05T12:12:33Z 52.52637241 13.2973977 8
2015-09-05T12:12:34Z 52.52638461 13.29738601 8
2015-09-05T12:12:36Z 52.52649587 13.29735565 10
2015-09-05T12:12:37Z 52.52656971 13.29734089 10
2015-09-05T12:12:39Z 52.52675742 13.29727581 13
2015-09-05T12:12:40Z 52.52685465 13.29724524 13
2015-09-05T12:12:41Z 52.52698288 13.29721363 13.75
2015-09-05T12:12:42Z 52.52712815 13.29718887 15
2015-09-05T12:12:43Z 52.52727466 13.29714275 15.5
2015-09-05T12:12:44Z 52.52741721 13.29710303 16
2015-09-05T12:12:45Z 52.5275556 13.29706051 16.75
2015-09-05T12:12:46Z 52.52770829 13.2970188 17
2015-09-05T12:12:47Z 52.5278635 13.29697924 17
2015-09-05T12:12:48Z 52.52801656 13.29691754 17.25
2015-09-05T12:12:49Z 52.52816582 13.29688778 17.25
2015-09-05T12:12:50Z 52.52829543 13.29686867 17
2015-09-05T12:12:51Z 52.52845507 13.29682107 17
2015-09-05T12:12:52Z 52.52858996 13.29677423 16
2015-09-05T12:12:53Z 52.52871555 13.2967109 15.5
2015-09-05T12:12:54Z 52.52885921 13.29665282 14.5
2015-09-05T12:12:56Z 52.52895502 13.29660091 12.75
2015-09-05T12:12:56Z 52.52904896 13.29656869 10.5
2015-09-05T12:12:57Z 52.52912413 13.2965424 8.25
2015-09-05T12:12:58Z 52.52918585 13.29653271 7.5
2015-09-05T12:13:00Z 52.52921653 13.29651073 2
2015-09-05T12:13:01Z 52.52922238 13.29649367 1.5
2015-09-05T12:13:02Z 52.52925618 13.29647736 1.5
2015-09-05T12:13:03Z 52.52930662 13.2964524 7
2015-09-05T12:13:04Z 52.52937431 13.29641287 9
2015-09-05T12:13:05Z 52.5294619 13.29639276 10.25
2015-09-05T12:13:07Z 52.52965845 13.29630116 11.25
2015-09-05T12:13:09Z 52.52982795 13.29621996 12
2015-09-05T12:13:10Z 52.52994764 13.29620619 12
2015-09-05T12:13:12Z 52.53010295 13.29612776 9
2015-09-05T12:13:13Z 52.53013393 13.2961206 5.75
2015-09-05T12:13:14Z 52.53016507 13.29610034 1
2015-09-05T12:13:15Z 52.53019422 13.29608721 1
2015-09-05T12:13:16Z 52.53020801 13.29606935 0.75
2015-09-05T12:13:17Z 52.5302122 13.29606274 1.25
2015-09-05T12:13:18Z 52.53024946 13.29604821 6
2015-09-05T12:13:19Z 52.53030715 13.29602334 9
2015-09-05T12:13:20Z 52.53038711 13.29598857 10
2015-09-05T12:13:21Z 52.53047083 13.29596657 10
2015-09-05T12:13:22Z 52.53057842 13.29592935 11.25
2015-09-05T12:13:23Z 52.53068405 13.29588008 12.5
2015-09-05T12:13:24Z 52.5308031 13.29581818 13
2015-09-05T12:13:26Z 52.53093986 13.295783 14.25
2015-09-05T12:13:26Z 52.53106913 13.295731 14.75
2015-09-05T12:13:27Z 52.53121371 13.29568037 15.75
2015-09-05T12:13:28Z 52.53136392 13.29559031 16.25
2015-09-05T12:13:29Z 52.53151062 13.29550828 16.75
2015-09-05T12:13:30Z 52.5316618 13.29541943 17.5
2015-09-05T12:13:31Z 52.53181286 13.29533433 18
2015-09-05T12:13:32Z 52.53196492 13.29525693 18.25
2015-09-05T12:13:33Z 52.53210498 13.295164 18
2015-09-05T12:13:34Z 52.53225574 13.29505752 17.5
2015-09-05T12:13:35Z 52.53239675 13.29495972 16.75
2015-09-05T12:13:36Z 52.53252495 13.29488186 15.25
2015-09-05T12:13:37Z 52.53265589 13.29479821 15
2015-09-05T12:13:38Z 52.53275829 13.29471747 13.25
2015-09-05T12:13:39Z 52.53287997 13.29464164 13
2015-09-05T12:13:40Z 52.53295934 13.29460103 10.75
2015-09-05T12:13:41Z 52.53304084 13.29455206 10
2015-09-05T12:13:42Z 52.53312045 13.29450915 9
2015-09-05T12:13:43Z 52.53319693 13.29447321 8.5
2015-09-05T12:13:44Z 52.5332477 13.29441171 7.5
2015-09-05T12:13:45Z 52.53328871 13.29437949 6.5
2015-09-05T12:13:46Z 52.53335948 13.2943418 7.25
2015-09-05T12:13:47Z 52.53343417 13.29429497 8.5
2015-09-05T12:13:48Z 52.53350265 13.29424339 8.5
2015-09-05T12:13:49Z 52.53355621 13.29417582 8.5
2015-09-05T12:13:50Z 52.53362195 13.29412472 8.5
2015-09-05T12:13:51Z 52.53370878 13.29404578 9.75
2015-09-05T12:13:52Z 52.533759 13.29401406 8.75
2015-09-05T12:13:53Z 52.53380292 13.29398094 7
2015-09-05T12:13:54Z 52.53384919 13.29396634 5.75
2015-09-05T12:13:55Z 52.53389085 13.2939574 1
2015-09-05T12:13:56Z 52.53391694 13.2939574 1
2015-09-05T12:13:57Z 52.53392919 13.2939574 0.25
2015-09-05T12:13:58Z 52.53392919 13.2939574 0
2015-09-05T12:13:59Z 52.53392919 13.2939574 0
2015-09-05T12:14:00Z 52.53392919 13.2939574 0
2015-09-05T12:14:01Z 52.53392919 13.2939574 0
2015-09-05T12:14:02Z 52.53392919 13.2939574 0
2015-09-05T12:14:03Z 52.53392919 13.2939574 0
2015-09-05T12:14:04Z 52.53392919 13.2939574 0
2015-09-05T12:14:05Z 52.53392919 13.2939574 0
2015-09-05T12:14:06Z 52.53392919 13.2939574 0.5
2015-09-05T12:14:07Z 52.53402049 13.29395039 4
2015-09-05T12:14:08Z 52.53402049 13.29395039 8
2015-09-05T12:14:09Z 52.53409993 13.29398429 8.5
2015-09-05T12:14:10Z 52.5341833 13.29402841 9.5
2015-09-05T12:14:11Z 52.53427766 13.29409014 10.75
2015-09-05T12:14:12Z 52.53436979 13.29414148 10.75
2015-09-05T12:14:13Z 52.53446361 13.29414203 10
2015-09-05T12:14:14Z 52.53456694 13.29410642 9
2015-09-05T12:14:15Z 52.53466426 13.29402845 6
2015-09-05T12:14:16Z 52.53474216 13.29390552 4

View File

@ -1,176 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
import QtQuick.Layouts 1.1
import ClusterDemo 1.0
Item{
id: consumptionView
anchors.fill: parent
ListView {
id: listView
height: 260
width: 260
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: (ValueSource.carId === 0) ? parent.width / 6 : parent.width / 4.5
header: Item {
width: listView.width
height: 30
Text {
anchors.fill: parent
text: "Consumption past 100 km"
horizontalAlignment: Text.AlignRight
color: "white"
font.pixelSize: 15
}
}
model: 13//contactModel
delegate: Row {
spacing: 15
Text {
id: levelText
horizontalAlignment: Text.AlignRight
y: -levelText.height / 2
width: 60
text: {
if (index === 0)
levelText.text = "900"
else if (index === 9)
levelText.text = "0"
else if (index === 12)
levelText.text = "-300"
else
levelText.text=""
}
color: "#717273"
font.pixelSize: 12
}
Rectangle {
id: levelLine
visible: index != 6 ? true : false
color: index === 8 ? "#717273" : "#26282a";
width: index === 8 ? listView.width / 1.5 : listView.width / 1.6;
height: 1
}
Row {
visible: index === 6 ? true : false
spacing: 4
Repeater {
model: 22
Rectangle {
id: avgLine
color: "#717273"
width: 4
height: 1
}
}
}
Text {
id: avgTExt
y: -avgTExt.height / 4
text:{
if (index === 5)
avgTExt.text = " Avg"
else if (index === 6)
avgTExt.text = "300"
else if (index === 8)
avgTExt.text = "IDEAL"
else
avgTExt.text=""
}
color: "#717273"
font.pixelSize: 12
}
}
}
Repeater {
id: repeater
property real listHeaderHeight: listView.headerItem.height
property real listContentItemHeight: listView.contentItem.height
property int listCount: listView.count
property real spaceInPixels: listContentItemHeight / listCount
model: 33
Rectangle {
id: valueRect
color: {
if (ValueSource.consumption[index] >= 100 )
"white"
else {
color = (ValueSource.carId === 0) ? "blue" : "#E31E24"
}
}
width: 2
height: {
var levelCount = ValueSource.consumption[index] / 100
if (ValueSource.consumption[index] >= 100 ) {
repeater.height = repeater.spaceInPixels * levelCount
- repeater.spaceInPixels - 2 * levelCount //2 is line width
}
else {
repeater.height = Math.abs(repeater.spaceInPixels * levelCount
- 2 * levelCount)//2 is line width)
}
}
x: listView.x + 75 + index * 5
y:{
if (ValueSource.consumption[index] >= 100 ) {
repeater.y = (listView.y + repeater.listHeaderHeight
+ repeater.spaceInPixels * 7) - height
}
else {
repeater.y = listView.y + repeater.listHeaderHeight
+ repeater.spaceInPixels * 7
}
}
}
}
}

View File

@ -1,99 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.6
Item {
id: fpscounter
property real fpsNow: 0
property bool running: false
property alias fpsVisible: fpsLabel.visible
property int fpsInterval: 1000
property alias color: fpsLabel.color
Item {
id: swapTest
property real t
NumberAnimation on t {
running: fpscounter.running
from: 0
to: 1
duration: fpsInterval
loops: Animation.Infinite
}
onTChanged: {
++fpsTimer.tick
}
}
Timer {
id: fpsTimer
running: fpscounter.running
repeat: true
interval: fpsInterval
property var lastFrameTime: new Date()
property int tick
onTriggered: {
var now = new Date()
var dt = now.getTime() - lastFrameTime.getTime()
lastFrameTime = now
var fps = (tick * fpsInterval) / dt
fpsNow = Math.round(fps * 10) / 10
tick = 0
if (fpsVisible)
fpsLabel.updateYerself()
}
}
Text {
id: fpsLabel
visible: false
anchors.centerIn: parent
font.pixelSize: 10
color: "white"
function updateYerself() {
text = Math.round(fpsNow)
}
}
}

View File

@ -1,136 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
import QtLocation 5.5
import QtPositioning 5.5
import QtGraphicalEffects 1.0
import ClusterDemo 1.0
Item {
width: root.width / 3
height: width
Map {
id: map
width: parent.width + 300
height: parent.height + 300
x: -150
y: -150
property real speed
plugin: Plugin {
id: plugin
preferred: ["mapbox"]
PluginParameter { name: "mapbox.access_token"; value: "pk.eyJ1IjoicXRjbHVzdGVyIiwiYSI6ImZiYTNiM2I0MDE2NmNlYmY0ZmM5NWMzZDVmYzI4NjFlIn0.uk3t7Oi9lDByIJd2E0vRWg" }
PluginParameter { name: "mapbox.map_id"; value: "qtcluster.ndeb6ce6" }
}
center: QtPositioning.coordinate(ValueSource.latitude, ValueSource.longitude)
zoomLevel: 16
enabled: false
rotation: -ValueSource.direction
Behavior on rotation {
RotationAnimation {
duration: 2000
direction: RotationAnimation.Shortest
}
}
// uncomment ifndef QTIVIVEHICLEFUNCTIONS
// PositionSource {
// id: positionSource
// nmeaSource: "qrc:/qml/route.txt"
// onPositionChanged: {
// if (position.speedValid) {
// // center the map on the current position
// if (position.direction > 0) {
// map.rotation = -position.direction
// map.center = position.coordinate
// }
// ValueSource.kph = position.speed * 3.6
// ValueSource.oldSpeed.shift()
// ValueSource.oldSpeed.push(position.speed * 3.6)
// ValueSource.speedChanged()
// //routeStopped.restart()
// }
// }
// }
// Component.onCompleted:{
// positionSource.start()
// //routeStopped.running = true
// }
// end comment
Behavior on center {
id: centerBehavior
enabled: true
CoordinateAnimation { duration: 1500 }
}
}
FastBlur {
anchors.fill: map
source: map
radius: 0.01
rotation: map.rotation
}
Image {
id: positionImage
anchors.centerIn: parent
source: mapPositionImage
}
Text {
color: "white"
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: (ValueSource.carId === 0) ? 75 : 0
font.pixelSize: 9
text:"© Mapbox © OpenStreetMap"
}
}

View File

@ -1,116 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
import ClusterDemo 1.0
Item {
id: playerView
property real xCenter: remainingTimeImage.width / 2
property real yCenter: remainingTimeImage.height / 2
property var timeElapsed: ValueSource.musicElapsed
Image {
id: musicCover
anchors.top: parent.top
anchors.topMargin: (ValueSource.carId === 0) ? 160 : 70
anchors.horizontalCenter: parent.horizontalCenter
source: "image://etc/MusicPlayer_Cover.png"
}
Image {
id: remainingTimeImage
anchors.centerIn: musicCover
source: "image://etc/MusicPlayer_CircleRemaining.png"
}
Text {
id: song
anchors.top: remainingTimeImage.bottom
anchors.topMargin: 10
anchors.horizontalCenter: remainingTimeImage.horizontalCenter
text: "Tonight's the Night \n(Gonna Be Alright)"
font.pixelSize: 12
color: "white"
}
Text {
anchors.top: song.bottom
anchors.horizontalCenter: song.horizontalCenter
text: "ROD STEWART"
font.pixelSize: 10
color: "white"
}
function paintBackground(ctx) {
ctx.beginPath()
ctx.lineWidth = 2
ctx.strokeStyle = "white"
ctx.arc(xCenter, yCenter, yCenter - ctx.lineWidth / 2, 1.5 * Math.PI,
2 * Math.PI * timeElapsed / 100 + 1.5 * Math.PI)
ctx.stroke()
}
Canvas {
id: canvas
width: remainingTimeImage.width
height: width
anchors.centerIn: musicCover
onPaint: {
var ctx = getContext("2d")
ctx.reset()
paintBackground(ctx)
}
}
onTimeElapsedChanged: {
canvas.requestPaint()
}
//Do not play music timer if view not visible
Component.onCompleted: ValueSource.musicTimer.running = true
onVisibleChanged: {
if (!visible)
ValueSource.musicTimer.running = false
else
ValueSource.musicTimer.running = true
}
}

View File

@ -1,64 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.6
import ClusterDemo 1.0
Item {
property int direction: Qt.NoArrow
property bool active: false
property bool flashing: false
property url iconOn: "image://etc/Icon_TurnLeft_ON.png"
property url iconOff: "image://etc/Icon_TurnLeft_OFF.png"
Timer {
interval: 500
running: (direction !== Qt.NoArrow)
repeat: true
onTriggered: flashing = !flashing
}
Image {
source: (active && flashing) ? iconOn : iconOff
mirror: direction === Qt.RightArrow
anchors.centerIn: parent
}
}

View File

@ -1,438 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
pragma Singleton
import QtQuick 2.6
// comment ifndef QTIVIVEHICLEFUNCTIONS
//import QtIVIVehicleFunctions 1.0
import ClusterDemoData 1.0
Item {
id: valueSource
property real kph: 0
property real consumeKW: 0
property real maxConsumeKWValue: 90
property real maxChargeKWValue: 40
property real chargeKW: 0
property real maxRange: 600
property real range: (batteryLevel / 100) * maxRange
property bool runningInDesigner: false
property bool seatBelt: false
property var consumption: [300, 600, 700, 800, 900, 700, 600, 300, 50, 50, -100, 50, -100, -150,
-200, 50, 150, 200, 300, 200, 300, 200, 500, 50, -100, -100, -150, -80, 50, 300, 600, 700, 800,
600, 700, 300, 50, 50]
property var turnSignal
property var currentDate: new Date()
//property string date: currentDate.toLocaleDateString(Qt.locale("fi_FI"), "ddd d. MMM")
//property string time: currentDate.toLocaleTimeString(Qt.locale("fi_FI"), "hh:mm")
property string date: currentDate.toLocaleDateString(Qt.locale("en_GB"))
property string time: currentDate.toLocaleTimeString(Qt.locale("en_GB"), "hh:mm")
ClusterData {
id: clusterDataSource
onVehicleSpeedChanged: {
kph = vehicleSpeed
if (carId === 0 && !fastBootDemo) {
oldSpeed.shift()
oldSpeed.push(vehicleSpeed)
speedChanged()
}
}
property int notLeft: ~Qt.LeftArrow
property int notRight: ~Qt.RightArrow
onLeftTurnLightChanged: leftTurnLight ? turnSignal |= Qt.LeftArrow
: turnSignal &= notLeft
onRightTurnLightChanged: rightTurnLight ? turnSignal |= Qt.RightArrow
: turnSignal &= notRight
}
// comment ifndef QTIVIVEHICLEFUNCTIONS
property real latitude: clusterDataSource.latitude
property real longitude: clusterDataSource.longitude
property real direction: clusterDataSource.direction
property bool lowBeam: clusterDataSource.headLight
property int carId: clusterDataSource.carId
property bool lightFailure: clusterDataSource.lightFailure
property bool flatTire: clusterDataSource.flatTire
property bool frontLeftOpen: false
property bool frontRightOpen: false
property bool rearLeftDoorOpen: false
property bool rearRighDoorOpen: false
property bool hoodOpen: false
property bool trunkOpen: false
property double batteryLevel: clusterDataSource.batteryPotential
property double fuelLevel: clusterDataSource.gasLevel
property int gear: clusterDataSource.gear
property bool parkingBrake: clusterDataSource.brake
// TODO: These two are hacks. View change messages might not come through CAN.
property bool viewChange: clusterDataSource.oilTemp
property bool rightViewChange: clusterDataSource.oilPressure
//
// ENABLE FOR FAST BOOT DEMO (or otherwise with no CanController)
//
property bool fastBootDemo: true
// TODO: Park light used for automatic demo mode for now
property bool automaticDemoMode: fastBootDemo ? true : clusterDataSource.parkLight
//
// Speed animations for fast boot demo
//
Timer {
running: fastBootDemo
interval: 4000
onTriggered: animation.start()
}
Timer {
running: fastBootDemo
property bool turnLeft: true
repeat: true
interval: 5000
onTriggered: {
turnLeft = !turnLeft
if (turnLeft)
turnSignal = Qt.LeftArrow
else
turnSignal = Qt.RightArrow
stopSignaling.start()
}
}
Timer {
id: stopSignaling
running: false
interval: 2100
onTriggered: turnSignal = Qt.NoArrow
}
Behavior on fuelLevel {
enabled: fastBootDemo
PropertyAnimation {
duration: 18000
}
}
Behavior on batteryLevel {
enabled: fastBootDemo
PropertyAnimation {
duration: 18000
}
}
onFuelLevelChanged: {
if (fastBootDemo && fuelLevel <= 5)
fuelLevel = 100
}
onBatteryLevelChanged: {
if (fastBootDemo && batteryLevel <= 5)
batteryLevel = 100
}
SequentialAnimation {
id: animation
running: false
loops: Animation.Infinite
ScriptAction {
script: {
gear = 0
parkingBrake = true
consumeKW = 0
chargeKW = 0
}
}
PauseAnimation { duration: 2000 }
ScriptAction {
script: {
parkingBrake = false
gear = 1
fuelLevel -= 10.
batteryLevel -= 10.
}
}
ParallelAnimation {
PropertyAnimation {
target: valueSource
property: "kph"
from: 0
to: 150
duration: 10000
}
PropertyAnimation {
target: valueSource
property: "consumeKW"
from: 0
to: 75
duration: 10000
}
}
ParallelAnimation {
PropertyAnimation {
target: valueSource
property: "kph"
from: 150
to: 120
duration: 500
}
PropertyAnimation {
target: valueSource
property: "consumeKW"
from: 75
to: 0
duration: 100
}
PropertyAnimation {
target: valueSource
property: "chargeKW"
from: 0
to: 40
duration: 500
}
}
ParallelAnimation {
PropertyAnimation {
target: valueSource
property: "kph"
from: 120
to: 200
duration: 1500
}
PropertyAnimation {
target: valueSource
property: "consumeKW"
from: 0
to: 90
duration: 1500
}
PropertyAnimation {
target: valueSource
property: "chargeKW"
from: 40
to: 0
duration: 100
}
}
ParallelAnimation {
PropertyAnimation {
target: valueSource
property: "kph"
from: 200
to: 0
duration: 6000
}
PropertyAnimation {
target: valueSource
property: "consumeKW"
from: 90
to: 0
duration: 600
}
PropertyAnimation {
target: valueSource
property: "chargeKW"
from: 0
to: 40
duration: 3000
}
}
}
property int simuRpm: fastBootDemo ? kph * 40 : kph * 150
property double simuTemperature: kph * .25 + 60.
// In normal Car UI mode only speed is animated based on gps data
// In automatic demo mode rpm, turbo, consumption and engine temperature are based on speed
property int rpm: automaticDemoMode ? simuRpm : clusterDataSource.rpm
property double engineTemperature: automaticDemoMode ? simuTemperature
: clusterDataSource.engineTemp
property int totalDistance: 42300
property int kmSinceCharge: 8
property int avRangePerCharge: 425
property int energyPerKm: 324
property real totalDistanceSince: 0.
property string gearString: {
var g
if (gear === 0 || gear < -1)
return "N"
else if (gear === -1)
return "R"
else if (carId === 1) //sports car
return gear.toString()
else
return "D"
}
Timer {
id: timeTimer
interval: 15000
repeat: true
running: true
onTriggered: {
currentDate = new Date()
//date = currentDate.toLocaleDateString(Qt.locale("fi_FI"), "ddd d. MMM")
//time = currentDate.toLocaleTimeString(Qt.locale("fi_FI"), "hh:mm")
date = currentDate.toLocaleDateString(Qt.locale("en_GB"))
time = currentDate.toLocaleTimeString(Qt.locale("en_GB"), "hh:mm")
// Approximate total distance based on current speed
totalDistanceSince += kph / 240. // = km / 15 min
if (totalDistanceSince > 1.) {
var totalInt = Math.floor(totalDistanceSince)
totalDistance += totalInt
kmSinceCharge += totalInt
totalDistanceSince -= totalInt
}
}
}
Timer {
id: backCutTimer
interval: 1000
repeat: true
running: true
onTriggered: {
backCut = kph
}
}
property real temperature: 0.6
property alias musicTimer: musicTimer
property real backCut: 0 //For needle tail gradient
property real musicElapsed: 0
Timer {
id: musicTimer
interval: 2000
running: false
repeat: true
onTriggered: {
if (musicElapsed < 100)
musicElapsed++
else
musicElapsed = 0
}
}
Behavior on kph {
enabled: !fastBootDemo
PropertyAnimation { duration: 2000 }
}
//
// For electric car KwGauge animation
//
property var oldSpeed: [0, 0, 0]
signal speedChanged
SequentialAnimation {
id: reduceSpeedAnim
running: (carId === 0 && !fastBootDemo)
property alias chargeTo: charge.to
NumberAnimation {
target: valueSource
property: "consumeKW"
duration: 600
to: 0
}
NumberAnimation {
id: charge
target: valueSource
property: "chargeKW"
duration: 600
}
}
SequentialAnimation {
id: addSpeedAnim
running: (carId === 0 && !fastBootDemo)
property alias consumeTo: consume.to
NumberAnimation {
target: valueSource
property: "chargeKW"
duration: 600
to: 0
}
NumberAnimation {
id: consume
target: valueSource
property: "consumeKW"
duration: 600
}
}
onSpeedChanged: {
var speedChange = oldSpeed[1] - oldSpeed[0]
if (speedChange > 2) {
//"adding speed"
var newKW = Math.min(maxConsumeKWValue * 0.8, 10 * speedChange)
addSpeedAnim.consumeTo = newKW
addSpeedAnim.restart()
} else if (speedChange < -2) {
//"reducing speed"
newKW = Math.min(maxChargeKWValue * 0.8, 2 * Math.abs(speedChange))
reduceSpeedAnim.chargeTo = newKW
reduceSpeedAnim.restart()
} else if (Math.abs(speedChange) >= 0 && oldSpeed[1] !== 0) {
//Speed just about the same but still moving
addSpeedAnim.consumeTo = Math.min(maxConsumeKWValue * (kph / 100),
maxConsumeKWValue * 0.5)
addSpeedAnim.restart()
}
if (kph <= 0.1) {
addSpeedAnim.consumeTo = 0
reduceSpeedAnim.chargeTo = 0
addSpeedAnim.restart()
reduceSpeedAnim.restart()
}
}
}

View File

@ -1,163 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
Item {
id: infoNote
height: 70
width: noteImage.width
anchors.bottom: car.bottom
visible: noteVisible && highlightType && !car.hidden
property int fixedPositionX: 0
property color textColor: "white"
property bool noteVisible: false
property int highlightType: main.carModelHighlightType
Image {
id: noteImage
source: "image://etc/InfoNoteBackground.png"
opacity: 0.75
}
Timer {
id: waitForCamera
interval: 800
running: false
onTriggered: {
noteVisible = true
if (fixedPositionX === 0)
infoNote.x = car.item.x + (car.item.width - noteImage.width) / 2
else
x = fixedPositionX - (noteImage.width / 2)
}
}
onHighlightTypeChanged: {
if (highlightType)
waitForCamera.restart()
else
noteVisible = false
}
Text {
id: pressureText
anchors.centerIn: parent
visible: infoNote.visible && (highlightType >= 0 && highlightType <= 4)
color: textColor
font.pixelSize: 16
font.weight: Font.DemiBold
}
Text {
id: bulbText
anchors.centerIn: parent
visible: highlightType >= 5
text: "Lightbulb"
color: textColor
font.pixelSize: 16
font.weight: Font.DemiBold
}
Text {
id: doorText
anchors.centerIn: parent
visible: highlightType === -1
text: "Check doors"
color: textColor
font.pixelSize: 16
font.weight: Font.DemiBold
}
onVisibleChanged: {
if (visible) {
infoNote.anchors.horizontalCenterOffset = 0
if (highlightType === -1) {
//infoNote.width = doorText.contentWidth + 40
//infoNote.height = 40
} else {
if (highlightType <= 4) {
var pressure = Math.random() + 1
//var temperature = Math.random() * 12 + 20
pressureText.text = pressure.toFixed(1) + " bar"
//temperatureText.text = temperature.toFixed(1) + " \u00B0C"
//infoNote.width = pressureText.contentWidth + 40
//infoNote.height = 40
} else {
switch (highlightType) {
case 5:
bulbText.text = "Check left headlight"
break
case 6:
bulbText.text = "Check right headlight"
break
case 7:
bulbText.text = "Check right daylight"
break
case 8:
bulbText.text = "Check left daylight"
break
case 9:
infoNote.anchors.verticalCenterOffset = 60
bulbText.text = "Check left taillight"
break
case 10:
infoNote.anchors.verticalCenterOffset = 60
bulbText.text = "Check right taillight"
break
default:
// Coding fault if we get here, undefined code
bulbText.text = "Check lights"
}
//infoNote.width = bulbText.contentWidth + 40
//infoNote.height = 40
}
}
}
}
}

View File

@ -1,102 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.5
import QtMultimedia 5.5
import ClusterDemo 1.0
Item {
property alias imageSource: overlay.source
visible: true
/* TODO replace with image */
MediaPlayer {
id: video
autoPlay: false
muted: true
//source: "file:///data/user/qt/qtcluster/video/reversing_video.3gp"
// Switch to still image after reversing video is finished, or an error occurs
onError: {
stillView.visible = true
console.log("Error playing video: " + error + ": " + errorString)
}
onStatusChanged: {
if (status === MediaPlayer.EndOfMedia)
stillView.visible = true
}
}
VideoOutput {
id: videoOutput
source: video //camera
anchors.centerIn: parent
height: 480 - 180
width: 1280 / 2.1
fillMode: Image.Stretch
Image {
id: stillView
visible: false
anchors.centerIn: parent
source: "image://etc/RearCameraStill.jpg"
height: videoOutput.height
width: videoOutput.width
}
Image {
id: overlay
visible: ValueSource.gear === -1
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
}
}
onVisibleChanged: {
if (visible) {
stillView.visible = false
video.play()
} else {
video.stop()
}
}
}

View File

@ -1,235 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.6
import ClusterDemo 1.0
import ".."
import QtQuick.Extras 1.4
import QtGraphicalEffects 1.0
Item {
id: bottomPanel
property int iconMargin: 7
property color iconRed: "#e41e25"
property color iconGreen: "#5caa15"
property color iconYellow: "#face20"
property color iconDark: "#000000"
anchors.horizontalCenter: parent.horizontalCenter
width: bottomPanelImage.width
height: bottomPanelImage.height - 24
Image {
id: bottomPanelImage
y: -24
source: "image://etc/BottomPanel.png"
}
TurnIndicator {
iconOn: "image://etc/Icon_TurnLeft_ON_small.png"
iconOff: "image://etc/Icon_TurnLeft_OFF_small.png"
direction: Qt.LeftArrow
anchors.verticalCenter: textTime.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 180
active: ValueSource.turnSignal & Qt.LeftArrow
}
Picture {
id: iconCoolant
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.right: iconBattery.left
color: ValueSource.engineTemperature >= 100.0 ? bottomPanel.iconRed : bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0246.dat"
layer.enabled: ValueSource.engineTemperature >= 100.0
layer.effect: Glow {
radius: 5
samples: 16
color: bottomPanel.iconRed
cached: true
spread: 0.15
}
}
SafeRendererPicture {
id: iconBattery
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.right: iconFuel.left
color: ValueSource.batteryLevel <= 25.0 ? bottomPanel.iconRed : bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0247.dat"
layer.enabled: ValueSource.batteryLevel <= 25.0
layer.effect: Glow {
radius: 5
samples: 16
color: bottomPanel.iconRed
cached: true
spread: 0.15
}
}
SafeRendererPicture {
id: iconFuel
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.right: iconParkingBrake.left
color: ValueSource.fuelLevel <= 20.0 ? bottomPanel.iconRed : bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0245.dat" // This is available in all editors.
layer.enabled: ValueSource.fuelLevel <= 20.0
layer.effect: Glow {
radius: 5
samples: 16
color: bottomPanel.iconRed
cached: true
spread: 0.15
}
}
SafeRendererPicture {
id: iconParkingBrake
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.right: textTime.left
anchors.rightMargin: 3
color: bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0238.dat"
}
Text {
id: textTime
text: ValueSource.time
font.pixelSize: 18
color: "white"
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 35
}
Picture {
id: iconLowbeam
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.left: textTime.right
anchors.leftMargin: bottomPanel.iconMargin
color: bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0456.dat"
}
Picture {
id: iconTyre
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.left: iconLowbeam.right
anchors.leftMargin: 2
color: ValueSource.flatTire ? bottomPanel.iconYellow : bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_1434A.dat"
layer.enabled: ValueSource.flatTire
layer.effect: Glow {
radius: 6
samples: 16
color: bottomPanel.iconYellow
cached: true
spread: 0.2
}
}
SafeRendererPicture {
id: iconLamp
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.left: iconTyre.right
color: bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_1555.dat"
}
SafeRendererPicture {
id: iconSeatbelt
width: 30
height: 30
anchors.verticalCenter: textTime.verticalCenter
anchors.left: iconLamp.right
color: ValueSource.seatBelt ? bottomPanel.iconRed : bottomPanel.iconDark
source: "qrc:/iso-icons/iso_grs_7000_4_0249.dat"
layer.enabled: ValueSource.seatBelt
layer.effect: Glow {
radius: 5
samples: 16
color: bottomPanel.iconRed
cached: true
spread: 0.15
}
}
TurnIndicator {
direction: Qt.RightArrow
iconOn: "image://etc/Icon_TurnLeft_ON_small.png"
iconOff: "image://etc/Icon_TurnLeft_OFF_small.png"
anchors.verticalCenter: textTime.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 180
active: ValueSource.turnSignal & Qt.RightArrow
}
}

View File

@ -1,81 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.0
Column {
spacing: 20 / 1.5
property string value: ""
property string title: ""
property string unit: "KM"
Row {
anchors.horizontalCenter: parent.horizontalCenter
Text {
text: value
font.pixelSize: 24
color: "lightGray"
}
Text {
text: unit
font.pixelSize: 16
color: "lightGray"
}
}
Text {
text: title
font.pixelSize: 16
horizontalAlignment: Text.AlignHCenter
color: "lightGray"
}
}

View File

@ -1,151 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://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:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.6
import ClusterDemo 1.0
Item {
anchors.fill: parent
property real defaultScale: 1.0
property var previousView: calendarView
property bool view: ValueSource.viewChange
property int viewNumber: -1
CenterViewMusic {
id: musicView
anchors.horizontalCenter: parent.horizontalCenter
yTarget: 230
width: 124
height: 124
visible: false
y: defaultYPos
}
CenterViewContacts {
id: contactView
anchors.horizontalCenter: parent.horizontalCenter
yTarget: 240
width: 100
height: 100
visible: false
y: defaultYPos
}
CenterViewCarInfo {
id: carinfoView
xTarget: (parent.width - width) / 2
anchors.top: parent.top
anchors.topMargin: 230
width: 146
height: 80
x: defaultXPos
visible: false
}
CenterViewCalendar {
id: calendarView
xTarget: (parent.width - width) / 2
anchors.top: parent.top
anchors.topMargin: 230
width: 100
height: 91
x: defaultXPos
visible: false
}
PropertyAnimation {
id: shrinkCenter
property: "scale"
to: 0.0
running: false
duration: 500
onStopped: {
if (target != null)
target.visible = false
}
}
function handleViewChange(number) {
var currentView
if (number === 0)
currentView = musicView
else if (number === 1)
currentView = contactView
else if (number === 2)
currentView = carinfoView
else if (number === 3)
currentView = calendarView
if (previousView !== currentView) {
currentView.scale = defaultScale
currentView.visible = true
shrinkCenter.target = previousView
previousView = currentView
shrinkCenter.start()
}
}
onViewChanged: {
if (view) {
if (++viewNumber > 3)
viewNumber = 0
handleViewChange(viewNumber)
}
}
// Used on automatic demo mode
Timer {
id: centerTimer
property int viewNumber: -1
running: ValueSource.automaticDemoMode
repeat: true
interval: 6000
onTriggered: {
if (++viewNumber > 3)
viewNumber = 0
handleViewChange(viewNumber)
}
}
function stopAll() {
centerTimer.stop()
}
}

View File

@ -1,109 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune IVI UI.
**
** $QT_BEGIN_LICENSE:GPL-QTAS$
** Commercial License Usage
** Licensees holding valid commercial Qt Automotive Suite 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
** SPDX-License-Identifier: GPL-3.0
**
****************************************************************************/
import QtQuick 2.6
Item {
id: calendarContainer
property string appointment: "No appointments"
property var currentDate
property string date
property string time
opacity: 0.5
property alias xTarget: startupAnimation.to
property int defaultXPos: 200
Image {
id: image
source: "image://etc/calendar.png"
}
Text {
id: dateText
anchors.top: image.bottom
anchors.topMargin: 10
anchors.horizontalCenter: image.horizontalCenter
text: date
color: "gray"
font.pixelSize: 16
}
Text {
id: timeText
anchors.top: dateText.bottom
anchors.horizontalCenter: image.horizontalCenter
text: time
color: "gray"
font.pixelSize: 20
}
Text {
anchors.top: timeText.bottom
anchors.horizontalCenter: image.horizontalCenter
text: appointment
color: "lightGray"
font.pixelSize: 14
}
Timer {
id: fadeOutTimer
interval: 5000
running: false
repeat: false
onTriggered: {
calendarContainer.opacity = 0.5
}
}
Behavior on opacity { PropertyAnimation { duration: 500 } }
PropertyAnimation on x {
id: startupAnimation
duration: 500
easing.type: Easing.InCubic
onStopped: {
calendarContainer.opacity = 1.0
fadeOutTimer.start()
}
}
onVisibleChanged: {
if (visible) {
currentDate = new Date()
date = currentDate.toLocaleDateString(Qt.locale("en_GB"))
time = currentDate.toLocaleTimeString(Qt.locale("en_GB"), "hh:mm")
x = defaultXPos
startupAnimation.start()
}
}
}

View File

@ -1,97 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune IVI UI.
**
** $QT_BEGIN_LICENSE:GPL-QTAS$
** Commercial License Usage
** Licensees holding valid commercial Qt Automotive Suite 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.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
** SPDX-License-Identifier: GPL-3.0
**
****************************************************************************/
import QtQuick 2.6
import ClusterDemo 1.0
Item {
id: carinfoContainer
property int total: ValueSource.totalDistance
property int sinceLast: ValueSource.kmSinceCharge
opacity: 0.5
property alias xTarget: startupAnimation.to
property int defaultXPos: 900
Image {
id: image
source: "image://etc/CarInfoIcon.png"
}
Row {
scale: 0.75
spacing: 7
anchors.top: image.bottom
anchors.horizontalCenter: image.horizontalCenter
CarInfoField {
title: "Total distance"
value: carinfoContainer.total.toFixed().toString()
unit: "km"
}
CarInfoField {
title: "Since last\ncharge"
value: carinfoContainer.sinceLast.toString()
unit: "km"
}
}
Timer {
id: fadeOutTimer
interval: 5000
running: false
repeat: false
onTriggered: {
carinfoContainer.opacity = 0.5
}
}
Behavior on opacity { PropertyAnimation { duration: 500 } }
PropertyAnimation on x {
id: startupAnimation
duration: 500
easing.type: Easing.InCubic
onStopped: {
carinfoContainer.opacity = 1.0
fadeOutTimer.start()
}
}
onVisibleChanged: {
if (visible) {
x = defaultXPos
startupAnimation.start()
}
}
}

Some files were not shown because too many files have changed in this diff Show More