Merge remote-tracking branch 'origin/4.13' into master
Conflicts: CMakeLists.txt Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
@@ -48,7 +48,7 @@ find_package(Qt5 COMPONENTS LinguistTools)
|
|||||||
|
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help Script SerialPort Svg QUIET)
|
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg QUIET)
|
||||||
|
|
||||||
function (set_if_target var target)
|
function (set_if_target var target)
|
||||||
if (TARGET "${target}")
|
if (TARGET "${target}")
|
||||||
|
@@ -1,60 +1,12 @@
|
|||||||
/****************************************************************************
|
import QtQuick 2.14
|
||||||
**
|
import QtQuick.Window 2.14
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator
|
|
||||||
**
|
|
||||||
** $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.9
|
|
||||||
import QtQuick.Controls 2.2
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
id: bubble
|
||||||
source: "Bluebubble.svg"
|
source: "Bluebubble.svg"
|
||||||
smooth: true
|
smooth: true
|
||||||
property real centerX
|
property real centerX
|
||||||
property real centerY
|
|
||||||
property real bubbleCenter
|
property real bubbleCenter
|
||||||
|
property real centerY
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
@@ -1,74 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator
|
|
||||||
**
|
|
||||||
** $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.9
|
|
||||||
import QtQuick.Controls 2.2
|
|
||||||
|
|
||||||
Page {
|
|
||||||
width: 600
|
|
||||||
height: 400
|
|
||||||
property alias bubble: bubble
|
|
||||||
property alias mainWindow: mainWindow
|
|
||||||
|
|
||||||
header: Label {
|
|
||||||
text: qsTr("Page 1")
|
|
||||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
|
||||||
padding: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: mainWindow
|
|
||||||
color: "#ffffff"
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Bubble {
|
|
||||||
id: bubble
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,67 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator
|
|
||||||
**
|
|
||||||
** $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.9
|
|
||||||
import QtQuick.Controls 2.2
|
|
||||||
|
|
||||||
Page {
|
|
||||||
width: 600
|
|
||||||
height: 400
|
|
||||||
|
|
||||||
header: Label {
|
|
||||||
text: qsTr("Page 2")
|
|
||||||
font.pixelSize: Qt.application.font.pixelSize * 2
|
|
||||||
padding: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
text: qsTr("You are on Page 2.")
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
}
|
|
@@ -2,18 +2,12 @@ QT += quick sensors svg xml
|
|||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# any feature of Qt which as been marked deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Please consult the documentation of the
|
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if you use deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
SOURCES += main.cpp
|
SOURCES += \
|
||||||
|
main.cpp
|
||||||
|
|
||||||
RESOURCES += qml.qrc
|
RESOURCES += qml.qrc
|
||||||
|
|
||||||
@@ -28,10 +22,4 @@ qnx: target.path = /tmp/$${TARGET}/bin
|
|||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
ios {
|
ANDROID_ABIS = armeabi-v7a
|
||||||
QTPLUGIN += qsvg qsvgicon qtsensors_ios
|
|
||||||
QMAKE_INFO_PLIST = Info.plist
|
|
||||||
}
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
Bluebubble.svg
|
|
||||||
|
@@ -1,53 +1,3 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator
|
|
||||||
**
|
|
||||||
** $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 <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
|
|
||||||
@@ -58,9 +8,13 @@ int main(int argc, char *argv[])
|
|||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
const QUrl url(QStringLiteral("qrc:/main.qml"));
|
||||||
if (engine.rootObjects().isEmpty())
|
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||||
return -1;
|
&app, [url](QObject *obj, const QUrl &objUrl) {
|
||||||
|
if (!obj && url == objUrl)
|
||||||
|
QCoreApplication::exit(-1);
|
||||||
|
}, Qt::QueuedConnection);
|
||||||
|
engine.load(url);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
@@ -1,105 +1,37 @@
|
|||||||
/****************************************************************************
|
import QtQuick 2.14
|
||||||
**
|
import QtQuick.Window 2.14
|
||||||
** Copyright (C) 2017 The Qt Company Ltd.
|
import QtSensors 5.12
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator
|
|
||||||
**
|
|
||||||
** $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.9
|
Window {
|
||||||
import QtQuick.Controls 2.2
|
id: window
|
||||||
import QtSensors 5.9
|
|
||||||
|
|
||||||
ApplicationWindow {
|
|
||||||
visible: true
|
visible: true
|
||||||
width: 640
|
property alias mainWindow: mainWindow
|
||||||
height: 480
|
property alias bubble: bubble
|
||||||
title: qsTr("Accelerate Bubble")
|
Rectangle {
|
||||||
|
id: mainWindow
|
||||||
SwipeView {
|
color: "#ffffff"
|
||||||
id: swipeView
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
currentIndex: tabBar.currentIndex
|
|
||||||
|
|
||||||
Page1Form {
|
Bubble {
|
||||||
bubble {
|
id: bubble
|
||||||
id: bubble
|
x: bubble.centerX - bubbleCenter
|
||||||
centerX: mainWindow.width / 2
|
y: bubble.centerY - bubbleCenter
|
||||||
centerY: mainWindow.height / 2
|
bubbleCenter: bubble.width /2
|
||||||
bubbleCenter: bubble.width / 2
|
centerX: mainWindow.width /2
|
||||||
x: bubble.centerX - bubble.bubbleCenter
|
centerY: mainWindow.height /2
|
||||||
y: bubble.centerY - bubble.bubbleCenter
|
|
||||||
|
|
||||||
Behavior on y {
|
Behavior on y {
|
||||||
SmoothedAnimation {
|
SmoothedAnimation {
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
duration: 100
|
duration: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
SmoothedAnimation {
|
SmoothedAnimation {
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
duration: 100
|
duration: 100
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Page2Form {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer: TabBar {
|
|
||||||
id: tabBar
|
|
||||||
currentIndex: swipeView.currentIndex
|
|
||||||
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("Page 1")
|
|
||||||
}
|
|
||||||
TabButton {
|
|
||||||
text: qsTr("Page 2")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +39,7 @@ ApplicationWindow {
|
|||||||
id: accel
|
id: accel
|
||||||
dataRate: 100
|
dataRate: 100
|
||||||
active: true
|
active: true
|
||||||
|
readonly property double radians_to_degrees: 180 / Math.PI
|
||||||
|
|
||||||
onReadingChanged: {
|
onReadingChanged: {
|
||||||
var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1)
|
var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * 0.1)
|
||||||
@@ -118,24 +51,24 @@ ApplicationWindow {
|
|||||||
if (newX < 0)
|
if (newX < 0)
|
||||||
newX = 0
|
newX = 0
|
||||||
|
|
||||||
if (newX > page1.mainWindow.width - bubble.width)
|
if (newX > mainWindow.width - bubble.width)
|
||||||
newX = page1.mainWindow.width - bubble.width
|
newX = mainWindow.width - bubble.width
|
||||||
|
|
||||||
if (newY < 18)
|
if (newY < 18)
|
||||||
newY = 18
|
newY = 18
|
||||||
|
|
||||||
if (newY > page1.mainWindow.height - bubble.height)
|
if (newY > mainWindow.height - bubble.height)
|
||||||
newY = page1.mainWindow.height - bubble.height
|
newY = mainWindow.height - bubble.height
|
||||||
|
|
||||||
bubble.x = newX
|
bubble.x = newX
|
||||||
bubble.y = newY
|
bubble.y = newY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcPitch(x, y, z) {
|
function calcPitch(x,y,z) {
|
||||||
return -(Math.atan(y / Math.sqrt(x * x + z * z)) * 57.2957795);
|
return -Math.atan2(y, Math.hypot(x, z)) * accel.radians_to_degrees;
|
||||||
}
|
}
|
||||||
function calcRoll(x, y, z) {
|
function calcRoll(x,y,z) {
|
||||||
return -(Math.atan(x / Math.sqrt(y * y + z * z)) * 57.2957795);
|
return -Math.atan2(x, Math.hypot(y, z)) * accel.radians_to_degrees;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,7 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>Page1Form.ui.qml</file>
|
|
||||||
<file>Page2Form.ui.qml</file>
|
|
||||||
<file>qtquickcontrols2.conf</file>
|
|
||||||
<file>Bubble.qml</file>
|
|
||||||
<file>Bluebubble.svg</file>
|
|
||||||
<file>main.qml</file>
|
<file>main.qml</file>
|
||||||
|
<file>Bluebubble.svg</file>
|
||||||
|
<file>Bubble.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
; This file can be edited to change the style of the application
|
|
||||||
; Read "Qt Quick Controls 2 Configuration File" for details:
|
|
||||||
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
|
|
||||||
|
|
||||||
[Controls]
|
|
||||||
Style=Default
|
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 20 KiB |
BIN
doc/qtcreator/images/qtcreator-debugger-general-options.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-kits-cmake.png
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.9 KiB |
BIN
doc/qtcreator/images/qtquick-mobile-app-tutorial-image.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
doc/qtcreator/images/qtquick-mobile-app-tutorial-main-view.png
Normal file
After Width: | Height: | Size: 55 KiB |
@@ -128,6 +128,9 @@
|
|||||||
|
|
||||||
\image qtcreator-clang-tools-options.png "Clang Tools options tab"
|
\image qtcreator-clang-tools-options.png "Clang Tools options tab"
|
||||||
|
|
||||||
|
\li In the \uicontrol Clang-Tidy and \uicontrol Clazy-Standalone fields,
|
||||||
|
set the paths to the executables to use.
|
||||||
|
|
||||||
\li To build the project before running the Clang tools, select the
|
\li To build the project before running the Clang tools, select the
|
||||||
\uicontrol {Build the project before analysis} check box. The Clang
|
\uicontrol {Build the project before analysis} check box. The Clang
|
||||||
tools do not require the project to be built before analysis, but
|
tools do not require the project to be built before analysis, but
|
||||||
@@ -135,9 +138,9 @@
|
|||||||
generated during the build. For big projects, not building the
|
generated during the build. For big projects, not building the
|
||||||
project might save some time.
|
project might save some time.
|
||||||
|
|
||||||
\li In the \uicontrol {Simultaneous processes} field, select the number
|
\li In the \uicontrol {Parallel jobs} field, select the number of jobs
|
||||||
of processes to run simultaneously to make the analysis faster on
|
to run in parallel to make the analysis faster on multi-core
|
||||||
multi-core processors.
|
processors.
|
||||||
|
|
||||||
\li In the \uicontrol {Diagnostic Configuration} group, select
|
\li In the \uicontrol {Diagnostic Configuration} group, select
|
||||||
\uicontrol Manage to create or edit a custom configuration.
|
\uicontrol Manage to create or edit a custom configuration.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -34,32 +34,45 @@
|
|||||||
|
|
||||||
\section2 CMake Build Configuration
|
\section2 CMake Build Configuration
|
||||||
|
|
||||||
|
Configuring medium-sized to large CMake projects in \QC can be a
|
||||||
|
challenge due to the number of options that you need to pass to
|
||||||
|
CMake to configure the project correctly. \QC creates an initial
|
||||||
|
configuration for you based on the kit settings and displays it in
|
||||||
|
the \uicontrol {Initial CMake parameters} field.
|
||||||
|
|
||||||
\image qtcreator-cmake-build-settings.png
|
\image qtcreator-cmake-build-settings.png
|
||||||
|
|
||||||
Setting names with a common prefix (up to the first underscore character)
|
In the \uicontrol Value column, you can view and edit the actual values
|
||||||
are grouped under the prefix. To view all settings, select the
|
of the parameters that are passed to CMake. Parameter names are listed
|
||||||
\uicontrol Advanced check box.
|
in the \uicontrol Key column. Names with a common prefix (up to the first
|
||||||
|
underscore character) are grouped under the prefix. To view all parameters,
|
||||||
|
select the \uicontrol Advanced check box.
|
||||||
|
|
||||||
To add build settings, select \uicontrol Add, and then select the type of
|
To add parameters, select \uicontrol Add, and then select the type of
|
||||||
the setting that you are adding: \uicontrol Boolean, \uicontrol String,
|
the parameter that you are adding: \uicontrol Boolean, \uicontrol String,
|
||||||
\uicontrol Directory, or \uicontrol File.
|
\uicontrol Directory, or \uicontrol File.
|
||||||
|
|
||||||
To change the type of the selected setting, select
|
To change the type of the selected parameter, select
|
||||||
\uicontrol {Force to bool}, \uicontrol {Force to file},
|
\uicontrol {Force to bool}, \uicontrol {Force to file},
|
||||||
\uicontrol {Force to directory}, or \uicontrol {Force to string}.
|
\uicontrol {Force to directory}, or \uicontrol {Force to string}.
|
||||||
|
|
||||||
To modify the value of a build setting, double-click it, or select it,
|
To modify the value of a parameter, double-click it, or select it,
|
||||||
and then select \uicontrol Edit. To save the changes, select
|
and then select \uicontrol Edit. To save the changes, select
|
||||||
\uicontrol {Apply Configuration Changes}. Keep in mind that a
|
\uicontrol {Apply Configuration Changes}. Keep in mind that a
|
||||||
configuration change might trigger a follow-up configuration change.
|
configuration change might trigger a follow-up configuration change.
|
||||||
|
|
||||||
To remove a setting, select \uicontrol Unset.
|
To remove a parameter, select \uicontrol Unset.
|
||||||
|
|
||||||
To reset the changes that you made, select \uicontrol Reset.
|
To reset the changes that you made, select \uicontrol Reset.
|
||||||
|
|
||||||
To reconfigure CMake, select \uicontrol Build >
|
The parameter values that you change are passed via \c -D<option>=<value>
|
||||||
\uicontrol {Clear CMake Configuration}, and then
|
to CMake, which stores the options in the CMakeCache.txt file. This means
|
||||||
select \uicontrol Build > \uicontrol {Rescan Project}.
|
that if you remove the build directory, all the custom parameters that are
|
||||||
|
not part of the initial CMake parameters are also removed.
|
||||||
|
|
||||||
|
To reconfigure a project after making changes to the initial parameters,
|
||||||
|
select \uicontrol Build > \uicontrol {Clear CMake Configuration}, which
|
||||||
|
removes the CMakeCache.txt file. This enables you to do a full rebuild.
|
||||||
|
|
||||||
//! [cmake build configuration]
|
//! [cmake build configuration]
|
||||||
|
|
||||||
@@ -69,11 +82,12 @@
|
|||||||
\section2 CMake Build Steps
|
\section2 CMake Build Steps
|
||||||
|
|
||||||
\QC builds CMake projects by running \c {cmake . --build}, which then runs
|
\QC builds CMake projects by running \c {cmake . --build}, which then runs
|
||||||
whatever is needed based on how the project was configured: \c make,
|
the CMake generator specified in the project configuration: \c make,
|
||||||
\c mingw32-make, \c nmake, or \c ninja, for example.
|
\c mingw32-make, \c nmake, or \c ninja, for example. The CMake generator
|
||||||
|
produces project files for \QC.
|
||||||
|
|
||||||
You can add arguments and targets for the build command in
|
You can add arguments to pass to CMake and the generator and targets for
|
||||||
\uicontrol {Build Steps}.
|
the build command in \uicontrol {Build Steps}.
|
||||||
|
|
||||||
\image qtcreator-cmake-build-steps.png
|
\image qtcreator-cmake-build-steps.png
|
||||||
|
|
||||||
@@ -117,8 +131,8 @@
|
|||||||
|
|
||||||
\section2 CMake Clean Steps
|
\section2 CMake Clean Steps
|
||||||
|
|
||||||
When building with CMake, you can add arguments and targets for the clean
|
When building with CMake, you can add arguments to pass to CMake and the
|
||||||
command in \uicontrol {Clean Steps}.
|
generator and targets for the clean command in \uicontrol {Clean Steps}.
|
||||||
|
|
||||||
\image qtcreator-cmake-clean-steps.png
|
\image qtcreator-cmake-clean-steps.png
|
||||||
|
|
||||||
|
@@ -62,41 +62,53 @@
|
|||||||
\QC requires CMake's \l{https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html}
|
\QC requires CMake's \l{https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html}
|
||||||
{file-based API}. Please make sure to use CMake version 3.14, or later.
|
{file-based API}. Please make sure to use CMake version 3.14, or later.
|
||||||
|
|
||||||
To specify paths to CMake executables:
|
To view and specify settings for CMake:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||||
\uicontrol CMake > \uicontrol Add.
|
\uicontrol CMake.
|
||||||
|
|
||||||
\image qtcreator-cmakeexecutable.png
|
\image qtcreator-cmakeexecutable.png
|
||||||
|
|
||||||
\li In the \uicontrol Name field, specify a name for the tool.
|
\li The \uicontrol Name field displays a name for the CMake
|
||||||
|
installation.
|
||||||
|
|
||||||
\li In the \uicontrol Path field, specify the path to the CMake
|
\li The \uicontrol Path field displays the path to the CMake
|
||||||
executable.
|
executable.
|
||||||
|
|
||||||
\li In the \uicontrol {Help file} field, specify the path to the
|
\li The \uicontrol {Help file} field displays the path to the
|
||||||
CMake help file (.qch) provided by and installed with CMake.
|
CMake help file (.qch) provided by and installed with CMake.
|
||||||
|
|
||||||
|
\li Deselect the \uicontrol {Autorun CMake} check box if you do not want
|
||||||
|
to automatically run CMake every time when you save changes to
|
||||||
|
\c {CMakeLists.txt} files.
|
||||||
|
|
||||||
\li Select the \uicontrol {Auto-create build directories} check box to
|
\li Select the \uicontrol {Auto-create build directories} check box to
|
||||||
automatically create build directories for CMake projects.
|
initially configure the project in a temporary directory. When you
|
||||||
|
build the project \QC starts from scratch and configures the
|
||||||
|
project again using the build directory.
|
||||||
|
|
||||||
\li Select \uicontrol Apply to save your changes.
|
\li Select \uicontrol Apply to save your changes.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\note When the \uicontrol {Autorun CMake} check box is enabled, \QC
|
To add a path to a CMake executable that \QC does not detect automatically,
|
||||||
automatically runs CMake when you make changes to \c {CMakeLists.txt} files.
|
and to specify settings for it, select \uicontrol Add. To make changes to
|
||||||
We recommend that you do not disable this check box, because that would
|
automatically detected installations, select \uicontrol Clone.
|
||||||
eventually make \QC and the project disagree on what the project information
|
|
||||||
is.
|
\QC uses the \e {default CMake} if it does not have enough information
|
||||||
|
to choose the CMake to use. To set the selected CMake executable as the
|
||||||
|
default, select \uicontrol {Make Default}.
|
||||||
|
|
||||||
|
To remove the selected CMake executable from the list, select
|
||||||
|
\uicontrol Remove.
|
||||||
|
|
||||||
Select the \uicontrol Kits tab to add the CMake tool to a build and run kit.
|
Select the \uicontrol Kits tab to add the CMake tool to a build and run kit.
|
||||||
The kit also specifies the CMake generator that is used for producing
|
The kit also specifies the CMake generator that is used for producing
|
||||||
project files for \QC and the configuration variables that are used:
|
project files for \QC and the initial configuration parameters:
|
||||||
|
|
||||||
\image qtcreator-kits.png
|
\image qtcreator-kits-cmake.png
|
||||||
|
|
||||||
For more information, see \l {Adding Kits}.
|
For more information, see \l {Adding Kits}.
|
||||||
|
|
||||||
@@ -134,14 +146,12 @@
|
|||||||
Through external libraries, \QC can support code completion and syntax
|
Through external libraries, \QC can support code completion and syntax
|
||||||
highlighting as if they were part of the current project or the Qt library.
|
highlighting as if they were part of the current project or the Qt library.
|
||||||
|
|
||||||
\QC detects the external libraries using the \c {FIND_PACKAGE()}
|
\QC detects the external libraries using the \c {find_package()}
|
||||||
macro. Some libraries come with the CMake installation. You can find those
|
macro. Some libraries come with the CMake installation. You can find those
|
||||||
in the \c {Modules} directory of your CMake installation.
|
in the \c {Modules} directory of your CMake installation.
|
||||||
|
For more information, see
|
||||||
\note If you provide your own libraries, you also need to provide your own
|
\l{https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html}
|
||||||
\c {FindXXX.cmake} file. For more information, see
|
{cmake-packages(7)}.
|
||||||
\l{https://gitlab.kitware.com/cmake/community/wikis/FAQ#writing-findxxxcmake-files}
|
|
||||||
{Writing FindXXX.cmake files}.
|
|
||||||
|
|
||||||
Syntax completion and highlighting work once your project successfully
|
Syntax completion and highlighting work once your project successfully
|
||||||
builds and links against the external library.
|
builds and links against the external library.
|
||||||
|
@@ -230,6 +230,101 @@
|
|||||||
|
|
||||||
We recommend using the LLDB version that is delivered with the latest Xcode.
|
We recommend using the LLDB version that is delivered with the latest Xcode.
|
||||||
|
|
||||||
|
\section1 Specifying Debugger Settings
|
||||||
|
|
||||||
|
To specify settings for managing debugger processes, select \uicontrol Tools
|
||||||
|
> \uicontrol Options > \uicontrol Debugger. In the \uicontrol General tab,
|
||||||
|
you can specify settings that are common to all debuggers.
|
||||||
|
|
||||||
|
\image qtcreator-debugger-general-options.png
|
||||||
|
|
||||||
|
\section2 Specifying GDB Settings
|
||||||
|
|
||||||
|
To specify settings for managing the GDB process, select \uicontrol Tools >
|
||||||
|
\uicontrol Options > \uicontrol Debugger > \uicontrol GDB.
|
||||||
|
|
||||||
|
\image qtcreator-gdb-options.png "GDB options"
|
||||||
|
|
||||||
|
To specify a timeout for terminating non-responsive GDB processes, set the
|
||||||
|
number of seconds to wait in the \uicontrol {GDB timeout} field. The default
|
||||||
|
value of 20 seconds should be sufficient for most applications, but if
|
||||||
|
loading big libraries or listing source files takes much longer than
|
||||||
|
that on slow machines, you should increase the value.
|
||||||
|
|
||||||
|
To compress several steps into one step for less noisy debugging when
|
||||||
|
stepping into code, select the \uicontrol {Skip known frames when stepping}
|
||||||
|
check box. For example, the atomic reference counting code is skipped, and
|
||||||
|
a single \e {Step Into} for a signal emission ends up directly in the slot
|
||||||
|
connected to it.
|
||||||
|
|
||||||
|
To display a message box as soon as your application receives a signal, such
|
||||||
|
as SIGSEGV, during debugging, select the \uicontrol {Show a message box when
|
||||||
|
receiving a signal} check box.
|
||||||
|
|
||||||
|
GDB allows setting breakpoints on source lines for which no code was
|
||||||
|
generated. In such situations, the breakpoint is shifted to the next
|
||||||
|
source code line for which the code was actually generated. To reflect
|
||||||
|
such temporary changes by moving the breakpoint markers in the source
|
||||||
|
code editor, select the \uicontrol {Adjust breakpoint locations} check box.
|
||||||
|
|
||||||
|
To specify whether the dynamic or the static type of objects will be
|
||||||
|
displayed, select the \uicontrol {Use dynamic object type for display}
|
||||||
|
check box. Keep in mind that choosing the dynamic type might be slower.
|
||||||
|
|
||||||
|
To allow reading the user's default .gdbinit file on debugger startup,
|
||||||
|
select the \uicontrol {Load .gdbinit file on startup} check box.
|
||||||
|
|
||||||
|
To use the default GDB pretty printers installed in your system
|
||||||
|
or linked to the libraries your application uses, select the
|
||||||
|
\uicontrol {Load system GDB pretty printers} check box.
|
||||||
|
|
||||||
|
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
||||||
|
select the \uicontrol {Use Intel style disassembly} check box.
|
||||||
|
|
||||||
|
To execute GDB commands after GDB has been started, but before the debugged
|
||||||
|
program is started or attached, and before the debugging helpers are
|
||||||
|
initialized, enter them in the \uicontrol {Additional Startup Commands}
|
||||||
|
field.
|
||||||
|
|
||||||
|
To execute GDB commands after GDB has successfully attached to remote
|
||||||
|
targets, enter them in the \uicontrol {Additional Attach Commands} field.
|
||||||
|
You can add commands to further set up the target here, such as
|
||||||
|
\c {monitor reset} or \c {load}.
|
||||||
|
|
||||||
|
To execute simple Python commands, prefix them with \c python. To execute
|
||||||
|
sequences of Python commands spanning multiple lines, prepend the block
|
||||||
|
with \c python on a separate line, and append \c end on a separate line.
|
||||||
|
To execute arbitrary Python scripts, use
|
||||||
|
\c {python execfile('/path/to/script.py')}.
|
||||||
|
|
||||||
|
\section2 Specifying Extended GDB Settings
|
||||||
|
|
||||||
|
To specify extended settings for GBD, select \uicontrol Tools >
|
||||||
|
\uicontrol Options > \uicontrol Debugger > \uicontrol {GDB Extended}.
|
||||||
|
The settings give access to advanced or experimental functions of GDB.
|
||||||
|
Enabling them may negatively impact your debugging experience, so use
|
||||||
|
them with care.
|
||||||
|
|
||||||
|
\image qtcreator-gdb-extended-options.png "GDB Extended options"
|
||||||
|
|
||||||
|
To use asynchronous mode to control the inferior, select the
|
||||||
|
respective check box.
|
||||||
|
|
||||||
|
To add common paths to locations of debug information, such as
|
||||||
|
\c {/usr/src/debug}, when starting GDB, select the
|
||||||
|
\uicontrol {Use common locations for debug information} check box.
|
||||||
|
|
||||||
|
To stop when \c qWarning, \c qFatal, or \c abort is called, select the
|
||||||
|
respective check box.
|
||||||
|
|
||||||
|
To enable stepping backwards, select the \uicontrol {Enable reverse
|
||||||
|
debugging} check box. This feature is very slow and unstable on the
|
||||||
|
GDB side. It exhibits unpredictable behavior when going backwards over
|
||||||
|
system calls and is very likely to destroy your debugging session.
|
||||||
|
|
||||||
|
To keep debugging all children after a fork, select the
|
||||||
|
\uicontrol {Debug all child processes} check box.
|
||||||
|
|
||||||
\section1 Mapping Source Paths
|
\section1 Mapping Source Paths
|
||||||
|
|
||||||
To enable the debugger to step into the code and display the source code
|
To enable the debugger to step into the code and display the source code
|
||||||
|
@@ -204,6 +204,8 @@
|
|||||||
applications.
|
applications.
|
||||||
\li Select the \uicontrol {Break at "main"} check box to stop the
|
\li Select the \uicontrol {Break at "main"} check box to stop the
|
||||||
debugger at the main function.
|
debugger at the main function.
|
||||||
|
\li In the \uicontrol {Override SysRoot} field, specify the path to
|
||||||
|
the \c sysroot to use instead of the default \c sysroot.
|
||||||
\li In the \uicontrol {Debug information} field, specify the location
|
\li In the \uicontrol {Debug information} field, specify the location
|
||||||
for storing debug information. You cannot use an empty path.
|
for storing debug information. You cannot use an empty path.
|
||||||
\li In the \uicontrol Recent field, you can select a recent
|
\li In the \uicontrol Recent field, you can select a recent
|
||||||
@@ -295,6 +297,8 @@
|
|||||||
executable.
|
executable.
|
||||||
\li In the \uicontrol {Override start script} field, specify a
|
\li In the \uicontrol {Override start script} field, specify a
|
||||||
script file to run instead of the default start script.
|
script file to run instead of the default start script.
|
||||||
|
\li In the \uicontrol {Override SysRoot} field, specify the path to
|
||||||
|
the \c sysroot to use instead of the default \c sysroot.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
Also in this mode, using a properly configured project containing the
|
Also in this mode, using a properly configured project containing the
|
||||||
@@ -378,6 +382,8 @@
|
|||||||
debugger at the main function.
|
debugger at the main function.
|
||||||
\li In the \uicontrol {Server start script} field, specify a
|
\li In the \uicontrol {Server start script} field, specify a
|
||||||
script file to run when the server starts.
|
script file to run when the server starts.
|
||||||
|
\li In the \uicontrol {Override SysRoot} field, specify the path to
|
||||||
|
the \c sysroot to use instead of the default \c sysroot.
|
||||||
\li In the \uicontrol {Init commands} field, enter the commands
|
\li In the \uicontrol {Init commands} field, enter the commands
|
||||||
to execute immediately after the connection to a target has
|
to execute immediately after the connection to a target has
|
||||||
been established.
|
been established.
|
||||||
@@ -393,93 +399,6 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section3 Specifying GDB Settings
|
|
||||||
|
|
||||||
To specify settings for managing the GDB process, select \uicontrol Tools >
|
|
||||||
\uicontrol Options > \uicontrol Debugger > \uicontrol GDB.
|
|
||||||
|
|
||||||
\image qtcreator-gdb-options.png "GDB options"
|
|
||||||
|
|
||||||
To specify a timeout for terminating non-responsive GDB processes, set the
|
|
||||||
number of seconds to wait in the \uicontrol {GDB timeout} field. The default
|
|
||||||
value of 20 seconds should be sufficient for most applications, but if
|
|
||||||
loading big libraries or listing source files takes much longer than
|
|
||||||
that on slow machines, you should increase the value.
|
|
||||||
|
|
||||||
To compress several steps into one step for less noisy debugging when
|
|
||||||
stepping into code, select the \uicontrol {Skip known frames when stepping}
|
|
||||||
check box. For example, the atomic reference counting code is skipped, and
|
|
||||||
a single \e {Step Into} for a signal emission ends up directly in the slot
|
|
||||||
connected to it.
|
|
||||||
|
|
||||||
To display a message box as soon as your application receives a signal, such
|
|
||||||
as SIGSEGV, during debugging, select the \uicontrol {Show a message box when
|
|
||||||
receiving a signal} check box.
|
|
||||||
|
|
||||||
GDB allows setting breakpoints on source lines for which no code was
|
|
||||||
generated. In such situations, the breakpoint is shifted to the next
|
|
||||||
source code line for which the code was actually generated. To reflect
|
|
||||||
such temporary changes by moving the breakpoint markers in the source
|
|
||||||
code editor, select the \uicontrol {Adjust breakpoint locations} check box.
|
|
||||||
|
|
||||||
To specify whether the dynamic or the static type of objects will be
|
|
||||||
displayed, select the \uicontrol {Use dynamic object type for display}
|
|
||||||
check box. Keep in mind that choosing the dynamic type might be slower.
|
|
||||||
|
|
||||||
To allow reading the user's default .gdbinit file on debugger startup,
|
|
||||||
select the \uicontrol {Load .gdbinit file on startup} check box.
|
|
||||||
|
|
||||||
To use the default GDB pretty printers installed in your system
|
|
||||||
or linked to the libraries your application uses, select the
|
|
||||||
\uicontrol {Load system GDB pretty printers} check box.
|
|
||||||
|
|
||||||
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
|
||||||
select the \uicontrol {Use Intel style disassembly} check box.
|
|
||||||
|
|
||||||
To execute GDB commands after GDB has been started, but before the debugged
|
|
||||||
program is started or attached, and before the debugging helpers are
|
|
||||||
initialized, enter them in the \uicontrol {Additional Startup Commands}
|
|
||||||
field.
|
|
||||||
|
|
||||||
To execute GDB commands after GDB has successfully attached to remote
|
|
||||||
targets, enter them in the \uicontrol {Additional Attach Commands} field.
|
|
||||||
You can add commands to further set up the target here, such as
|
|
||||||
\c {monitor reset} or \c {load}.
|
|
||||||
|
|
||||||
To execute simple Python commands, prefix them with \c python. To execute
|
|
||||||
sequences of Python commands spanning multiple lines, prepend the block
|
|
||||||
with \c python on a separate line, and append \c end on a separate line.
|
|
||||||
To execute arbitrary Python scripts, use
|
|
||||||
\c {python execfile('/path/to/script.py')}.
|
|
||||||
|
|
||||||
\section3 Specifying Extended GDB Settings
|
|
||||||
|
|
||||||
To specify extended settings for GBD, select \uicontrol Tools >
|
|
||||||
\uicontrol Options > \uicontrol Debugger > \uicontrol {GDB Extended}.
|
|
||||||
The settings give access to advanced or experimental functions of GDB.
|
|
||||||
Enabling them may negatively impact your debugging experience, so use
|
|
||||||
them with care.
|
|
||||||
|
|
||||||
\image qtcreator-gdb-extended-options.png "GDB Extended options"
|
|
||||||
|
|
||||||
To use asynchronous mode to control the inferior, select the
|
|
||||||
respective check box.
|
|
||||||
|
|
||||||
To add common paths to locations of debug information, such as
|
|
||||||
\c {/usr/src/debug}, when starting GDB, select the
|
|
||||||
\uicontrol {Use common locations for debug information} check box.
|
|
||||||
|
|
||||||
To stop when \c qWarning, \c qFatal, or \c abort is called, select the
|
|
||||||
respective check box.
|
|
||||||
|
|
||||||
To enable stepping backwards, select the \uicontrol {Enable reverse
|
|
||||||
debugging} check box. This feature is very slow and unstable on the
|
|
||||||
GDB side. It exhibits unpredictable behavior when going backwards over
|
|
||||||
system calls and is very likely to destroy your debugging session.
|
|
||||||
|
|
||||||
To keep debugging all children after a fork, select the
|
|
||||||
\uicontrol {Debug all child processes} check box.
|
|
||||||
|
|
||||||
\section3 Using CDB
|
\section3 Using CDB
|
||||||
|
|
||||||
In remote mode, the local CDB process talks to a CDB process that runs on
|
In remote mode, the local CDB process talks to a CDB process that runs on
|
||||||
|
@@ -122,8 +122,9 @@
|
|||||||
|
|
||||||
\QC automatically runs CMake when you make changes to \c {CMakeLists.txt}
|
\QC automatically runs CMake when you make changes to \c {CMakeLists.txt}
|
||||||
files. To disable this feature, select \uicontrol Tools >
|
files. To disable this feature, select \uicontrol Tools >
|
||||||
\uicontrol Options > \uicontrol Kits > \uicontrol CMake >
|
\uicontrol Options > \uicontrol Kits > \uicontrol CMake. Select the CMake
|
||||||
\uicontrol {Autorun CMake}.
|
executable to edit, and then deselect the \uicontrol {Autorun CMake} check
|
||||||
|
box.
|
||||||
|
|
||||||
For more information, see \l {Setting Up CMake}.
|
For more information, see \l {Setting Up CMake}.
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -42,15 +42,25 @@
|
|||||||
debug symbols that you need for debugging the application but that you
|
debug symbols that you need for debugging the application but that you
|
||||||
can leave out from the release version. Generally, you use the debug
|
can leave out from the release version. Generally, you use the debug
|
||||||
configuration for testing and the release configuration for creating
|
configuration for testing and the release configuration for creating
|
||||||
the final installation file. A profile configuration is an optimized release
|
the final installation file.
|
||||||
build that is delivered with separate debug information. It is best suited
|
|
||||||
for analyzing applications.
|
If you selected CMake as the build system for the project, you can
|
||||||
|
use a \e {minimum size release} build configuration to create the
|
||||||
|
final installation file. It is a release build that makes the size
|
||||||
|
of the binary package as small as possible, even if this makes the
|
||||||
|
application slower.
|
||||||
|
|
||||||
|
A profile build (which is called \e {release with debug information}
|
||||||
|
when using CMake) is an optimized release build that is delivered
|
||||||
|
with separate debug information. It is best suited for analyzing
|
||||||
|
applications.
|
||||||
|
|
||||||
\section1 Managing Build Configurations
|
\section1 Managing Build Configurations
|
||||||
|
|
||||||
You specify build settings in the \uicontrol Projects mode.
|
You specify build settings in the \uicontrol Projects mode.
|
||||||
To add a new build configuration, click \uicontrol Add and select the type of
|
To add a new build configuration, click \uicontrol Add and select the type of
|
||||||
configuration you would like to add. You can add as many build
|
configuration you would like to add. The options you have depend on the
|
||||||
|
build system that you selected for the project. You can add as many build
|
||||||
configurations as you need. You can also select \uicontrol Clone to
|
configurations as you need. You can also select \uicontrol Clone to
|
||||||
add a build configuration that is based on the currently selected one.
|
add a build configuration that is based on the currently selected one.
|
||||||
|
|
||||||
@@ -67,6 +77,21 @@
|
|||||||
The available build settings depend on the build system that you selected
|
The available build settings depend on the build system that you selected
|
||||||
for the project.
|
for the project.
|
||||||
|
|
||||||
|
\section2 Compiling QML
|
||||||
|
|
||||||
|
Since Qt 5.11, you can compile QML source code into the final binary. This
|
||||||
|
improves the startup time of the application and eliminates the need to
|
||||||
|
deploy QML files together with the application. For more information, see
|
||||||
|
\l{Ahead-of-Time Compilation}.
|
||||||
|
|
||||||
|
\QC project wizard templates create Qt Quick projects that can be compiled,
|
||||||
|
because they are set up to use the Qt Resource System. To compile Qt Quick
|
||||||
|
code, select \uicontrol Enable in the \uicontrol {Qt Quick Compiler}
|
||||||
|
field. To use default settings, select \uicontrol {Leave at Default}.
|
||||||
|
|
||||||
|
\note In earlier Qt versions, this was a commercial feature. For more
|
||||||
|
information, see \l{http://doc.qt.io/QtQuickCompiler/}{Qt Quick Compiler}.
|
||||||
|
|
||||||
\section2 qmake Build Configuration
|
\section2 qmake Build Configuration
|
||||||
|
|
||||||
\image qtcreator-projectpane.png "qmake general build settings pane"
|
\image qtcreator-projectpane.png "qmake general build settings pane"
|
||||||
@@ -97,21 +122,6 @@
|
|||||||
> \uicontrol Options > \uicontrol {Build & Run} >
|
> \uicontrol Options > \uicontrol {Build & Run} >
|
||||||
\uicontrol {Default Build Properties}.
|
\uicontrol {Default Build Properties}.
|
||||||
|
|
||||||
\section3 Compiling QML
|
|
||||||
|
|
||||||
Since Qt 5.11, you can compile QML source code into the final binary. This
|
|
||||||
improves the startup time of the application and eliminates the need to
|
|
||||||
deploy QML files together with the application. For more information, see
|
|
||||||
\l{Ahead-of-Time Compilation}.
|
|
||||||
|
|
||||||
\QC new project wizards create Qt Quick projects that can be compiled,
|
|
||||||
because they are set up to use the Qt Resource System. To compile Qt Quick
|
|
||||||
code, select \uicontrol Enable in the \uicontrol {Qt Quick Compiler}
|
|
||||||
field. To use default settings, select \uicontrol {Leave at Default}.
|
|
||||||
|
|
||||||
\note In earlier Qt versions, this was a commercial feature. For more
|
|
||||||
information, see \l{http://doc.qt.io/QtQuickCompiler/}{Qt Quick Compiler}.
|
|
||||||
|
|
||||||
\include creator-projects-cmake-building.qdocinc cmake build configuration
|
\include creator-projects-cmake-building.qdocinc cmake build configuration
|
||||||
\include creator-projects-meson-building.qdocinc meson build configuration
|
\include creator-projects-meson-building.qdocinc meson build configuration
|
||||||
|
|
||||||
@@ -130,9 +140,11 @@
|
|||||||
apply.
|
apply.
|
||||||
|
|
||||||
You can specify command-line arguments in the arguments fields:
|
You can specify command-line arguments in the arguments fields:
|
||||||
\uicontrol {Additional arguments}, \uicontrol {Command arguments},
|
\uicontrol Arguments, \uicontrol {Additional arguments},
|
||||||
\uicontrol {Make arguments}, \uicontrol Arguments, \uicontrol {Default Arguments},
|
\uicontrol {CMake arguments}, \uicontrol {Command arguments},
|
||||||
or \uicontrol {Extra arguments}. You can create shell command lines
|
\uicontrol {Default arguments}, \uicontrol {Extra arguments},
|
||||||
|
\uicontrol {Make arguments}, or \uicontrol {Tool arguments}.
|
||||||
|
You can create shell command lines
|
||||||
that can contain redirection and other advanced constructs. However, some
|
that can contain redirection and other advanced constructs. However, some
|
||||||
more complex use cases, such as piping test data into the application being
|
more complex use cases, such as piping test data into the application being
|
||||||
tested or grouping commands, are not supported because the value of the
|
tested or grouping commands, are not supported because the value of the
|
||||||
|
@@ -162,9 +162,9 @@
|
|||||||
\uicontrol Change to add settings to Qbs build profiles. For more
|
\uicontrol Change to add settings to Qbs build profiles. For more
|
||||||
information, see \l {Editing Qbs Profiles}.
|
information, see \l {Editing Qbs Profiles}.
|
||||||
|
|
||||||
\li In the \uicontrol {CMake Tool} field, select the CMake tool to use
|
\li In the \uicontrol {CMake Tool} field, select the CMake executable
|
||||||
for building the project. Select \uicontrol Manage to add installed
|
to use for building the project. Select \uicontrol Manage to add
|
||||||
CMake tools to the list. For more information, see
|
installed CMake executables to the list. For more information, see
|
||||||
\l{Adding CMake Tools}.
|
\l{Adding CMake Tools}.
|
||||||
|
|
||||||
\li In the \uicontrol {CMake generator} field, select \uicontrol Change
|
\li In the \uicontrol {CMake generator} field, select \uicontrol Change
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
warning if you select a generator that is not supported.
|
warning if you select a generator that is not supported.
|
||||||
|
|
||||||
\li In the \uicontrol {CMake configuration} field, select
|
\li In the \uicontrol {CMake configuration} field, select
|
||||||
\uicontrol Change to edit the variables of the CMake configuration
|
\uicontrol Change to edit the parameters of the CMake configuration
|
||||||
for the kit.
|
for the kit.
|
||||||
|
|
||||||
\li In the \uicontrol {Meson tool} field, select the Meson tool to use
|
\li In the \uicontrol {Meson tool} field, select the Meson tool to use
|
||||||
|
@@ -52,12 +52,8 @@
|
|||||||
set up the development environment for the device platform and configure a
|
set up the development environment for the device platform and configure a
|
||||||
connection between \QC and the mobile device.
|
connection between \QC and the mobile device.
|
||||||
|
|
||||||
To develop for Android devices, you must download and install the latest
|
To develop for Android devices, you must install \l{Qt for Android}
|
||||||
Android NDK and SDK Tools, and then update or install the tools and packages
|
and set up the development environment, as instructed in
|
||||||
needed for development. In addition, you must install the Java SE
|
|
||||||
Development Kit (JDK). After you have installed all
|
|
||||||
these tools, you must specify the paths to them in \QC.
|
|
||||||
For detailed instructions, see \l{Qt for Android} and
|
|
||||||
\l{Connecting Android Devices}.
|
\l{Connecting Android Devices}.
|
||||||
|
|
||||||
To develop for iOS devices, you must install Xcode and use it to configure
|
To develop for iOS devices, you must install Xcode and use it to configure
|
||||||
@@ -65,33 +61,32 @@
|
|||||||
Program certificate that you receive from Apple. For more information, see
|
Program certificate that you receive from Apple. For more information, see
|
||||||
\l{Connecting iOS Devices}.
|
\l{Connecting iOS Devices}.
|
||||||
|
|
||||||
\include creator-tutorial-create-qq-project.qdocinc qt quick application
|
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application
|
||||||
|
|
||||||
\section1 Creating the Accelbubble Main View
|
\section1 Creating the Accelbubble Main View
|
||||||
|
|
||||||
The main view of the application displays an SVG bubble image that moves
|
The main view of the application displays an SVG bubble image that moves
|
||||||
around the screen when you tilt the device.
|
around the screen when you tilt the device.
|
||||||
|
|
||||||
To use \e {Bluebubble.svg} in your project,
|
We use \e {Bluebubble.svg} in this tutorial, but you can use any other
|
||||||
copy it to the project directory (same subdirectory as the QML file).
|
|
||||||
The image appears in \uicontrol Assets. You can also use any other
|
|
||||||
image or a QML type, instead.
|
image or a QML type, instead.
|
||||||
|
|
||||||
To create the UI in the Design mode:
|
To create the UI in the Design mode:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li In the \uicontrol Projects view, double-click the \e Page1Form.ui.qml
|
\li Open the \e main.qml in the Design mode.
|
||||||
file to open it in the Design mode.
|
|
||||||
|
|
||||||
\li In the \uicontrol Navigator, select \uicontrol Label and press
|
\li In the \uicontrol Navigator, select \uicontrol Label and press
|
||||||
\key Delete to delete it.
|
\key Delete to delete it.
|
||||||
|
|
||||||
\li In \uicontrol Library > \uicontrol {QML Types}, select
|
\li In \uicontrol Library > \uicontrol {QML Types}, select
|
||||||
\uicontrol Rectangle and drag and drop it to the \uicontrol Page in
|
\uicontrol Rectangle and drag and drop it to \e Window
|
||||||
the navigator.
|
in \uicontrol Navigator.
|
||||||
|
|
||||||
\li Select the rectangle in the navigator to edit its properties:
|
\li Select the rectangle in \uicontrol Navigator to edit its properties:
|
||||||
|
|
||||||
|
\image qtquick-mobile-app-tutorial-main-view.png "Rectangle in different views"
|
||||||
|
|
||||||
\list a
|
\list a
|
||||||
|
|
||||||
@@ -105,14 +100,19 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\li In \uicontrol Library > \uicontrol Assets, select Bluebubble.svg
|
\li Select \uicontrol Library > \uicontrol Assets >
|
||||||
and drag and drop it to \e mainWindow in the navigator.
|
\uicontrol {Add New Assets} to locate Bluebubble.svg
|
||||||
|
(or your own image) and add it to the project folder.
|
||||||
|
\li Drag and drop the image from \uicontrol Assets to
|
||||||
|
\e mainWindow in \uicontrol Navigator.
|
||||||
|
|
||||||
\li In the \uicontrol Properties view, \uicontrol Id field, enter
|
\li In the \uicontrol Properties view, \uicontrol Id field, enter
|
||||||
\e bubble to be able to reference the image from other places.
|
\e bubble to be able to reference the image from other places.
|
||||||
|
|
||||||
|
\image qtquick-mobile-app-tutorial-image.png "Image file in different views"
|
||||||
|
|
||||||
\li Select the \inlineimage export_unchecked.png
|
\li Select the \inlineimage export_unchecked.png
|
||||||
(\uicontrol Export) button in the navigator to export the
|
(\uicontrol Export) button in \uicontrol Navigator to export
|
||||||
\e mainWindow and \e bubble as properties.
|
\e mainWindow and \e bubble as properties.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
@@ -130,62 +130,80 @@
|
|||||||
|
|
||||||
\li In the \uicontrol {Component name} field, enter \e Bubble.
|
\li In the \uicontrol {Component name} field, enter \e Bubble.
|
||||||
|
|
||||||
\li Deselect the \uicontrol x, \uicontrol y, and
|
\li Deselect the \uicontrol x and \uicontrol y check boxes,
|
||||||
\uicontrol {ui.qml file} check boxes.
|
because we want to use the accelerometer to determine
|
||||||
|
the location of the bubble on the screen.
|
||||||
|
|
||||||
\li Select \uicontrol OK to create \e Bubble.qml.
|
\li Select \uicontrol OK to create \e Bubble.qml.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\QC creates a reference to the Bubble type in \e Page1Form.ui.qml.
|
\QC creates a reference to the Bubble type in \e main.qml.
|
||||||
|
|
||||||
To check your code, you can compare your \e Page1Form.ui.qml and
|
To check your code, you can compare your \e main.qml and
|
||||||
\e {Bubble.qml} with the corresponding example files.
|
\e {Bubble.qml} with the corresponding example files.
|
||||||
|
|
||||||
The UI is now ready and you can switch to editing the \e Bubble.qml and
|
The UI is now ready and you can add the necessary properties for
|
||||||
\e main.qml files in the \uicontrol {Text Editor}, as described in the
|
making the bubble move.
|
||||||
following section.
|
|
||||||
|
|
||||||
\section1 Moving the Bubble
|
\section1 Moving the Bubble
|
||||||
|
|
||||||
In the \uicontrol {Text Editor}, edit \e Bubble.qml to add properties that we
|
We add custom properties to position the image in respect to the width
|
||||||
will use to position the image:
|
and height of the main window.
|
||||||
|
|
||||||
\quotefromfile accelbubble/Bubble.qml
|
\list 1
|
||||||
\skipto Image
|
\li Open \e Bubble.qml in Design mode.
|
||||||
\printuntil }
|
\li In \uicontrol {Connections View}, \uicontrol Properties tab,
|
||||||
|
select click the \inlineimage plus.png
|
||||||
|
button to add a custom property for the Bubble type.
|
||||||
|
\image qtquick-mobile-app-tutorial-custom-properties.png "Connection View Properties tab"
|
||||||
|
\li Double-click the value in the \uicontrol Property column, and enter
|
||||||
|
\e centerY as the name of the property.
|
||||||
|
\li Double-click the value in the \uicontrol {Property Type} column,
|
||||||
|
and select \e real as the type of the property. You will specify
|
||||||
|
the property value later in \uicontrol Properties.
|
||||||
|
\li Add two more properties of the same type with the names \e centerY
|
||||||
|
and \e bubbleCenter.
|
||||||
|
\li Open \e main.qml in Design mode.
|
||||||
|
\li Select \e bubble in \uicontrol Navigator to specify values for the
|
||||||
|
custom properties in \uicontrol Properties.
|
||||||
|
\li In the \uicontrol X field, select \inlineimage icons/action-icon.png
|
||||||
|
, and then select \uicontrol {Set Binding} to open
|
||||||
|
\uicontrol {Binding Editor}.
|
||||||
|
\image qtquick-mobile-app-tutorial-binding-editor1.png "Setting binding for X in Binding Editor"
|
||||||
|
\li Enter the following value to center the bubble horizontally in the
|
||||||
|
main window when the application starts:
|
||||||
|
\c{bubble.centerX - bubbleCenter}.
|
||||||
|
\li Select \uicontrol OK to close the binding editor and save the
|
||||||
|
binding.
|
||||||
|
\li In the \uicontrol X field, set the following binding to center the
|
||||||
|
bubble vertically: \c{bubble.centerY - bubbleCenter}.
|
||||||
|
\li In the \uicontrol centerY field, enter the following value to bind
|
||||||
|
the y coordinate of the bubble center to half the height of the main
|
||||||
|
window: \c {mainWindow.height /2}.
|
||||||
|
\image qtquick-mobile-app-tutorial-binding-editor.png "Setting binding for centerX"
|
||||||
|
\li In the \uicontrol centerX field, bind the x coordinate of
|
||||||
|
the bubble center to half the width of the main window:
|
||||||
|
\c {mainWindow.width /2}.
|
||||||
|
\li In the \uicontrol bubbleCenter field, bind the center of
|
||||||
|
the bubble to half of its width: \c {bubble.width /2}.
|
||||||
|
\endlist
|
||||||
|
|
||||||
In the \uicontrol {Text Editor}, edit \e main.qml to specify the application
|
We now want to add code to move the bubble based on Accelerometer sensor
|
||||||
title, as illustrated by the following code snippet:
|
values. This is not supported by \uicontrol {Form Editor}, so we will do
|
||||||
|
it in \uicontrol {Text Editor}:
|
||||||
\quotefromfile accelbubble/main.qml
|
|
||||||
\skipto ApplicationWindow
|
|
||||||
\printuntil title
|
|
||||||
|
|
||||||
Specify bubble properties to position the image:
|
|
||||||
|
|
||||||
\printuntil bubbleCenter
|
|
||||||
|
|
||||||
Then set the x and y position of the image based on the new properties:
|
|
||||||
|
|
||||||
\printuntil centerY
|
|
||||||
\skipto /^\}/
|
|
||||||
\printuntil }
|
|
||||||
|
|
||||||
Then add code to move the bubble based on Accelerometer sensor values:
|
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Add the following import statement to \e main.qml:
|
\li Add the following import statement to \e main.qml:
|
||||||
|
|
||||||
\code
|
\quotefromfile accelbubble/main.qml
|
||||||
import QtSensors 5.9
|
\skipto QtSensors
|
||||||
\endcode
|
\printline QtSensors
|
||||||
|
|
||||||
\li Add the \l{Accelerometer} type with the necessary properties:
|
\li Add the \l{Accelerometer} type with the necessary properties:
|
||||||
|
|
||||||
\quotefromfile accelbubble/main.qml
|
|
||||||
\skipto Accelerometer
|
\skipto Accelerometer
|
||||||
\printuntil true
|
\printuntil radians_to_degrees
|
||||||
\skipto }
|
\skipto }
|
||||||
\printuntil }
|
\printuntil }
|
||||||
|
|
||||||
@@ -195,7 +213,7 @@
|
|||||||
|
|
||||||
\quotefromfile accelbubble/main.qml
|
\quotefromfile accelbubble/main.qml
|
||||||
\skipto function
|
\skipto function
|
||||||
\printuntil Math.atan(x
|
\printuntil Math.atan2(x
|
||||||
\printuntil }
|
\printuntil }
|
||||||
|
|
||||||
\li Add the following JavaScript code for \c onReadingChanged signal of
|
\li Add the following JavaScript code for \c onReadingChanged signal of
|
||||||
@@ -206,10 +224,11 @@
|
|||||||
\skipto onReadingChanged
|
\skipto onReadingChanged
|
||||||
\printuntil }
|
\printuntil }
|
||||||
|
|
||||||
We want to ensure that the position of the bubble is always within
|
We want to ensure that the position of the bubble is always
|
||||||
the bounds of the screen. If the Accelerometer returns not a number
|
within the bounds of the screen. If the Accelerometer returns
|
||||||
(NaN), the value is ignored and the bubble position is not updated.
|
\e {not a number} (NaN), the value is ignored and the bubble
|
||||||
\li Add SmoothedAnimation behavior on the \c x and \c y properties of
|
position is not updated.
|
||||||
|
\li Add \l SmoothedAnimation behavior on the \c x and \c y properties of
|
||||||
the bubble to make its movement look smoother.
|
the bubble to make its movement look smoother.
|
||||||
|
|
||||||
\quotefromfile accelbubble/main.qml
|
\quotefromfile accelbubble/main.qml
|
||||||
@@ -256,20 +275,6 @@
|
|||||||
After adding the dependencies, select \uicontrol Build > \uicontrol {Run qmake} to apply
|
After adding the dependencies, select \uicontrol Build > \uicontrol {Run qmake} to apply
|
||||||
the changes to the Makefile of the project.
|
the changes to the Makefile of the project.
|
||||||
|
|
||||||
\section1 Adding Assets
|
|
||||||
|
|
||||||
You need to add the Bluebubble.svg image file to the application assets
|
|
||||||
for deployment to mobile devices:
|
|
||||||
|
|
||||||
\list 1
|
|
||||||
|
|
||||||
\li In the \uicontrol Projects view, double-click the qml.qrc file to open it
|
|
||||||
in the assets editor.
|
|
||||||
|
|
||||||
\li Select \uicontrol Add to add Bluebubble.svg.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\section1 Running the Application
|
\section1 Running the Application
|
||||||
|
|
||||||
The application is complete and ready to be deployed to a device:
|
The application is complete and ready to be deployed to a device:
|
||||||
|
@@ -1,89 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2020 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the Qt Creator documentation.
|
|
||||||
**
|
|
||||||
** 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 Free Documentation License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Free
|
|
||||||
** Documentation License version 1.3 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file included in the packaging of
|
|
||||||
** this file. Please review the following information to ensure
|
|
||||||
** the GNU Free Documentation License version 1.3 requirements
|
|
||||||
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
//! [qt quick application]
|
|
||||||
|
|
||||||
\section1 Creating the Project
|
|
||||||
|
|
||||||
\list 1
|
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
|
||||||
\uicontrol {Application (Qt Quick)} >
|
|
||||||
\uicontrol {Qt Quick Application - Swipe}.
|
|
||||||
|
|
||||||
\li Select \uicontrol Choose to open the
|
|
||||||
\uicontrol {Project Location} dialog.
|
|
||||||
|
|
||||||
\li In the \uicontrol Name field, enter a name for the application.
|
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project
|
|
||||||
files.
|
|
||||||
|
|
||||||
\li Select \uicontrol Next (or \uicontrol Continue on \macos) to open
|
|
||||||
the \uicontrol {Define Build System} dialog.
|
|
||||||
|
|
||||||
\li In the \uicontrol {Build system} field, select the build system to
|
|
||||||
use for building and running the project: \l qmake,
|
|
||||||
\l {Setting Up CMake}{CMake}, or \l {Setting Up Qbs}{Qbs}.
|
|
||||||
|
|
||||||
\li Select \uicontrol Next to open the
|
|
||||||
\uicontrol {Define Project Details} dialog.
|
|
||||||
|
|
||||||
\li Select \uicontrol Next to use the default settings and to open
|
|
||||||
the \uicontrol {Translation File} dialog.
|
|
||||||
|
|
||||||
\li Select \uicontrol Next to use the default settings and to open
|
|
||||||
the \uicontrol {Kit Selection} dialog.
|
|
||||||
|
|
||||||
\li Select \l{glossary-buildandrun-kit}{kits} for the platforms that
|
|
||||||
you want to build the application for. To build applications for
|
|
||||||
mobile devices, select kits for Android ARM and iPhone OS.
|
|
||||||
|
|
||||||
\note Kits are listed if they have been specified in \uicontrol
|
|
||||||
Tools > \uicontrol Options > \uicontrol Kits (on Windows and Linux)
|
|
||||||
or in \uicontrol {\QC} > \uicontrol Preferences >
|
|
||||||
\uicontrol Kits (on \macos).
|
|
||||||
For more information, see \l {Adding Kits}.
|
|
||||||
|
|
||||||
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
|
||||||
dialog.
|
|
||||||
|
|
||||||
\li Review the project settings, and select \uicontrol{Finish}
|
|
||||||
(or \uicontrol Done on \macos) to create the project.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\QC generates two UI files, \e Page1Form.ui.qml and \e Page2Form.ui.qml,
|
|
||||||
and a QML file, \e main.qml. You can modify \e Page1Form.ui.qml in the
|
|
||||||
\uicontrol {Form Editor} to create the application main view and \e main.qml
|
|
||||||
in the \uicontrol {Text Editor} to add the application logic. For the
|
|
||||||
purposes of this example, you can ignore \e Page2Form.ui.qml.
|
|
||||||
|
|
||||||
For more information about the settings that you skipped, see
|
|
||||||
\l{Creating Qt Quick Applications}.
|
|
||||||
|
|
||||||
//! [qt quick application]
|
|
||||||
*/
|
|
@@ -573,6 +573,10 @@
|
|||||||
application, select \uicontrol Tools > \uicontrol Git
|
application, select \uicontrol Tools > \uicontrol Git
|
||||||
> \uicontrol {Git Tools} > \uicontrol {Repository Browser}.
|
> \uicontrol {Git Tools} > \uicontrol {Repository Browser}.
|
||||||
|
|
||||||
|
To start \c {git bash}, select \uicontrol Tools > \uicontrol Git >
|
||||||
|
\uicontrol {Git Tools} > \uicontrol {Git Bash}.
|
||||||
|
|
||||||
To resolve merge conflicts, select \uicontrol Tools > \uicontrol Git >
|
To resolve merge conflicts, select \uicontrol Tools > \uicontrol Git >
|
||||||
\uicontrol {Git Tools} > \uicontrol {Merge Tool}.
|
\uicontrol {Git Tools} > \uicontrol {Merge Tool}. This menu item is
|
||||||
|
visible only when you have merge conflicts to resolve.
|
||||||
*/
|
*/
|
||||||
|
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB |
@@ -30,27 +30,27 @@
|
|||||||
\nextpage {Log In UI - Part 2}
|
\nextpage {Log In UI - Part 2}
|
||||||
|
|
||||||
\title Log In UI - Part 1
|
\title Log In UI - Part 1
|
||||||
\brief Illustrates how to use wizards to create a simple UI that contains a
|
\brief Illustrates how to use wizard templates to create a simple UI that
|
||||||
text label, push buttons, and a logo.
|
contains a text label, push buttons, and a logo.
|
||||||
|
|
||||||
\image loginui1.png
|
\image loginui1.png
|
||||||
|
|
||||||
\e{Log In UI - Part 1} is the first in a series of examples that build on
|
\e{Log In UI - Part 1} is the first in a series of examples that build on
|
||||||
each other to illustrate how to use \QDS to create a simple UI with some
|
each other to illustrate how to use \QDS to create a simple UI with some
|
||||||
basic UI components, such as pages, buttons, and fields. Part 1 describes
|
basic UI components, such as pages, buttons, and fields. Part 1 describes
|
||||||
how to use \QDS wizards to create a Qt Quick project and a button UI
|
how to use \QDS wizard templates to create a Qt Quick project and a button
|
||||||
control, and how to modify the files generated by the wizards to design
|
UI control, and how to modify the files generated by the wizard templates
|
||||||
your own UI.
|
to design your own UI.
|
||||||
|
|
||||||
The \e {Learn Qt Quick} sections provide additional information about the
|
The \e {Learn Qt Quick} sections provide additional information about the
|
||||||
tasks performed by the wizards and about the basics of QML and Qt Quick.
|
tasks performed by the wizards and about the basics of QML and Qt Quick.
|
||||||
|
|
||||||
\section1 Creating the UI Project
|
\section1 Creating the UI Project
|
||||||
|
|
||||||
For the purposes of this example, you will use the simplest wizard offered.
|
For the purposes of this example, you will use the empty wizard template.
|
||||||
Wizards are available also for creating UIs that are optimized for mobile
|
Wizard templates are available also for creating UIs that are optimized for
|
||||||
platforms and for launcher applications. For more information about the
|
mobile platforms and for launcher applications. For more information about
|
||||||
options you have, see \l {Creating Projects}.
|
the options you have, see \l {Creating Projects}.
|
||||||
|
|
||||||
To create a project:
|
To create a project:
|
||||||
|
|
||||||
@@ -128,8 +128,8 @@
|
|||||||
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
(\uicontrol {Show Live Preview}) button on the \uicontrol {Form Editor}
|
||||||
view toolbar or press \key {Alt+P}.
|
view toolbar or press \key {Alt+P}.
|
||||||
|
|
||||||
The \e Screen01.ui.qml file that the wizard created for you should be
|
The \e Screen01.ui.qml file that the wizard template created for you should
|
||||||
open in the Design mode. If it is not, you can double-click it in the
|
be open in the Design mode. If it is not, you can double-click it in the
|
||||||
\uicontrol Projects view to open it.
|
\uicontrol Projects view to open it.
|
||||||
|
|
||||||
\note The visibility of views depends on the selected workspace. To open
|
\note The visibility of views depends on the selected workspace. To open
|
||||||
@@ -177,8 +177,8 @@
|
|||||||
animating visual components, receiving user input, and creating data models
|
animating visual components, receiving user input, and creating data models
|
||||||
and views.
|
and views.
|
||||||
|
|
||||||
To be able to use the functionality of Qt Quick types, the wizard adds the
|
To be able to use the functionality of Qt Quick types, the wizard template
|
||||||
following \e import statements to the QML files that it creates:
|
adds the following \e import statements to the QML files that it creates:
|
||||||
|
|
||||||
\quotefromfile loginui1/Screen01.ui.qml
|
\quotefromfile loginui1/Screen01.ui.qml
|
||||||
\skipto import
|
\skipto import
|
||||||
@@ -195,15 +195,15 @@
|
|||||||
|
|
||||||
\section1 Creating a Push Button
|
\section1 Creating a Push Button
|
||||||
|
|
||||||
You can use another wizard to create a push button and to add it to the
|
You can use another wizard template to create a push button and to add it to
|
||||||
project. The wizard creates a reusable button component that appears under
|
the project. The wizard template creates a reusable button component that
|
||||||
\uicontrol {My QML Components} in \uicontrol Library. You can
|
appears under \uicontrol {My QML Components} in \uicontrol Library. You can
|
||||||
drag and drop it to \uicontrol {Form Editor} and modify its properties
|
drag and drop it to \uicontrol {Form Editor} and modify its properties
|
||||||
in \uicontrol Properties to change its appearance and functionality.
|
in \uicontrol Properties to change its appearance and functionality.
|
||||||
|
|
||||||
If you find that you cannot use the wizard to create the kind of push
|
If you find that you cannot use the wizard template to create the kind of
|
||||||
button that you want, you can create your button from scratch using basic
|
push button that you want, you can create your button from scratch using
|
||||||
QML types. For more information, see \l {Creating Buttons} and
|
basic QML types. For more information, see \l {Creating Buttons} and
|
||||||
\l {Creating Scalable Buttons and Borders}.
|
\l {Creating Scalable Buttons and Borders}.
|
||||||
|
|
||||||
To create a push button:
|
To create a push button:
|
||||||
@@ -223,15 +223,15 @@
|
|||||||
|
|
||||||
\section2 Learn Qt Quick - Qt Quick Controls
|
\section2 Learn Qt Quick - Qt Quick Controls
|
||||||
|
|
||||||
The \e {Custom Button} wizard creates a \l [Qt Quick Controls 2] {Button}
|
The \e {Custom Button} wizard template creates a \l [Qt Quick Controls 2] {Button}
|
||||||
QML type that belongs to the \l {Qt Quick Controls 2} module. It is a
|
QML type that belongs to the \l {Qt Quick Controls 2} module. It is a
|
||||||
push-button control that can be pushed or clicked by the user. Buttons
|
push-button control that can be pushed or clicked by the user. Buttons
|
||||||
are normally used to perform an action or to answer a question. The Button
|
are normally used to perform an action or to answer a question. The Button
|
||||||
type inherits properties and functionality from another QML type. These
|
type inherits properties and functionality from another QML type. These
|
||||||
enable you to set text, display an icon, react to mouse clicks, and so on.
|
enable you to set text, display an icon, react to mouse clicks, and so on.
|
||||||
|
|
||||||
To be able to use the functionality of the Button type, the wizard adds the
|
To be able to use the functionality of the Button type, the wizard template
|
||||||
following \e import statements to the \e PushButton.ui.qml file:
|
adds the following \e import statements to the \e PushButton.ui.qml file:
|
||||||
|
|
||||||
\quotefromfile loginui1/PushButton.ui.qml
|
\quotefromfile loginui1/PushButton.ui.qml
|
||||||
\skipto import
|
\skipto import
|
||||||
@@ -258,46 +258,39 @@
|
|||||||
make the changes apply to all the button instances, you must make them in
|
make the changes apply to all the button instances, you must make them in
|
||||||
the \e PushButton.ui.qml file.
|
the \e PushButton.ui.qml file.
|
||||||
|
|
||||||
Because the wizard already set a master style for all the UI files in the
|
The Custom Button wizard template adds a \e down state to change the button
|
||||||
project, the button background properties are not displayed in the
|
background and text color when the button is clicked. You will now change
|
||||||
\uicontrol Properties view. You can access them by selecting them in the
|
the colors in both states.
|
||||||
\uicontrol Master menu (1) on the toolbar.
|
|
||||||
|
|
||||||
\image loginui1-toolbar.png
|
|
||||||
|
|
||||||
To change the button properties:
|
To change the button properties:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li On the toolbar, select \uicontrol Master >
|
\li Select the button background in \uicontrol Navigator to display its
|
||||||
\uicontrol buttonBackground to move into the button background
|
properties in the \uicontrol Properties view.
|
||||||
component.
|
|
||||||
\li Select the button background in \uicontrol {Form Editor} or
|
|
||||||
\uicontrol Navigator to display its properties in the
|
|
||||||
\uicontrol Properties view.
|
|
||||||
\li In the \uicontrol Color field, select
|
\li In the \uicontrol Color field, select
|
||||||
\inlineimage icons/action-icon.png
|
\inlineimage icons/action-icon.png
|
||||||
(\uicontrol Actions) > \uicontrol {Set Binding} and set the
|
(\uicontrol Actions) > \uicontrol {Set Binding} and set the
|
||||||
button background color to \e #41cd52.
|
button background color to \e #41cd52.
|
||||||
\li Press \key Enter or select the tick button at the bottom of
|
\li Press \key Enter or select \uicontrol OK to save the new value.
|
||||||
the editor to save the new value.
|
|
||||||
\image loginui1-binding-editor.png "Binding Editor"
|
\image loginui1-binding-editor.png "Binding Editor"
|
||||||
|
\omit
|
||||||
\li In the \uicontrol {Border Color} field, set the button
|
\li In the \uicontrol {Border Color} field, set the button
|
||||||
border color to \e #21be2b. You could also use the color picker
|
border color to \e #21be2b. You could also use the color picker
|
||||||
to change the button color.
|
to change the button color.
|
||||||
\li In the \uicontrol Radius field, enter 6 to give the button
|
\li In the \uicontrol Radius field, enter 6 to give the button
|
||||||
rounded corners.
|
rounded corners.
|
||||||
\li Select \uicontrol Master > \uicontrol textItem, and set the
|
\endomit
|
||||||
button text color to white (\e #ffffff).
|
\li Select the text item in \uicontrol Navigator to display its
|
||||||
|
properties in \uicontrol Properties.
|
||||||
|
\li In the \uicontrol {Text color} field, set the button text
|
||||||
|
color to white (\e #ffffff).
|
||||||
|
\li In the \uicontrol States view, select the \e down state to set the
|
||||||
|
button text color to white and the background color to a darker
|
||||||
|
shade of green (\e #21be2b).
|
||||||
\li Select \uicontrol File > \uicontrol Save or press \key {Ctrl+S}
|
\li Select \uicontrol File > \uicontrol Save or press \key {Ctrl+S}
|
||||||
to save your changes.
|
to save your changes.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
To move back to the top level PushButton type in the
|
|
||||||
\uicontrol {Form Editor}, select
|
|
||||||
\uicontrol PushButton.ui.qml on the breadcrumb bar (1):
|
|
||||||
|
|
||||||
\image loginui1-breadcrumb-bar.png "Breadcrumb bar in the Design mode."
|
|
||||||
|
|
||||||
Your button should now look something like this:
|
Your button should now look something like this:
|
||||||
|
|
||||||
\image loginui1-button-styled.png "Modified button in the Form Editor"
|
\image loginui1-button-styled.png "Modified button in the Form Editor"
|
||||||
@@ -376,7 +369,7 @@
|
|||||||
\section1 Next Steps
|
\section1 Next Steps
|
||||||
|
|
||||||
To learn how to add more UI controls and position them on the page using
|
To learn how to add more UI controls and position them on the page using
|
||||||
anchors and layouts so that the UI is scalable, see the next example in
|
anchors and layouts so that the UI is scalable, see the next tutorial in
|
||||||
the series, \l {Log In UI - Part 2}.
|
the series, \l {Log In UI - Part 2}.
|
||||||
|
|
||||||
For a more advanced example of creating a menu button and using it to
|
For a more advanced example of creating a menu button and using it to
|
||||||
|
@@ -56,9 +56,9 @@
|
|||||||
First, you will add a new rectangle to \uicontrol {Form Editor} and move
|
First, you will add a new rectangle to \uicontrol {Form Editor} and move
|
||||||
all the current UI components to it to create a new page. Then, you will
|
all the current UI components to it to create a new page. Then, you will
|
||||||
\l {Setting Anchors and Margins}{anchor} the static elements on the
|
\l {Setting Anchors and Margins}{anchor} the static elements on the
|
||||||
page, that is the logo image (\e logo) and page title (\e pageTitle),
|
page, that is the logo image (\e logo) and page title (\e pageTitle), to the
|
||||||
to the page. When you created the project using the new project wizard
|
page. When you created the project using the new project wizard template
|
||||||
in Part 1 of this example, the wizard anchored \e pageTitle to the
|
in Part 1 of this example, the wizard template anchored \e pageTitle to the
|
||||||
vertical and horizontal center of the page. Therefore, you will only
|
vertical and horizontal center of the page. Therefore, you will only
|
||||||
need to replace the vertical anchor of \e pageTitle with a top anchor
|
need to replace the vertical anchor of \e pageTitle with a top anchor
|
||||||
to align it with \e logo on the page.
|
to align it with \e logo on the page.
|
||||||
|
@@ -214,11 +214,6 @@
|
|||||||
|
|
||||||
\image loginui3.gif "Moving between login page and registration page"
|
\image loginui3.gif "Moving between login page and registration page"
|
||||||
|
|
||||||
The \e PushButton type also uses states to change the button background and
|
|
||||||
text color when the button is clicked. Now that clicking buttons performs
|
|
||||||
actions, you will change the background color for the button down state
|
|
||||||
from grey to green to match the color in the normal state that you changed
|
|
||||||
to green in Part 1.
|
|
||||||
|
|
||||||
\section2 Learn Qt Quick - Signal and Event Handlers
|
\section2 Learn Qt Quick - Signal and Event Handlers
|
||||||
|
|
||||||
@@ -234,30 +229,6 @@
|
|||||||
|
|
||||||
For more information, see \l{Signal and Handler Event System}.
|
For more information, see \l{Signal and Handler Event System}.
|
||||||
|
|
||||||
Next, you will modify the properties of the \e PushButton type in the text
|
|
||||||
editor.
|
|
||||||
|
|
||||||
\section1 Changing Button Background Color
|
|
||||||
|
|
||||||
You will modify the button background color for the \e down state of the
|
|
||||||
\e PushButton type in the \e PushButton.ui.qml file.
|
|
||||||
|
|
||||||
\list 1
|
|
||||||
\li Right-click \e loginButton in the \uicontrol Navigator and select
|
|
||||||
\uicontrol {Go into Component} to open \e PushButton.ui.qml for
|
|
||||||
editing in the Design mode.
|
|
||||||
\li Open the \uicontrol {Text Editor}.
|
|
||||||
\li Edit the property values for the \e down state, to set the button
|
|
||||||
text color to white and the background and border colors to
|
|
||||||
darker shades of green by using the \c {Qt.darker()} function:
|
|
||||||
\quotefromfile loginui3/PushButton.ui.qml
|
|
||||||
\skipto states:
|
|
||||||
\printuntil ]
|
|
||||||
You could also specify all the colors here as fixed values.
|
|
||||||
\li Select \uicontrol File > \uicontrol Save or press \key {Ctrl+S}
|
|
||||||
to save your changes.
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\section1 Next Steps
|
\section1 Next Steps
|
||||||
|
|
||||||
For a more complicated UI, you would typically use QML types that specify
|
For a more complicated UI, you would typically use QML types that specify
|
||||||
|
@@ -1,54 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Templates 2.1 as T
|
import QtQuick.Templates 2.1 as T
|
||||||
import loginui1 1.0
|
import loginui1 1.0
|
||||||
@@ -56,8 +5,6 @@ import loginui1 1.0
|
|||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
text: qsTr("MyButton")
|
|
||||||
|
|
||||||
font: Constants.font
|
font: Constants.font
|
||||||
implicitWidth: Math.max(
|
implicitWidth: Math.max(
|
||||||
background ? background.implicitWidth : 0,
|
background ? background.implicitWidth : 0,
|
||||||
@@ -68,24 +15,27 @@ T.Button {
|
|||||||
leftPadding: 4
|
leftPadding: 4
|
||||||
rightPadding: 4
|
rightPadding: 4
|
||||||
|
|
||||||
background: Rectangle {
|
text: "My Button"
|
||||||
|
|
||||||
|
background: buttonBackground
|
||||||
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
color: "#41cd52"
|
color: "#41cd52"
|
||||||
radius: 6
|
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
opacity: enabled ? 1 : 0.3
|
opacity: enabled ? 1 : 0.3
|
||||||
|
border.color: "gray"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#21be2b"
|
radius: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: textItem
|
||||||
|
Text {
|
||||||
id: textItem
|
id: textItem
|
||||||
text: control.text
|
text: control.text
|
||||||
|
|
||||||
font: control.font
|
|
||||||
opacity: enabled ? 1.0 : 0.3
|
opacity: enabled ? 1.0 : 0.3
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -104,14 +54,13 @@ T.Button {
|
|||||||
when: control.down
|
when: control.down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: textItem
|
target: textItem
|
||||||
color: "black"
|
color: "#fdfdfd"
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonBackground
|
target: buttonBackground
|
||||||
color: "#a2a2a2"
|
color: "#21be2b"
|
||||||
border.color: "black"
|
border.color: "black"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,96 +1,46 @@
|
|||||||
|
import QtQuick 2.12
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
|
||||||
import loginui1 1.0
|
import loginui1 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: Constants.width
|
width: Constants.width
|
||||||
height: Constants.height
|
height: Constants.height
|
||||||
|
color: "#fdfdfd"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: pageTitle
|
id: pageTitle
|
||||||
x: 259
|
|
||||||
y: 155
|
|
||||||
width: 123
|
|
||||||
height: 40
|
|
||||||
text: qsTr("Qt Account")
|
text: qsTr("Qt Account")
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
|
anchors.verticalCenterOffset: -153
|
||||||
|
anchors.horizontalCenterOffset: 1
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.family: Constants.font.family
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: logo
|
id: logo
|
||||||
x: 8
|
x: 13
|
||||||
y: 8
|
y: 0
|
||||||
width: 100
|
width: 100
|
||||||
height: 100
|
height: 100
|
||||||
source: "qt_logo_green_64x64px.png"
|
source: "qt_logo_green_64x64px.png"
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
PushButton {
|
|
||||||
id: registerButton
|
|
||||||
x: 259
|
|
||||||
y: 277
|
|
||||||
width: 120
|
|
||||||
height: 40
|
|
||||||
text: qsTr("Create Account")
|
|
||||||
}
|
|
||||||
|
|
||||||
PushButton {
|
PushButton {
|
||||||
id: loginButton
|
id: loginButton
|
||||||
x: 259
|
x: 262
|
||||||
y: 231
|
y: 343
|
||||||
width: 120
|
width: 120
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Log In")
|
text: qsTr("Log In")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: registerButton
|
||||||
|
x: 262
|
||||||
|
y: 389
|
||||||
|
width: 120
|
||||||
|
height: 40
|
||||||
|
text: qsTr("Create Account")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,69 +1,27 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
readonly property int width: 640
|
readonly property int width: 640
|
||||||
readonly property int height: 480
|
readonly property int height: 480
|
||||||
|
|
||||||
readonly property FontLoader mySystemFont: FontLoader { name: "Arial" }
|
readonly property FontLoader mySystemFont: FontLoader { name: "Arial" }
|
||||||
|
|
||||||
|
property alias fontDirectory: directoryFontLoader.fontDirectory
|
||||||
|
property alias relativeFontDirectory: directoryFontLoader.relativeFontDirectory
|
||||||
|
|
||||||
/* Edit this comment to add your custom font */
|
/* Edit this comment to add your custom font */
|
||||||
/* readonly property FontLoader myCustomFont: FontLoader { source: "MyCustomFont.ttf" } */
|
|
||||||
readonly property font font: Qt.font({
|
readonly property font font: Qt.font({
|
||||||
family: mySystemFont.name,
|
family: mySystemFont.name,
|
||||||
pointSize: Qt.application.font.pixelSize
|
pixelSize: Qt.application.font.pixelSize
|
||||||
})
|
})
|
||||||
readonly property font largeFont: Qt.font({
|
readonly property font largeFont: Qt.font({
|
||||||
family: mySystemFont.name,
|
family: mySystemFont.name,
|
||||||
pointSize: Qt.application.font.pixelSize * 1.6
|
pixelSize: Qt.application.font.pixelSize * 1.6
|
||||||
})
|
})
|
||||||
readonly property color backgroundColor: "#c2c2c2"
|
readonly property color backgroundColor: "#c2c2c2"
|
||||||
|
|
||||||
|
property DirectoryFontLoader directoryFontLoader: DirectoryFontLoader {
|
||||||
|
id: directoryFontLoader
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
singleton Constants 1.0 Constants.qml
|
singleton Constants 1.0 Constants.qml
|
||||||
|
EventListSimulator 1.0 EventListSimulator.qml
|
||||||
|
@@ -1,54 +1,4 @@
|
|||||||
/****************************************************************************
|
import QtQuick 2.12
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
|
||||||
import loginui1 1.0
|
import loginui1 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@@ -28,13 +28,17 @@ Project {
|
|||||||
directory: "."
|
directory: "."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Files {
|
||||||
|
filter: "*.ttf;*.otf"
|
||||||
|
}
|
||||||
|
|
||||||
Environment {
|
Environment {
|
||||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* List of plugin directories passed to QML runtime */
|
/* List of plugin directories passed to QML runtime */
|
||||||
importPaths: [ "imports" ]
|
importPaths: [ "imports", "asset_imports" ]
|
||||||
|
|
||||||
/* Required for deployment */
|
/* Required for deployment */
|
||||||
targetDirectory: "/opt/loginui1"
|
targetDirectory: "/opt/loginui1"
|
||||||
|
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtDesignStudio 1.3.0, 2019-10-24T11:06:25. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{595d361f-de69-4ff2-b1f6-d89b95edfd27}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
|
||||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
|
||||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtDesignStudio 1.2.0, 2019-05-28T14:45:23. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{595d361f-de69-4ff2-b1f6-d89b95edfd27}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
|
||||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
|
||||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@@ -1,54 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Templates 2.1 as T
|
import QtQuick.Templates 2.1 as T
|
||||||
import loginui2 1.0
|
import loginui2 1.0
|
||||||
@@ -56,8 +5,6 @@ import loginui2 1.0
|
|||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
text: qsTr("MyButton")
|
|
||||||
|
|
||||||
font: Constants.font
|
font: Constants.font
|
||||||
implicitWidth: Math.max(
|
implicitWidth: Math.max(
|
||||||
background ? background.implicitWidth : 0,
|
background ? background.implicitWidth : 0,
|
||||||
@@ -68,24 +15,27 @@ T.Button {
|
|||||||
leftPadding: 4
|
leftPadding: 4
|
||||||
rightPadding: 4
|
rightPadding: 4
|
||||||
|
|
||||||
background: Rectangle {
|
text: "My Button"
|
||||||
|
|
||||||
|
background: buttonBackground
|
||||||
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
color: "#41cd52"
|
color: "#41cd52"
|
||||||
radius: 6
|
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
opacity: enabled ? 1 : 0.3
|
opacity: enabled ? 1 : 0.3
|
||||||
|
border.color: "gray"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#21be2b"
|
radius: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: textItem
|
||||||
|
Text {
|
||||||
id: textItem
|
id: textItem
|
||||||
text: control.text
|
text: control.text
|
||||||
|
|
||||||
font: control.font
|
|
||||||
opacity: enabled ? 1.0 : 0.3
|
opacity: enabled ? 1.0 : 0.3
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -104,14 +54,19 @@ T.Button {
|
|||||||
when: control.down
|
when: control.down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: textItem
|
target: textItem
|
||||||
color: "black"
|
color: "#fdfdfd"
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonBackground
|
target: buttonBackground
|
||||||
color: "#a2a2a2"
|
color: "#21be2b"
|
||||||
border.color: "black"
|
border.color: "black"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
|
}
|
||||||
|
##^##*/
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtDesignStudio 1.2.0, 2019-05-28T16:13:26. -->
|
<!-- Written by QtDesignStudio 1.5.9, 2020-07-02T17:34:24. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@@ -70,12 +70,12 @@
|
|||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
@@ -88,12 +88,15 @@
|
|||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||||
|
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.LastUsedLanguage">en</value>
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
<value type="bool" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments.multi">false</value>
|
||||||
|
<value type="bool" key="QmlProjectManager.QmlRunConfiguration.UseMultiLanguage">false</value>
|
||||||
|
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
@@ -109,10 +112,10 @@
|
|||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
<value type="int">21</value>
|
<value type="int">22</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>Version</variable>
|
<variable>Version</variable>
|
||||||
<value type="int">21</value>
|
<value type="int">22</value>
|
||||||
</data>
|
</data>
|
||||||
</qtcreator>
|
</qtcreator>
|
||||||
|
@@ -1,53 +1,3 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Templates 2.1 as T
|
import QtQuick.Templates 2.1 as T
|
||||||
import loginui3 1.0
|
import loginui3 1.0
|
||||||
@@ -55,8 +5,6 @@ import loginui3 1.0
|
|||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
text: qsTr("MyButton")
|
|
||||||
|
|
||||||
font: Constants.font
|
font: Constants.font
|
||||||
implicitWidth: Math.max(
|
implicitWidth: Math.max(
|
||||||
background ? background.implicitWidth : 0,
|
background ? background.implicitWidth : 0,
|
||||||
@@ -67,24 +15,27 @@ T.Button {
|
|||||||
leftPadding: 4
|
leftPadding: 4
|
||||||
rightPadding: 4
|
rightPadding: 4
|
||||||
|
|
||||||
background: Rectangle {
|
text: "My Button"
|
||||||
|
|
||||||
|
background: buttonBackground
|
||||||
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
color: "#41cd52"
|
color: "#41cd52"
|
||||||
radius: 6
|
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
opacity: enabled ? 1 : 0.3
|
opacity: enabled ? 1 : 0.3
|
||||||
|
border.color: "gray"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#21be2b"
|
radius: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: textItem
|
||||||
|
Text {
|
||||||
id: textItem
|
id: textItem
|
||||||
text: control.text
|
text: control.text
|
||||||
|
|
||||||
font: control.font
|
|
||||||
opacity: enabled ? 1.0 : 0.3
|
opacity: enabled ? 1.0 : 0.3
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -103,13 +54,19 @@ T.Button {
|
|||||||
when: control.down
|
when: control.down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: textItem
|
target: textItem
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonBackground
|
target: buttonBackground
|
||||||
color: Qt.darker("#41cd52", 1.2)
|
color: "#21be2b"
|
||||||
border.color: Qt.darker("#21be2b", 1.2)
|
border.color: "black"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
|
}
|
||||||
|
##^##*/
|
||||||
|
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtDesignStudio 1.2.0, 2019-05-29T13:03:13. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{595d361f-de69-4ff2-b1f6-d89b95edfd27}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
|
||||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
|
||||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@@ -1,53 +1,3 @@
|
|||||||
|
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the examples of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:BSD$
|
|
||||||
** 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.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Templates 2.1 as T
|
import QtQuick.Templates 2.1 as T
|
||||||
import loginui4 1.0
|
import loginui4 1.0
|
||||||
@@ -55,8 +5,6 @@ import loginui4 1.0
|
|||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
text: qsTr("MyButton")
|
|
||||||
|
|
||||||
font: Constants.font
|
font: Constants.font
|
||||||
implicitWidth: Math.max(
|
implicitWidth: Math.max(
|
||||||
background ? background.implicitWidth : 0,
|
background ? background.implicitWidth : 0,
|
||||||
@@ -67,24 +15,27 @@ T.Button {
|
|||||||
leftPadding: 4
|
leftPadding: 4
|
||||||
rightPadding: 4
|
rightPadding: 4
|
||||||
|
|
||||||
background: Rectangle {
|
text: "My Button"
|
||||||
|
|
||||||
|
background: buttonBackground
|
||||||
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
color: "#41cd52"
|
color: "#41cd52"
|
||||||
radius: 6
|
|
||||||
implicitWidth: 100
|
implicitWidth: 100
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
opacity: enabled ? 1 : 0.3
|
opacity: enabled ? 1 : 0.3
|
||||||
|
border.color: "gray"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#21be2b"
|
radius: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: textItem
|
||||||
|
Text {
|
||||||
id: textItem
|
id: textItem
|
||||||
text: control.text
|
text: control.text
|
||||||
|
|
||||||
font: control.font
|
|
||||||
opacity: enabled ? 1.0 : 0.3
|
opacity: enabled ? 1.0 : 0.3
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@@ -103,21 +54,19 @@ T.Button {
|
|||||||
when: control.down
|
when: control.down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: textItem
|
target: textItem
|
||||||
color: "white"
|
color: "#fdfdfd"
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonBackground
|
target: buttonBackground
|
||||||
color: Qt.darker("#41cd52", 1.2)
|
color: "#21be2b"
|
||||||
border.color: Qt.darker("#21be2b", 1.2)
|
border.color: "black"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
|
||||||
/*##^## Designer {
|
|
||||||
D{i:0;autoSize:true;height:480;width:640}
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
}
|
}
|
||||||
##^##*/
|
##^##*/
|
||||||
|
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtDesignStudio 1.3.0, 2019-09-04T14:46:00. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{595d361f-de69-4ff2-b1f6-d89b95edfd27}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
|
||||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
|
||||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtDesignStudio 1.2.0, 2019-05-29T15:11:35. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{595d361f-de69-4ff2-b1f6-d89b95edfd27}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
|
||||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
|
||||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
|
|
||||||
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">21</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@@ -59,6 +59,8 @@ source_include_patterns = [
|
|||||||
# directories
|
# directories
|
||||||
r"^(?!(share|tests)/.*$)(.*/)?$", # look into all directories except under share/ and tests/
|
r"^(?!(share|tests)/.*$)(.*/)?$", # look into all directories except under share/ and tests/
|
||||||
r"^share/(qtcreator/(qml/(qmlpuppet/(.*/)?)?)?)?$", # for shared headers for qt quick designer plugins
|
r"^share/(qtcreator/(qml/(qmlpuppet/(.*/)?)?)?)?$", # for shared headers for qt quick designer plugins
|
||||||
|
r"^share/qtcreator/qml/qmlpuppet/commands/.*\.(h|pri|cpp|c|txt|md)$", #used by extra plugins
|
||||||
|
r"^share/qtcreator/qml/qmlpuppet/container/.*\.(h|pri|cpp|c|txt|md)$", #used by extra plugins
|
||||||
r"^src/plugins/help/qlitehtml/.*\.(h|pri|cpp|c|txt|md)$", # litehtml is used by extra plugins
|
r"^src/plugins/help/qlitehtml/.*\.(h|pri|cpp|c|txt|md)$", # litehtml is used by extra plugins
|
||||||
# files
|
# files
|
||||||
r"^HACKING$",
|
r"^HACKING$",
|
||||||
|
@@ -29,11 +29,41 @@
|
|||||||
|
|
||||||
#include "imagecontainer.h"
|
#include "imagecontainer.h"
|
||||||
|
|
||||||
|
#include <utils/smallstringio.h>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class CapturedDataCommand
|
class CapturedDataCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct Property
|
||||||
|
{
|
||||||
|
Property() = default;
|
||||||
|
Property(QString key, QVariant value)
|
||||||
|
: key(std::move(key))
|
||||||
|
, value(std::move(value))
|
||||||
|
{}
|
||||||
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const Property &property)
|
||||||
|
{
|
||||||
|
out << property.key;
|
||||||
|
out << property.value;
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, Property &property)
|
||||||
|
{
|
||||||
|
in >> property.key;
|
||||||
|
in >> property.value;
|
||||||
|
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString key;
|
||||||
|
QVariant value;
|
||||||
|
};
|
||||||
|
|
||||||
struct NodeData
|
struct NodeData
|
||||||
{
|
{
|
||||||
friend QDataStream &operator<<(QDataStream &out, const NodeData &data)
|
friend QDataStream &operator<<(QDataStream &out, const NodeData &data)
|
||||||
@@ -41,7 +71,7 @@ public:
|
|||||||
out << data.nodeId;
|
out << data.nodeId;
|
||||||
out << data.contentRect;
|
out << data.contentRect;
|
||||||
out << data.sceneTransform;
|
out << data.sceneTransform;
|
||||||
out << data.text;
|
out << data.properties;
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@@ -51,7 +81,7 @@ public:
|
|||||||
in >> data.nodeId;
|
in >> data.nodeId;
|
||||||
in >> data.contentRect;
|
in >> data.contentRect;
|
||||||
in >> data.sceneTransform;
|
in >> data.sceneTransform;
|
||||||
in >> data.text;
|
in >> data.properties;
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
@@ -59,7 +89,7 @@ public:
|
|||||||
qint32 nodeId = -1;
|
qint32 nodeId = -1;
|
||||||
QRectF contentRect;
|
QRectF contentRect;
|
||||||
QTransform sceneTransform;
|
QTransform sceneTransform;
|
||||||
QString text;
|
std::vector<Property> properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct StateData
|
struct StateData
|
||||||
@@ -81,7 +111,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImageContainer image;
|
ImageContainer image;
|
||||||
QVector<NodeData> nodeData;
|
std::vector<NodeData> nodeData;
|
||||||
|
qint32 nodeId = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
friend QDataStream &operator<<(QDataStream &out, const CapturedDataCommand &command)
|
friend QDataStream &operator<<(QDataStream &out, const CapturedDataCommand &command)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
@@ -29,35 +29,9 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
ChangeAuxiliaryCommand::ChangeAuxiliaryCommand() = default;
|
|
||||||
|
|
||||||
ChangeAuxiliaryCommand::ChangeAuxiliaryCommand(const QVector<PropertyValueContainer> &auxiliaryChangeVector)
|
|
||||||
: m_auxiliaryChangeVector (auxiliaryChangeVector)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<PropertyValueContainer> ChangeAuxiliaryCommand::auxiliaryChanges() const
|
|
||||||
{
|
|
||||||
return m_auxiliaryChangeVector;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command)
|
|
||||||
{
|
|
||||||
out << command.auxiliaryChanges();
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command)
|
|
||||||
{
|
|
||||||
in >> command.m_auxiliaryChangeVector;
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command)
|
QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command)
|
||||||
{
|
{
|
||||||
return debug.nospace() << "ChangeAuxiliaryCommand(auxiliaryChanges: " << command.m_auxiliaryChangeVector << ")";
|
return debug.nospace() << "ChangeAuxiliaryCommand(auxiliaryChanges: " << command.auxiliaryChanges << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of Qt Creator.
|
** This file is part of Qt Creator.
|
||||||
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <QDataStream>
|
||||||
|
#include <QDebug>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
@@ -34,24 +36,24 @@ namespace QmlDesigner {
|
|||||||
|
|
||||||
class ChangeAuxiliaryCommand
|
class ChangeAuxiliaryCommand
|
||||||
{
|
{
|
||||||
friend QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
|
public:
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command)
|
||||||
|
{
|
||||||
|
in >> command.auxiliaryChanges;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command)
|
||||||
|
{
|
||||||
|
out << command.auxiliaryChanges;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
friend QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command);
|
friend QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command);
|
||||||
|
|
||||||
public:
|
QVector<PropertyValueContainer> auxiliaryChanges;
|
||||||
ChangeAuxiliaryCommand();
|
|
||||||
explicit ChangeAuxiliaryCommand(const QVector<PropertyValueContainer> &auxiliaryChangeVector);
|
|
||||||
|
|
||||||
QVector<PropertyValueContainer> auxiliaryChanges() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVector<PropertyValueContainer> m_auxiliaryChangeVector;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeAuxiliaryCommand &command);
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeAuxiliaryCommand &command);
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeAuxiliaryCommand &command);
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand)
|
Q_DECLARE_METATYPE(QmlDesigner::ChangeAuxiliaryCommand)
|
||||||
|
@@ -29,35 +29,9 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
ChangeBindingsCommand::ChangeBindingsCommand() = default;
|
|
||||||
|
|
||||||
ChangeBindingsCommand::ChangeBindingsCommand(const QVector<PropertyBindingContainer> &bindingChangeVector)
|
|
||||||
: m_bindingChangeVector (bindingChangeVector)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<PropertyBindingContainer> ChangeBindingsCommand::bindingChanges() const
|
|
||||||
{
|
|
||||||
return m_bindingChangeVector;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command)
|
|
||||||
{
|
|
||||||
out << command.bindingChanges();
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command)
|
|
||||||
{
|
|
||||||
in >> command.m_bindingChangeVector;
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command)
|
QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command)
|
||||||
{
|
{
|
||||||
return debug.nospace() << "PropertyValueContainer(bindingChanges: " << command.m_bindingChangeVector << ")";
|
return debug.nospace() << "PropertyValueContainer(bindingChanges: " << command.bindingChanges << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -34,24 +34,22 @@ namespace QmlDesigner {
|
|||||||
|
|
||||||
class ChangeBindingsCommand
|
class ChangeBindingsCommand
|
||||||
{
|
{
|
||||||
friend QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
|
public:
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command) {
|
||||||
|
in >> command.bindingChanges;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command) {
|
||||||
|
out << command.bindingChanges;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
friend QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command);
|
friend QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command);
|
||||||
|
|
||||||
public:
|
QVector<PropertyBindingContainer> bindingChanges;
|
||||||
ChangeBindingsCommand();
|
|
||||||
explicit ChangeBindingsCommand(const QVector<PropertyBindingContainer> &bindingChangeVector);
|
|
||||||
|
|
||||||
QVector<PropertyBindingContainer> bindingChanges() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVector<PropertyBindingContainer> m_bindingChangeVector;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeBindingsCommand &command);
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeBindingsCommand &command);
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeBindingsCommand &command);
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand)
|
Q_DECLARE_METATYPE(QmlDesigner::ChangeBindingsCommand)
|
||||||
|
@@ -25,41 +25,14 @@
|
|||||||
|
|
||||||
#include "changefileurlcommand.h"
|
#include "changefileurlcommand.h"
|
||||||
|
|
||||||
#include <QDataStream>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
ChangeFileUrlCommand::ChangeFileUrlCommand() = default;
|
|
||||||
|
|
||||||
ChangeFileUrlCommand::ChangeFileUrlCommand(const QUrl &fileUrl)
|
|
||||||
: m_fileUrl(fileUrl)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QUrl ChangeFileUrlCommand::fileUrl() const
|
|
||||||
{
|
|
||||||
return m_fileUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command)
|
|
||||||
{
|
|
||||||
out << command.fileUrl();
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command)
|
|
||||||
{
|
|
||||||
in >> command.m_fileUrl;
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command)
|
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command)
|
||||||
{
|
{
|
||||||
return debug.nospace() << "ChangeFileUrlCommand("
|
return debug.nospace() << "ChangeFileUrlCommand("
|
||||||
<< "fileUrl: " << command.fileUrl() << ")";
|
<< "fileUrl: " << command.fileUrl << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -26,29 +26,31 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <qmetatype.h>
|
#include <qmetatype.h>
|
||||||
|
#include <QDataStream>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class ChangeFileUrlCommand
|
class ChangeFileUrlCommand
|
||||||
{
|
{
|
||||||
friend QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command);
|
|
||||||
public:
|
public:
|
||||||
ChangeFileUrlCommand();
|
friend QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command)
|
||||||
explicit ChangeFileUrlCommand(const QUrl &fileUrl);
|
{
|
||||||
|
in >> command.fileUrl;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
QUrl fileUrl() const;
|
friend QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command)
|
||||||
|
{
|
||||||
|
out << command.fileUrl;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
friend QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command);
|
||||||
QUrl m_fileUrl;
|
|
||||||
|
QUrl fileUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command);
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command);
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command);
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand)
|
Q_DECLARE_METATYPE(QmlDesigner::ChangeFileUrlCommand)
|
||||||
|
@@ -29,35 +29,9 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
ChangeIdsCommand::ChangeIdsCommand() = default;
|
|
||||||
|
|
||||||
ChangeIdsCommand::ChangeIdsCommand(const QVector<IdContainer> &idVector)
|
|
||||||
: m_idVector(idVector)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<IdContainer> ChangeIdsCommand::ids() const
|
|
||||||
{
|
|
||||||
return m_idVector;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command)
|
|
||||||
{
|
|
||||||
out << command.ids();
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command)
|
|
||||||
{
|
|
||||||
in >> command.m_idVector;
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command)
|
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command)
|
||||||
{
|
{
|
||||||
return debug.nospace() << "ChangeIdsCommand(ids: " << command.m_idVector << ")";
|
return debug.nospace() << "ChangeIdsCommand(ids: " << command.ids << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
#include <QDataStream>
|
||||||
|
|
||||||
#include "idcontainer.h"
|
#include "idcontainer.h"
|
||||||
|
|
||||||
@@ -35,24 +35,23 @@ namespace QmlDesigner {
|
|||||||
|
|
||||||
class ChangeIdsCommand
|
class ChangeIdsCommand
|
||||||
{
|
{
|
||||||
friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
|
public:
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command)
|
||||||
|
{
|
||||||
|
in >> command.ids;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command)
|
||||||
|
{
|
||||||
|
out << command.ids;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command);
|
friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command);
|
||||||
|
|
||||||
public:
|
QVector<IdContainer> ids;
|
||||||
ChangeIdsCommand();
|
|
||||||
explicit ChangeIdsCommand(const QVector<IdContainer> &idVector);
|
|
||||||
|
|
||||||
QVector<IdContainer> ids() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVector<IdContainer> m_idVector;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command);
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command);
|
|
||||||
|
|
||||||
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command);
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand)
|
Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand)
|
||||||
|
@@ -29,16 +29,6 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const ChangeLanguageCommand &command)
|
|
||||||
{
|
|
||||||
return out << command.language;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, ChangeLanguageCommand &command)
|
|
||||||
{
|
|
||||||
return in >> command.language;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command)
|
QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command)
|
||||||
{
|
{
|
||||||
return debug.nospace() << "ChangeLanguageCommand(" << command.language << ")";
|
return debug.nospace() << "ChangeLanguageCommand(" << command.language << ")";
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QDataStream>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
@@ -34,15 +35,20 @@ class ChangeLanguageCommand
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ChangeLanguageCommand() = default;
|
ChangeLanguageCommand() = default;
|
||||||
ChangeLanguageCommand(const QString &language)
|
ChangeLanguageCommand(QString language) : language(std::move(language)) {
|
||||||
: language(language)
|
}
|
||||||
{}
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const ChangeLanguageCommand &command)
|
||||||
|
{
|
||||||
|
return out << command.language;
|
||||||
|
}
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, ChangeLanguageCommand &command)
|
||||||
|
{
|
||||||
|
return in >> command.language;
|
||||||
|
}
|
||||||
|
|
||||||
friend QDataStream &operator<<(QDataStream &out, const ChangeLanguageCommand &command);
|
|
||||||
friend QDataStream &operator>>(QDataStream &in, ChangeLanguageCommand &command);
|
|
||||||
friend QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command);
|
friend QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command);
|
||||||
|
|
||||||
public:
|
|
||||||
QString language;
|
QString language;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QLocalSocket;
|
class QLocalSocket;
|
||||||
class QIODevice;
|
class QIODevice;
|
||||||
|
@@ -607,7 +607,7 @@ QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneCo
|
|||||||
|
|
||||||
void NodeInstanceServer::changeFileUrl(const ChangeFileUrlCommand &command)
|
void NodeInstanceServer::changeFileUrl(const ChangeFileUrlCommand &command)
|
||||||
{
|
{
|
||||||
m_fileUrl = command.fileUrl();
|
m_fileUrl = command.fileUrl;
|
||||||
|
|
||||||
if (engine())
|
if (engine())
|
||||||
engine()->setBaseUrl(m_fileUrl);
|
engine()->setBaseUrl(m_fileUrl);
|
||||||
@@ -632,7 +632,7 @@ void NodeInstanceServer::changePropertyValues(const ChangeValuesCommand &command
|
|||||||
|
|
||||||
void NodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
|
void NodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
|
||||||
{
|
{
|
||||||
foreach (const PropertyValueContainer &container, command.auxiliaryChanges()) {
|
for (const PropertyValueContainer &container : command.auxiliaryChanges) {
|
||||||
setInstanceAuxiliaryData(container);
|
setInstanceAuxiliaryData(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -642,7 +642,7 @@ void NodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &com
|
|||||||
void NodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &command)
|
void NodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &command)
|
||||||
{
|
{
|
||||||
bool hasDynamicProperties = false;
|
bool hasDynamicProperties = false;
|
||||||
foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
|
for (const PropertyBindingContainer &container : command.bindingChanges) {
|
||||||
hasDynamicProperties |= container.isDynamic();
|
hasDynamicProperties |= container.isDynamic();
|
||||||
setInstancePropertyBinding(container);
|
setInstancePropertyBinding(container);
|
||||||
}
|
}
|
||||||
@@ -655,7 +655,7 @@ void NodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &com
|
|||||||
|
|
||||||
void NodeInstanceServer::changeIds(const ChangeIdsCommand &command)
|
void NodeInstanceServer::changeIds(const ChangeIdsCommand &command)
|
||||||
{
|
{
|
||||||
foreach (const IdContainer &container, command.ids()) {
|
for (const IdContainer &container : command.ids) {
|
||||||
if (hasInstanceForId(container.instanceId()))
|
if (hasInstanceForId(container.instanceId()))
|
||||||
instanceForId(container.instanceId()).setId(container.id());
|
instanceForId(container.instanceId()).setId(container.id());
|
||||||
}
|
}
|
||||||
|
@@ -56,17 +56,19 @@ CapturedDataCommand::StateData collectStateData(ServerNodeInstance rootNodeInsta
|
|||||||
stateData.image = ImageContainer(stateInstanceId,
|
stateData.image = ImageContainer(stateInstanceId,
|
||||||
QmlDesigner::renderPreviewImage(rootNodeInstance),
|
QmlDesigner::renderPreviewImage(rootNodeInstance),
|
||||||
stateInstanceId);
|
stateInstanceId);
|
||||||
|
stateData.nodeId = stateInstanceId;
|
||||||
|
|
||||||
for (const ServerNodeInstance &instance : nodeInstances) {
|
for (const ServerNodeInstance &instance : nodeInstances) {
|
||||||
|
CapturedDataCommand::NodeData nodeData;
|
||||||
|
|
||||||
|
nodeData.nodeId = instance.instanceId();
|
||||||
|
nodeData.contentRect = instance.contentItemBoundingRect();
|
||||||
|
nodeData.sceneTransform = instance.sceneTransform();
|
||||||
auto textProperty = instance.property("text");
|
auto textProperty = instance.property("text");
|
||||||
if (!textProperty.isNull() && instance.holdsGraphical()) {
|
if (!textProperty.isNull() && instance.holdsGraphical())
|
||||||
CapturedDataCommand::NodeData nodeData;
|
nodeData.properties.emplace_back(QString{"text"}, textProperty.toString());
|
||||||
nodeData.nodeId = instance.instanceId();
|
|
||||||
nodeData.contentRect = instance.contentItemBoundingRect();
|
stateData.nodeData.push_back(std::move(nodeData));
|
||||||
nodeData.sceneTransform = instance.sceneTransform();
|
|
||||||
nodeData.text = textProperty.toString();
|
|
||||||
stateData.nodeData.push_back(std::move(nodeData));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return stateData;
|
return stateData;
|
||||||
|
@@ -1261,8 +1261,7 @@ void Qt5InformationNodeInstanceServer::changeIds(const ChangeIdsCommand &command
|
|||||||
updateActiveSceneToEditView3D();
|
updateActiveSceneToEditView3D();
|
||||||
} else {
|
} else {
|
||||||
qint32 sceneInstanceId = sceneInstance.instanceId();
|
qint32 sceneInstanceId = sceneInstance.instanceId();
|
||||||
const QVector<IdContainer> ids = command.ids();
|
for (const auto &id : command.ids) {
|
||||||
for (const auto &id : ids) {
|
|
||||||
if (sceneInstanceId == id.instanceId()) {
|
if (sceneInstanceId == id.instanceId()) {
|
||||||
QMetaObject::invokeMethod(m_editView3DRootItem, "handleActiveSceneIdChange",
|
QMetaObject::invokeMethod(m_editView3DRootItem, "handleActiveSceneIdChange",
|
||||||
Qt::QueuedConnection,
|
Qt::QueuedConnection,
|
||||||
|
@@ -80,7 +80,7 @@ void Qt5TestNodeInstanceServer::createInstances(const CreateInstancesCommand &co
|
|||||||
|
|
||||||
void Qt5TestNodeInstanceServer::changeFileUrl(const ChangeFileUrlCommand &command)
|
void Qt5TestNodeInstanceServer::changeFileUrl(const ChangeFileUrlCommand &command)
|
||||||
{
|
{
|
||||||
setupFileUrl(command.fileUrl());
|
setupFileUrl(command.fileUrl);
|
||||||
|
|
||||||
refreshBindings();
|
refreshBindings();
|
||||||
collectItemChangesAndSendChangeCommands();
|
collectItemChangesAndSendChangeCommands();
|
||||||
@@ -103,7 +103,7 @@ void Qt5TestNodeInstanceServer::changePropertyValues(const ChangeValuesCommand &
|
|||||||
void Qt5TestNodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &command)
|
void Qt5TestNodeInstanceServer::changePropertyBindings(const ChangeBindingsCommand &command)
|
||||||
{
|
{
|
||||||
bool hasDynamicProperties = false;
|
bool hasDynamicProperties = false;
|
||||||
foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
|
for (const PropertyBindingContainer &container : command.bindingChanges) {
|
||||||
hasDynamicProperties |= container.isDynamic();
|
hasDynamicProperties |= container.isDynamic();
|
||||||
setInstancePropertyBinding(container);
|
setInstancePropertyBinding(container);
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ void Qt5TestNodeInstanceServer::changePropertyBindings(const ChangeBindingsComma
|
|||||||
|
|
||||||
void Qt5TestNodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
|
void Qt5TestNodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryCommand &command)
|
||||||
{
|
{
|
||||||
foreach (const PropertyValueContainer &container, command.auxiliaryChanges()) {
|
for (const PropertyValueContainer &container : command.auxiliaryChanges) {
|
||||||
setInstanceAuxiliaryData(container);
|
setInstanceAuxiliaryData(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ void Qt5TestNodeInstanceServer::changeAuxiliaryValues(const ChangeAuxiliaryComma
|
|||||||
|
|
||||||
void Qt5TestNodeInstanceServer::changeIds(const ChangeIdsCommand &command)
|
void Qt5TestNodeInstanceServer::changeIds(const ChangeIdsCommand &command)
|
||||||
{
|
{
|
||||||
foreach (const IdContainer &container, command.ids()) {
|
for (const IdContainer &container : command.ids) {
|
||||||
if (hasInstanceForId(container.instanceId()))
|
if (hasInstanceForId(container.instanceId()))
|
||||||
instanceForId(container.instanceId()).setId(container.id());
|
instanceForId(container.instanceId()).setId(container.id());
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,12 @@ Label {
|
|||||||
tooltip: "%1"
|
tooltip: "%1"
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
SecondColumnLayout {
|
||||||
text: backendValues.%2.valueToString
|
CheckBox {
|
||||||
backendValue: backendValues.%2
|
text: backendValues.%2.valueToString
|
||||||
|
backendValue: backendValues.%2
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,13 @@ Label {
|
|||||||
text: "%1"
|
text: "%1"
|
||||||
tooltip: "%1"
|
tooltip: "%1"
|
||||||
}
|
}
|
||||||
LineEdit {
|
|
||||||
backendValue: backendValues.%2
|
SecondColumnLayout {
|
||||||
Layout.fillWidth: true
|
LineEdit {
|
||||||
|
backendValue: backendValues.%2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,13 @@ Label {
|
|||||||
text: "%1"
|
text: "%1"
|
||||||
tooltip: "%1"
|
tooltip: "%1"
|
||||||
}
|
}
|
||||||
UrlChooser {
|
|
||||||
Layout.fillWidth: true
|
SecondColumnLayout {
|
||||||
backendValue: backendValues.%2
|
UrlChooser {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
backendValue: backendValues.%2
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
@@ -0,0 +1,31 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** 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 General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.0
|
||||||
|
import "../QtQuick" as Original
|
||||||
|
|
||||||
|
Original.ConnectionsSpecifics {
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,82 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** 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 General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.15
|
||||||
|
import HelperWidgets 2.0
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
Section {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
caption: qsTr("Connections")
|
||||||
|
|
||||||
|
SectionLayout {
|
||||||
|
Label {
|
||||||
|
text: qsTr("Enabled")
|
||||||
|
tooltip: qsTr("Sets whether the item accepts change events.")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
CheckBox {
|
||||||
|
text: backendValues.enabled.valueToString
|
||||||
|
backendValue: backendValues.enabled
|
||||||
|
implicitWidth: 180
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Ignore unknown signals")
|
||||||
|
tooltip: qsTr("A connection to a non-existent signal produces runtime errors. If this property is set to true, such errors are ignored")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
CheckBox {
|
||||||
|
text: backendValues.ignoreUnknownSignals.valueToString
|
||||||
|
backendValue: backendValues.ignoreUnknownSignals
|
||||||
|
implicitWidth: 180
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Target")
|
||||||
|
tooltip: qsTr("Sets the object that sends the signal.")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
ItemFilterComboBox {
|
||||||
|
typeFilter: "QtQuick.Item"
|
||||||
|
validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ }
|
||||||
|
backendValue: backendValues.target
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,81 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** 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 General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.15
|
||||||
|
import HelperWidgets 2.0
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
Section {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
caption: qsTr("State")
|
||||||
|
|
||||||
|
SectionLayout {
|
||||||
|
Label {
|
||||||
|
text: qsTr("When")
|
||||||
|
tooltip: qsTr("Sets when the state should be applied.")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
CheckBox {
|
||||||
|
text: backendValues.when.valueToString
|
||||||
|
backendValue: backendValues.when
|
||||||
|
implicitWidth: 180
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Name")
|
||||||
|
tooltip: qsTr("Holds the name of the state.")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
LineEdit {
|
||||||
|
backendValue: backendValues.name
|
||||||
|
Layout.fillWidth: true
|
||||||
|
showTranslateCheckBox: false
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Extend")
|
||||||
|
tooltip: qsTr("Holds the state that this state extends.")
|
||||||
|
}
|
||||||
|
SecondColumnLayout {
|
||||||
|
LineEdit {
|
||||||
|
backendValue: backendValues.extend
|
||||||
|
Layout.fillWidth: true
|
||||||
|
showTranslateCheckBox: false
|
||||||
|
}
|
||||||
|
ExpandingSpacer {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,229 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** 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 General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Layouts 1.0
|
||||||
|
import QtQuickDesignerTheme 1.0
|
||||||
|
import HelperWidgets 2.0
|
||||||
|
import StudioTheme 1.0 as StudioTheme
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: itemPane
|
||||||
|
width: 320
|
||||||
|
height: 400
|
||||||
|
color: Theme.qmlDesignerBackgroundColorDarkAlternate()
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: forceActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: rootColumn
|
||||||
|
y: -1
|
||||||
|
width: itemPane.width
|
||||||
|
Section {
|
||||||
|
caption: qsTr("Type")
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
SectionLayout {
|
||||||
|
Label {
|
||||||
|
text: qsTr("Type")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
z: 2
|
||||||
|
|
||||||
|
RoundedPanel {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: StudioTheme.Values.height
|
||||||
|
|
||||||
|
Label {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: StudioTheme.Values.inputHorizontalPadding
|
||||||
|
text: backendValues.className.value
|
||||||
|
}
|
||||||
|
ToolTipArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onDoubleClicked: {
|
||||||
|
typeLineEdit.text = backendValues.className.value
|
||||||
|
typeLineEdit.visible = ! typeLineEdit.visible
|
||||||
|
typeLineEdit.forceActiveFocus()
|
||||||
|
}
|
||||||
|
tooltip: qsTr("Change the type of this item.")
|
||||||
|
enabled: !modelNodeBackend.multiSelection
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpressionTextField {
|
||||||
|
z: 2
|
||||||
|
id: typeLineEdit
|
||||||
|
completeOnlyTypes: true
|
||||||
|
replaceCurrentTextByCompletion: true
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
showButtons: false
|
||||||
|
fixedSize: true
|
||||||
|
|
||||||
|
property bool blockEditingFinished: false
|
||||||
|
|
||||||
|
onEditingFinished: {
|
||||||
|
if (typeLineEdit.blockEditingFinished)
|
||||||
|
return
|
||||||
|
|
||||||
|
typeLineEdit.blockEditingFinished = true
|
||||||
|
|
||||||
|
if (typeLineEdit.visible)
|
||||||
|
changeTypeName(typeLineEdit.text.trim())
|
||||||
|
typeLineEdit.visible = false
|
||||||
|
|
||||||
|
typeLineEdit.blockEditingFinished = false
|
||||||
|
|
||||||
|
typeLineEdit.completionList.model = null
|
||||||
|
}
|
||||||
|
|
||||||
|
onRejected: {
|
||||||
|
typeLineEdit.visible = false
|
||||||
|
typeLineEdit.completionList.model = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: 20
|
||||||
|
Layout.preferredHeight: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("id")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
spacing: 2
|
||||||
|
LineEdit {
|
||||||
|
id: lineEdit
|
||||||
|
|
||||||
|
backendValue: backendValues.id
|
||||||
|
placeholderText: qsTr("id")
|
||||||
|
text: backendValues.id.value
|
||||||
|
Layout.fillWidth: true
|
||||||
|
width: 240
|
||||||
|
showTranslateCheckBox: false
|
||||||
|
showExtendedFunctionButton: false
|
||||||
|
enabled: !modelNodeBackend.multiSelection
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: aliasIndicator
|
||||||
|
color: "transparent"
|
||||||
|
border.color: "transparent"
|
||||||
|
implicitWidth: StudioTheme.Values.height
|
||||||
|
implicitHeight: StudioTheme.Values.height
|
||||||
|
z: 10
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: aliasIndicatorIcon
|
||||||
|
enabled: !modelNodeBackend.multiSelection
|
||||||
|
anchors.fill: parent
|
||||||
|
text: {
|
||||||
|
if (!aliasIndicatorIcon.enabled)
|
||||||
|
return StudioTheme.Constants.idAliasOff
|
||||||
|
|
||||||
|
return hasAliasExport ? StudioTheme.Constants.idAliasOn : StudioTheme.Constants.idAliasOff
|
||||||
|
}
|
||||||
|
color: {
|
||||||
|
if (!aliasIndicatorIcon.enabled)
|
||||||
|
return StudioTheme.Values.themeTextColorDisabled
|
||||||
|
|
||||||
|
return hasAliasExport ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor
|
||||||
|
}
|
||||||
|
font.family: StudioTheme.Constants.iconFont.family
|
||||||
|
font.pixelSize: Math.round(16 * StudioTheme.Values.scaleFactor)
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "hovered"
|
||||||
|
when: toolTipArea.containsMouse && aliasIndicatorIcon.enabled
|
||||||
|
PropertyChanges {
|
||||||
|
target: aliasIndicatorIcon
|
||||||
|
scale: 1.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTipArea {
|
||||||
|
id: toolTipArea
|
||||||
|
enabled: !modelNodeBackend.multiSelection
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: toogleExportAlias()
|
||||||
|
tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
height: 4
|
||||||
|
width: 4
|
||||||
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
Loader {
|
||||||
|
id: specificsTwo
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
visible: theSource !== ""
|
||||||
|
sourceComponent: specificQmlComponent
|
||||||
|
|
||||||
|
property string theSource: specificQmlData
|
||||||
|
|
||||||
|
onTheSourceChanged: {
|
||||||
|
active = false
|
||||||
|
active = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: specificsOne
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
source: specificsUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -40,6 +40,7 @@ StudioControls.TextField {
|
|||||||
translationIndicatorVisible: showTranslateCheckBox
|
translationIndicatorVisible: showTranslateCheckBox
|
||||||
|
|
||||||
property bool writeValueManually: false
|
property bool writeValueManually: false
|
||||||
|
property bool writeAsExpression: false
|
||||||
|
|
||||||
property bool __dirty: false
|
property bool __dirty: false
|
||||||
|
|
||||||
@@ -93,7 +94,10 @@ StudioControls.TextField {
|
|||||||
target: modelNodeBackend
|
target: modelNodeBackend
|
||||||
onSelectionToBeChanged: {
|
onSelectionToBeChanged: {
|
||||||
if (__dirty && !writeValueManually) {
|
if (__dirty && !writeValueManually) {
|
||||||
lineEdit.backendValue.value = text
|
if (writeAsExpression)
|
||||||
|
lineEdit.backendValue.expression = text
|
||||||
|
else
|
||||||
|
lineEdit.backendValue.value = text
|
||||||
} else if (__dirty) {
|
} else if (__dirty) {
|
||||||
commitData()
|
commitData()
|
||||||
}
|
}
|
||||||
@@ -112,8 +116,12 @@ StudioControls.TextField {
|
|||||||
if (backendValue.isTranslated) {
|
if (backendValue.isTranslated) {
|
||||||
setTranslateExpression()
|
setTranslateExpression()
|
||||||
} else {
|
} else {
|
||||||
if (lineEdit.backendValue.value !== text)
|
if (writeAsExpression) {
|
||||||
lineEdit.backendValue.value = text;
|
if (lineEdit.backendValue.expression !== text)
|
||||||
|
lineEdit.backendValue.expression = text
|
||||||
|
} else if (lineEdit.backendValue.value !== text) {
|
||||||
|
lineEdit.backendValue.value = text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
__dirty = false
|
__dirty = false
|
||||||
}
|
}
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
#ifndef SyntaxHighlighting_VERSION_H
|
#ifndef SyntaxHighlighting_VERSION_H
|
||||||
#define SyntaxHighlighting_VERSION_H
|
#define SyntaxHighlighting_VERSION_H
|
||||||
|
|
||||||
#define SyntaxHighlighting_VERSION_STRING "5.59.0"
|
#define SyntaxHighlighting_VERSION_STRING "5.73.0"
|
||||||
#define SyntaxHighlighting_VERSION_MAJOR 5
|
#define SyntaxHighlighting_VERSION_MAJOR 5
|
||||||
#define SyntaxHighlighting_VERSION_MINOR 59
|
#define SyntaxHighlighting_VERSION_MINOR 73
|
||||||
#define SyntaxHighlighting_VERSION_PATCH 0
|
#define SyntaxHighlighting_VERSION_PATCH 0
|
||||||
#define SyntaxHighlighting_VERSION ((5<<16)|(59<<8)|(0))
|
#define SyntaxHighlighting_VERSION ((5<<16)|(73<<8)|(0))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
namespace KSyntaxHighlighting {
|
namespace KSyntaxHighlighting {
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting", QtInfoMsg)
|
Q_LOGGING_CATEGORY(Log, "kf.syntaxhighlighting", QtInfoMsg)
|
||||||
#else
|
#else
|
||||||
Q_LOGGING_CATEGORY(Log, "org.kde.ksyntaxhighlighting")
|
Q_LOGGING_CATEGORY(Log, "kf.syntaxhighlighting")
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ static QString rectangleToString(const QRect &r)
|
|||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
QTextStream str(&result);
|
QTextStream str(&result);
|
||||||
str << r.width() << 'x' << r.height() << r.x() << r.y();
|
str << r.width() << 'x' << r.height();
|
||||||
if (r.x() >= 0)
|
if (r.x() >= 0)
|
||||||
str << '+';
|
str << '+';
|
||||||
str << r.x();
|
str << r.x();
|
||||||
|
@@ -118,6 +118,8 @@ AutotestPlugin::AutotestPlugin()
|
|||||||
qRegisterMetaType<TestResult>();
|
qRegisterMetaType<TestResult>();
|
||||||
qRegisterMetaType<TestTreeItem *>();
|
qRegisterMetaType<TestTreeItem *>();
|
||||||
qRegisterMetaType<TestCodeLocationAndType>();
|
qRegisterMetaType<TestCodeLocationAndType>();
|
||||||
|
// warm up meta type system to be able to read Qt::CheckState with persistent settings
|
||||||
|
qRegisterMetaType<Qt::CheckState>();
|
||||||
}
|
}
|
||||||
|
|
||||||
AutotestPlugin::~AutotestPlugin()
|
AutotestPlugin::~AutotestPlugin()
|
||||||
|
@@ -58,15 +58,15 @@ public:
|
|||||||
void clear() { m_cache.clear(); }
|
void clear() { m_cache.clear(); }
|
||||||
bool isEmpty() const { return m_cache.isEmpty(); }
|
bool isEmpty() const { return m_cache.isEmpty(); }
|
||||||
|
|
||||||
QVariantHash toSettings() const
|
QVariantMap toSettings() const
|
||||||
{
|
{
|
||||||
QVariantHash result;
|
QVariantMap result;
|
||||||
for (auto it = m_cache.cbegin(), end = m_cache.cend(); it != end; ++it)
|
for (auto it = m_cache.cbegin(), end = m_cache.cend(); it != end; ++it)
|
||||||
result.insert(it.key(), QVariant::fromValue(it.value().value));
|
result.insert(it.key(), QVariant::fromValue(it.value().value));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fromSettings(const QVariantHash &stored)
|
void fromSettings(const QVariantMap &stored)
|
||||||
{
|
{
|
||||||
m_cache.clear();
|
m_cache.clear();
|
||||||
for (auto it = stored.cbegin(), end = stored.cend(); it != end; ++it)
|
for (auto it = stored.cbegin(), end = stored.cend(); it != end; ++it)
|
||||||
|
@@ -94,7 +94,7 @@ void TestProjectSettings::load()
|
|||||||
const QVariant runAfterBuild = m_project->namedSettings(SK_RUN_AFTER_BUILD);
|
const QVariant runAfterBuild = m_project->namedSettings(SK_RUN_AFTER_BUILD);
|
||||||
m_runAfterBuild = runAfterBuild.isValid() ? RunAfterBuildMode(runAfterBuild.toInt())
|
m_runAfterBuild = runAfterBuild.isValid() ? RunAfterBuildMode(runAfterBuild.toInt())
|
||||||
: RunAfterBuildMode::None;
|
: RunAfterBuildMode::None;
|
||||||
m_checkStateCache.fromSettings(m_project->namedSettings(SK_CHECK_STATES).toHash());
|
m_checkStateCache.fromSettings(m_project->namedSettings(SK_CHECK_STATES).toMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestProjectSettings::save()
|
void TestProjectSettings::save()
|
||||||
@@ -106,8 +106,7 @@ void TestProjectSettings::save()
|
|||||||
activeFrameworks.insert(it.key()->id().toString(), it.value());
|
activeFrameworks.insert(it.key()->id().toString(), it.value());
|
||||||
m_project->setNamedSettings(SK_ACTIVE_FRAMEWORKS, activeFrameworks);
|
m_project->setNamedSettings(SK_ACTIVE_FRAMEWORKS, activeFrameworks);
|
||||||
m_project->setNamedSettings(SK_RUN_AFTER_BUILD, int(m_runAfterBuild));
|
m_project->setNamedSettings(SK_RUN_AFTER_BUILD, int(m_runAfterBuild));
|
||||||
if (!m_checkStateCache.isEmpty())
|
m_project->setNamedSettings(SK_CHECK_STATES, m_checkStateCache.toSettings());
|
||||||
m_project->setNamedSettings(SK_CHECK_STATES, m_checkStateCache.toSettings());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -262,8 +262,10 @@ QList<void *> CMakeProjectImporter::examineDirectory(const Utils::FilePath &impo
|
|||||||
qCDebug(cmInputLog) << "Failed to read configuration from" << cacheFile << errorMessage;
|
qCDebug(cmInputLog) << "Failed to read configuration from" << cacheFile << errorMessage;
|
||||||
return { };
|
return { };
|
||||||
}
|
}
|
||||||
const auto homeDir
|
const auto homeDir = Utils::FilePath::fromUserInput(
|
||||||
= Utils::FilePath::fromUserInput(QString::fromUtf8(CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", config)));
|
QString::fromUtf8(
|
||||||
|
CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", config)))
|
||||||
|
.canonicalPath();
|
||||||
const Utils::FilePath canonicalProjectDirectory = projectDirectory().canonicalPath();
|
const Utils::FilePath canonicalProjectDirectory = projectDirectory().canonicalPath();
|
||||||
if (homeDir != canonicalProjectDirectory) {
|
if (homeDir != canonicalProjectDirectory) {
|
||||||
qCDebug(cmInputLog) << "Wrong source directory:" << homeDir.toUserOutput()
|
qCDebug(cmInputLog) << "Wrong source directory:" << homeDir.toUserOutput()
|
||||||
|
@@ -193,3 +193,13 @@ extend_qtc_plugin(Core
|
|||||||
SOURCES
|
SOURCES
|
||||||
locator/javascriptfilter.cpp locator/javascriptfilter.h
|
locator/javascriptfilter.cpp locator/javascriptfilter.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ((NOT WIN32) AND (NOT APPLE))
|
||||||
|
# install logo
|
||||||
|
foreach(size 16 24 32 48 64 128 256 512)
|
||||||
|
install(
|
||||||
|
FILES images/logo/${size}/QtProject-qtcreator.png
|
||||||
|
DESTINATION share/icons/hicolor/${size}x${size}/apps
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
@@ -557,7 +557,9 @@ void VariableChooserPrivate::updatePositionAndShow(bool)
|
|||||||
|
|
||||||
void VariableChooserPrivate::updateFilter(const QString &filterText)
|
void VariableChooserPrivate::updateFilter(const QString &filterText)
|
||||||
{
|
{
|
||||||
m_sortModel->setFilterRegularExpression(QRegularExpression::wildcardToRegularExpression(filterText));
|
const QString pattern = QRegularExpression::escape(filterText);
|
||||||
|
m_sortModel->setFilterRegularExpression(
|
||||||
|
QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
|
||||||
m_variableTree->expandAll();
|
m_variableTree->expandAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,7 +67,16 @@ WindowSupport::WindowSupport(QWidget *window, const Context &context)
|
|||||||
|
|
||||||
m_zoomAction = new QAction(this);
|
m_zoomAction = new QAction(this);
|
||||||
ActionManager::registerAction(m_zoomAction, Constants::ZOOM_WINDOW, context);
|
ActionManager::registerAction(m_zoomAction, Constants::ZOOM_WINDOW, context);
|
||||||
connect(m_zoomAction, &QAction::triggered, m_window, &QWidget::showMaximized);
|
connect(m_zoomAction, &QAction::triggered, m_window, [this] {
|
||||||
|
if (m_window->isMaximized()) {
|
||||||
|
// similar to QWidget::showMaximized
|
||||||
|
m_window->ensurePolished();
|
||||||
|
m_window->setWindowState(m_window->windowState() & ~Qt::WindowMaximized);
|
||||||
|
m_window->setVisible(true);
|
||||||
|
} else {
|
||||||
|
m_window->showMaximized();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
m_closeAction = new QAction(this);
|
m_closeAction = new QAction(this);
|
||||||
ActionManager::registerAction(m_closeAction, Constants::CLOSE_WINDOW, context);
|
ActionManager::registerAction(m_closeAction, Constants::CLOSE_WINDOW, context);
|
||||||
|
@@ -397,6 +397,8 @@ void CdbEngine::setupEngine()
|
|||||||
|
|
||||||
debugger.addArgs({"-y", QChar('"') + stringListSetting(CdbSymbolPaths).join(';') + '"'});
|
debugger.addArgs({"-y", QChar('"') + stringListSetting(CdbSymbolPaths).join(';') + '"'});
|
||||||
|
|
||||||
|
debugger.addArgs(expand(stringSetting(CdbAdditionalArguments)), CommandLine::Raw);
|
||||||
|
|
||||||
switch (sp.startMode) {
|
switch (sp.startMode) {
|
||||||
case StartInternal:
|
case StartInternal:
|
||||||
case StartExternal:
|
case StartExternal:
|
||||||
|
@@ -297,7 +297,7 @@ public:
|
|||||||
|
|
||||||
void saveGeometry()
|
void saveGeometry()
|
||||||
{
|
{
|
||||||
SessionManager::setValue("DebuggerSeparateWidgetGeometry", geometry());
|
SessionManager::setValue("DebuggerSeparateWidgetGeometry", QVariant(geometry()));
|
||||||
}
|
}
|
||||||
|
|
||||||
~SeparatedView() override
|
~SeparatedView() override
|
||||||
|
@@ -8,8 +8,6 @@
|
|||||||
<file>wizards/icon@2x.png</file>
|
<file>wizards/icon@2x.png</file>
|
||||||
<file>wizards/application/CMakeLists.txt</file>
|
<file>wizards/application/CMakeLists.txt</file>
|
||||||
<file>wizards/application/project.qmlproject.tpl</file>
|
<file>wizards/application/project.qmlproject.tpl</file>
|
||||||
<file>wizards/application/BareMetal/main.cpp.tpl</file>
|
|
||||||
<file>wizards/application/FreeRTOS/main.cpp.tpl</file>
|
|
||||||
<file>wizards/application/main.qml.tpl</file>
|
<file>wizards/application/main.qml.tpl</file>
|
||||||
<file>wizards/application/wizard.json</file>
|
<file>wizards/application/wizard.json</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
@@ -607,7 +607,9 @@ static void setKitCMakeOptions(ProjectExplorer::Kit *k, const McuTarget* mcuTarg
|
|||||||
(qulDir + "/lib/cmake/Qul/QulGenerators.cmake").toUtf8()));
|
(qulDir + "/lib/cmake/Qul/QulGenerators.cmake").toUtf8()));
|
||||||
config.append(CMakeConfigItem("QUL_PLATFORM",
|
config.append(CMakeConfigItem("QUL_PLATFORM",
|
||||||
mcuTarget->qulPlatform().toUtf8()));
|
mcuTarget->qulPlatform().toUtf8()));
|
||||||
if (mcuTarget->os() == McuTarget::OS::FreeRTOS)
|
|
||||||
|
if (mcuTarget->qulVersion() <= QVersionNumber{1,3} // OS variable was removed in Qul 1.4
|
||||||
|
&& mcuTarget->os() == McuTarget::OS::FreeRTOS)
|
||||||
config.append(CMakeConfigItem("OS", "FreeRTOS"));
|
config.append(CMakeConfigItem("OS", "FreeRTOS"));
|
||||||
if (mcuTarget->colorDepth() >= 0)
|
if (mcuTarget->colorDepth() >= 0)
|
||||||
config.append(CMakeConfigItem("QUL_COLOR_DEPTH",
|
config.append(CMakeConfigItem("QUL_COLOR_DEPTH",
|
||||||
@@ -627,8 +629,12 @@ static void setKitQtVersionOptions(ProjectExplorer::Kit *k)
|
|||||||
|
|
||||||
QString McuSupportOptions::kitName(const McuTarget *mcuTarget)
|
QString McuSupportOptions::kitName(const McuTarget *mcuTarget)
|
||||||
{
|
{
|
||||||
const QString os = QLatin1String(mcuTarget->os()
|
QString os;
|
||||||
== McuTarget::OS::FreeRTOS ? " FreeRTOS" : "");
|
if (mcuTarget->qulVersion() <= QVersionNumber{1,3} && mcuTarget->os() == McuTarget::OS::FreeRTOS) {
|
||||||
|
// Starting from Qul 1.4 each OS is a separate platform
|
||||||
|
os = QLatin1String(" FreeRTOS");
|
||||||
|
}
|
||||||
|
|
||||||
const QString colorDepth = mcuTarget->colorDepth() > 0
|
const QString colorDepth = mcuTarget->colorDepth() > 0
|
||||||
? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth())
|
? QString::fromLatin1(" %1bpp").arg(mcuTarget->colorDepth())
|
||||||
: "";
|
: "";
|
||||||
@@ -637,8 +643,12 @@ QString McuSupportOptions::kitName(const McuTarget *mcuTarget)
|
|||||||
mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop
|
mcuTarget->toolChainPackage()->type() == McuToolChainPackage::TypeDesktop
|
||||||
? "Desktop"
|
? "Desktop"
|
||||||
: mcuTarget->qulPlatform();
|
: mcuTarget->qulPlatform();
|
||||||
return QString::fromLatin1("Qt for MCUs %1 - %2%3%4")
|
return QString::fromLatin1("Qt for MCUs %1.%2 - %3%4%5")
|
||||||
.arg(mcuTarget->qulVersion().toString(), targetName, os, colorDepth);
|
.arg(QString::number(mcuTarget->qulVersion().majorVersion()),
|
||||||
|
QString::number(mcuTarget->qulVersion().minorVersion()),
|
||||||
|
targetName,
|
||||||
|
os,
|
||||||
|
colorDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTarget)
|
QList<ProjectExplorer::Kit *> McuSupportOptions::existingKits(const McuTarget *mcuTarget)
|
||||||
|
@@ -150,7 +150,6 @@ static McuPackage *createRGLPackage()
|
|||||||
|
|
||||||
static McuPackage *createStm32CubeProgrammerPackage()
|
static McuPackage *createStm32CubeProgrammerPackage()
|
||||||
{
|
{
|
||||||
|
|
||||||
QString defaultPath = QDir::homePath();
|
QString defaultPath = QDir::homePath();
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||||
const QString programPath =
|
const QString programPath =
|
||||||
@@ -202,20 +201,52 @@ static McuPackage *createMcuXpressoIdePackage()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static McuPackage *createBoardSdkPackage(const QString &envVar)
|
struct McuTargetDescription
|
||||||
{
|
{
|
||||||
const QString envVarPrefix = envVar.chopped(strlen("_SDK_PATH"));
|
QString qulVersion;
|
||||||
|
QString platform;
|
||||||
|
QString platformVendor;
|
||||||
|
QVector<int> colorDepths;
|
||||||
|
QString toolchainId;
|
||||||
|
QString boardSdkEnvVar;
|
||||||
|
QString boardSdkName;
|
||||||
|
QString boardSdkDefaultPath;
|
||||||
|
QString freeRTOSEnvVar;
|
||||||
|
QString freeRTOSBoardSdkSubDir;
|
||||||
|
};
|
||||||
|
|
||||||
const QString defaultPath =
|
static McuPackage *createBoardSdkPackage(const McuTargetDescription& desc)
|
||||||
qEnvironmentVariableIsSet(envVar.toLatin1()) ?
|
{
|
||||||
qEnvironmentVariable(envVar.toLatin1()) : QDir::homePath();
|
const auto generateSdkName = [](const QString& envVar) {
|
||||||
|
auto postfixPos = envVar.indexOf("_SDK_PATH");
|
||||||
|
if (postfixPos < 0) {
|
||||||
|
postfixPos = envVar.indexOf("_DIR");
|
||||||
|
}
|
||||||
|
auto sdkName = postfixPos > 0 ? envVar.left(postfixPos) : envVar;
|
||||||
|
return QString::fromLatin1("MCU SDK (%1)").arg(sdkName);
|
||||||
|
};
|
||||||
|
const QString sdkName = desc.boardSdkName.isEmpty() ? generateSdkName(desc.boardSdkEnvVar) : desc.boardSdkName;
|
||||||
|
|
||||||
|
const QString defaultPath = [&] {
|
||||||
|
const auto envVar = desc.boardSdkEnvVar.toLatin1();
|
||||||
|
if (qEnvironmentVariableIsSet(envVar)) {
|
||||||
|
return qEnvironmentVariable(envVar);
|
||||||
|
}
|
||||||
|
if (!desc.boardSdkDefaultPath.isEmpty()) {
|
||||||
|
QString defaultPath = QDir::rootPath() + desc.boardSdkDefaultPath;
|
||||||
|
if (QFileInfo::exists(defaultPath)) {
|
||||||
|
return defaultPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QDir::homePath();
|
||||||
|
}();
|
||||||
|
|
||||||
auto result = new McuPackage(
|
auto result = new McuPackage(
|
||||||
QString::fromLatin1("MCU SDK (%1)").arg(envVarPrefix),
|
sdkName,
|
||||||
defaultPath,
|
defaultPath,
|
||||||
{},
|
{},
|
||||||
envVar);
|
desc.boardSdkEnvVar);
|
||||||
result->setEnvironmentVariableName(envVar);
|
result->setEnvironmentVariableName(desc.boardSdkEnvVar);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,56 +273,54 @@ static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar, const QSt
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct McuTargetDescription
|
struct McuTargetFactory
|
||||||
{
|
{
|
||||||
QString qulVersion;
|
McuTargetFactory(const QHash<QString, McuToolChainPackage *> &tcPkgs,
|
||||||
QString platform;
|
const QHash<QString, McuPackage *> &vendorPkgs)
|
||||||
QString platformVendor;
|
: tcPkgs(tcPkgs)
|
||||||
QVector<int> colorDepths;
|
, vendorPkgs(vendorPkgs)
|
||||||
QString toolchainId;
|
{}
|
||||||
QString boardSdkEnvVar;
|
|
||||||
QString freeRTOSEnvVar;
|
|
||||||
QString freeRTOSBoardSdkSubDir;
|
|
||||||
};
|
|
||||||
|
|
||||||
static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescription> &descriptions,
|
QVector<McuTarget *> createTargets(const McuTargetDescription& description)
|
||||||
QVector<McuPackage *> *packages)
|
{
|
||||||
{
|
if (description.toolchainId == "desktop") {
|
||||||
const QHash<QString, McuToolChainPackage *> tcPkgs = {
|
return createDesktopTargets(description);
|
||||||
{{"armgcc"}, createArmGccPackage()},
|
|
||||||
{{"greenhills"}, createGhsToolchainPackage()},
|
|
||||||
{{"desktop"}, createDesktopToolChainPackage()},
|
|
||||||
};
|
|
||||||
|
|
||||||
const QHash<QString, McuPackage *> vendorPkgs = {
|
|
||||||
{{"ST"}, createStm32CubeProgrammerPackage()},
|
|
||||||
{{"NXP"}, createMcuXpressoIdePackage()},
|
|
||||||
{{"Renesas"}, createRGLPackage()}
|
|
||||||
};
|
|
||||||
|
|
||||||
QHash<QString, McuPackage *> boardSdkPkgs;
|
|
||||||
QHash<QString, McuPackage *> freeRTOSPkgs;
|
|
||||||
QVector<McuTarget *> mcuTargets;
|
|
||||||
|
|
||||||
for (const auto &desc : descriptions) {
|
|
||||||
McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId);
|
|
||||||
if (desc.toolchainId == "desktop") {
|
|
||||||
auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion),
|
|
||||||
desc.platformVendor, desc.platform,
|
|
||||||
McuTarget::OS::Desktop, {}, tcPkg);
|
|
||||||
mcuTargets.append(mcuTarget);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
auto qulVersion = QVersionNumber::fromString(description.qulVersion);
|
||||||
|
if (qulVersion <= QVersionNumber({1,3})) {
|
||||||
|
// There was a platform backends related refactoring in Qul 1.4
|
||||||
|
// This requires different processing of McuTargetDescriptions
|
||||||
|
return createMcuTargetsLegacy(description);
|
||||||
|
}
|
||||||
|
return createMcuTargets(description);
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<McuPackage *> getMcuPackages() const
|
||||||
|
{
|
||||||
|
QVector<McuPackage *> packages;
|
||||||
|
packages.append(boardSdkPkgs.values().toVector());
|
||||||
|
packages.append(freeRTOSPkgs.values().toVector());
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Implementation for Qul version <= 1.3
|
||||||
|
QVector<McuTarget *> createMcuTargetsLegacy(const McuTargetDescription& desc)
|
||||||
|
{
|
||||||
|
QVector<McuTarget *> mcuTargets;
|
||||||
|
auto tcPkg = tcPkgs.value(desc.toolchainId);
|
||||||
for (auto os : {McuTarget::OS::BareMetal, McuTarget::OS::FreeRTOS}) {
|
for (auto os : {McuTarget::OS::BareMetal, McuTarget::OS::FreeRTOS}) {
|
||||||
for (int colorDepth : desc.colorDepths) {
|
for (int colorDepth : desc.colorDepths) {
|
||||||
QVector<McuPackage*> required3rdPartyPkgs = {
|
QVector<McuPackage*> required3rdPartyPkgs = { tcPkg };
|
||||||
vendorPkgs.value(desc.platformVendor), tcPkg
|
if (vendorPkgs.contains(desc.platformVendor)) {
|
||||||
};
|
required3rdPartyPkgs.push_back(vendorPkgs.value(desc.platformVendor));
|
||||||
|
}
|
||||||
QString boardSdkDefaultPath;
|
QString boardSdkDefaultPath;
|
||||||
if (!desc.boardSdkEnvVar.isEmpty()
|
if (!desc.boardSdkEnvVar.isEmpty()) {
|
||||||
&& desc.boardSdkEnvVar != "RGL_DIR") { // Already included in vendorPkgs
|
|
||||||
if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) {
|
if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) {
|
||||||
auto boardSdkPkg = createBoardSdkPackage(desc.boardSdkEnvVar);
|
auto boardSdkPkg = desc.boardSdkEnvVar != "RGL_DIR"
|
||||||
|
? createBoardSdkPackage(desc)
|
||||||
|
: createRGLPackage();
|
||||||
boardSdkPkgs.insert(desc.boardSdkEnvVar, boardSdkPkg);
|
boardSdkPkgs.insert(desc.boardSdkEnvVar, boardSdkPkg);
|
||||||
}
|
}
|
||||||
auto boardSdkPkg = boardSdkPkgs.value(desc.boardSdkEnvVar);
|
auto boardSdkPkg = boardSdkPkgs.value(desc.boardSdkEnvVar);
|
||||||
@@ -319,13 +348,92 @@ static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescrip
|
|||||||
mcuTargets.append(mcuTarget);
|
mcuTargets.append(mcuTarget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return mcuTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<McuTarget *> createMcuTargets(const McuTargetDescription& desc)
|
||||||
|
{
|
||||||
|
QVector<McuTarget *> mcuTargets;
|
||||||
|
auto tcPkg = tcPkgs.value(desc.toolchainId);
|
||||||
|
for (int colorDepth : desc.colorDepths) {
|
||||||
|
QVector<McuPackage*> required3rdPartyPkgs = { tcPkg };
|
||||||
|
if (vendorPkgs.contains(desc.platformVendor)) {
|
||||||
|
required3rdPartyPkgs.push_back(vendorPkgs.value(desc.platformVendor));
|
||||||
|
}
|
||||||
|
QString boardSdkDefaultPath;
|
||||||
|
if (!desc.boardSdkEnvVar.isEmpty()) {
|
||||||
|
if (!boardSdkPkgs.contains(desc.boardSdkEnvVar)) {
|
||||||
|
auto boardSdkPkg = createBoardSdkPackage(desc);
|
||||||
|
boardSdkPkgs.insert(desc.boardSdkEnvVar, boardSdkPkg);
|
||||||
|
}
|
||||||
|
auto boardSdkPkg = boardSdkPkgs.value(desc.boardSdkEnvVar);
|
||||||
|
boardSdkDefaultPath = boardSdkPkg->defaultPath();
|
||||||
|
required3rdPartyPkgs.append(boardSdkPkg);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto os = McuTarget::OS::BareMetal;
|
||||||
|
if (!desc.freeRTOSEnvVar.isEmpty()) {
|
||||||
|
os = McuTarget::OS::FreeRTOS;
|
||||||
|
if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) {
|
||||||
|
freeRTOSPkgs.insert(desc.freeRTOSEnvVar, createFreeRTOSSourcesPackage(
|
||||||
|
desc.freeRTOSEnvVar, boardSdkDefaultPath,
|
||||||
|
desc.freeRTOSBoardSdkSubDir));
|
||||||
|
}
|
||||||
|
required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar));
|
||||||
|
}
|
||||||
|
|
||||||
|
auto mcuTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion),
|
||||||
|
desc.platformVendor, desc.platform, os,
|
||||||
|
required3rdPartyPkgs, tcPkg);
|
||||||
|
mcuTarget->setColorDepth(colorDepth);
|
||||||
|
mcuTargets.append(mcuTarget);
|
||||||
|
}
|
||||||
|
return mcuTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<McuTarget *> createDesktopTargets(const McuTargetDescription& desc)
|
||||||
|
{
|
||||||
|
auto tcPkg = tcPkgs.value(desc.toolchainId);
|
||||||
|
auto desktopTarget = new McuTarget(QVersionNumber::fromString(desc.qulVersion),
|
||||||
|
desc.platformVendor, desc.platform,
|
||||||
|
McuTarget::OS::Desktop, {}, tcPkg);
|
||||||
|
return { desktopTarget };
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const QHash<QString, McuToolChainPackage *> &tcPkgs;
|
||||||
|
const QHash<QString, McuPackage *> &vendorPkgs;
|
||||||
|
|
||||||
|
QHash<QString, McuPackage *> boardSdkPkgs;
|
||||||
|
QHash<QString, McuPackage *> freeRTOSPkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescription> &descriptions,
|
||||||
|
QVector<McuPackage *> *packages)
|
||||||
|
{
|
||||||
|
const QHash<QString, McuToolChainPackage *> tcPkgs = {
|
||||||
|
{{"armgcc"}, createArmGccPackage()},
|
||||||
|
{{"greenhills"}, createGhsToolchainPackage()},
|
||||||
|
{{"desktop"}, createDesktopToolChainPackage()},
|
||||||
|
};
|
||||||
|
|
||||||
|
const QHash<QString, McuPackage *> vendorPkgs = {
|
||||||
|
{{"ST"}, createStm32CubeProgrammerPackage()},
|
||||||
|
{{"NXP"}, createMcuXpressoIdePackage()},
|
||||||
|
};
|
||||||
|
|
||||||
|
McuTargetFactory targetFactory(tcPkgs, vendorPkgs);
|
||||||
|
QVector<McuTarget *> mcuTargets;
|
||||||
|
|
||||||
|
for (const auto &desc : descriptions) {
|
||||||
|
auto newTargets = targetFactory.createTargets(desc);
|
||||||
|
mcuTargets.append(newTargets);
|
||||||
}
|
}
|
||||||
|
|
||||||
packages->append(Utils::transform<QVector<McuPackage *> >(
|
packages->append(Utils::transform<QVector<McuPackage *> >(
|
||||||
tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; }));
|
tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; }));
|
||||||
packages->append(vendorPkgs.values().toVector());
|
packages->append(vendorPkgs.values().toVector());
|
||||||
packages->append(boardSdkPkgs.values().toVector());
|
packages->append(targetFactory.getMcuPackages());
|
||||||
packages->append(freeRTOSPkgs.values().toVector());
|
|
||||||
|
|
||||||
return mcuTargets;
|
return mcuTargets;
|
||||||
}
|
}
|
||||||
@@ -357,6 +465,8 @@ static McuTargetDescription parseDescriptionJson(const QByteArray &data)
|
|||||||
colorDepthsVector,
|
colorDepthsVector,
|
||||||
toolchain.value("id").toString(),
|
toolchain.value("id").toString(),
|
||||||
boardSdk.value("envVar").toString(),
|
boardSdk.value("envVar").toString(),
|
||||||
|
boardSdk.value("name").toString(),
|
||||||
|
boardSdk.value("defaultPath").toString(),
|
||||||
freeRTOS.value("envVar").toString(),
|
freeRTOS.value("envVar").toString(),
|
||||||
freeRTOS.value("boardSdkSubDir").toString()
|
freeRTOS.value("boardSdkSubDir").toString()
|
||||||
};
|
};
|
||||||
@@ -378,11 +488,21 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for missing JSON file for Desktop target:
|
// Workaround for missing JSON file for Desktop target:
|
||||||
if (dir.pathAppended("/lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib").exists()) {
|
Utils::FilePath desktopLib;
|
||||||
const QString qulVersion = descriptions.empty() ?
|
if (Utils::HostOsInfo::isWindowsHost())
|
||||||
|
desktopLib = dir / "lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib";
|
||||||
|
else
|
||||||
|
desktopLib = dir / "lib/libQulQuickUltralite_QT_32bpp_Linux_Debug.a";
|
||||||
|
|
||||||
|
if (desktopLib.exists()) {
|
||||||
|
McuTargetDescription desktopDescription;
|
||||||
|
desktopDescription.qulVersion = descriptions.empty() ?
|
||||||
McuSupportOptions::minimalQulVersion().toString()
|
McuSupportOptions::minimalQulVersion().toString()
|
||||||
: descriptions.first().qulVersion;
|
: descriptions.first().qulVersion;
|
||||||
descriptions.prepend({qulVersion, {"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}, {}});
|
desktopDescription.platform = desktopDescription.platformVendor = "Qt";
|
||||||
|
desktopDescription.colorDepths = {32};
|
||||||
|
desktopDescription.toolchainId = "desktop";
|
||||||
|
descriptions.prepend(desktopDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
|
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
#include "%{ProjectName}.h"
|
|
||||||
|
|
||||||
#include <qul/application.h>
|
|
||||||
#include <qul/qul.h>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
Qul::initPlatform();
|
|
||||||
Qul::Application app;
|
|
||||||
static %{ProjectName} item;
|
|
||||||
app.setRootItem(&item);
|
|
||||||
app.exec();
|
|
||||||
return 0;
|
|
||||||
}
|
|