2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2022-05-06 09:52:21 +03:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
|
|
|
|
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
|
|
|
|
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
|
|
|
|
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
|
|
|
|
*/
|
2022-06-20 23:51:16 +02:00
|
|
|
|
2022-05-06 09:52:21 +03:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
2022-06-20 23:51:16 +02:00
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
import LandingPageApi
|
|
|
|
|
import LandingPage as Theme
|
2022-05-06 09:52:21 +03:00
|
|
|
|
|
|
|
|
Rectangle {
|
2022-06-20 23:51:16 +02:00
|
|
|
id: root
|
|
|
|
|
|
2022-05-06 09:52:21 +03:00
|
|
|
property bool qdsInstalled: qdsVersionText.text.length > 0
|
|
|
|
|
property bool projectFileExists: false
|
2023-02-10 16:15:49 +01:00
|
|
|
property string qtVersion: qsTranslate("QtC::QmlProjectManager", "Unknown")
|
|
|
|
|
property string qdsVersion: qsTranslate("QtC::QmlProjectManager", "Unknown")
|
2022-05-06 09:52:21 +03:00
|
|
|
property alias generateProjectFileButton: generateProjectFileButton
|
|
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
color: Theme.Colors.backgroundSecondary
|
|
|
|
|
height: column.childrenRect.height + (2 * Theme.Values.spacing)
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
target: generateProjectFileButton
|
|
|
|
|
function onClicked() { LandingPageApi.generateProjectFile() }
|
|
|
|
|
}
|
2022-05-06 09:52:21 +03:00
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
Column {
|
|
|
|
|
id: column
|
|
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
spacing: Theme.Values.spacing
|
|
|
|
|
|
|
|
|
|
PageText {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: projectFileInfoTitle
|
2022-06-20 23:51:16 +02:00
|
|
|
width: parent.width
|
2023-02-10 16:15:49 +01:00
|
|
|
text: qsTranslate("QtC::QmlProjectManager", "QML PROJECT FILE INFO")
|
2022-05-06 09:52:21 +03:00
|
|
|
}
|
|
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
Column {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: projectFileInfoVersionBox
|
|
|
|
|
width: parent.width
|
2022-06-20 23:51:16 +02:00
|
|
|
visible: root.projectFileExists
|
2022-05-06 09:52:21 +03:00
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
PageText {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: qtVersionText
|
2022-06-20 23:51:16 +02:00
|
|
|
width: parent.width
|
|
|
|
|
padding: Theme.Values.spacing
|
2023-02-10 16:15:49 +01:00
|
|
|
text: qsTranslate("QtC::QmlProjectManager", "Qt Version - ") + root.qtVersion
|
2022-05-06 09:52:21 +03:00
|
|
|
}
|
|
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
PageText {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: qdsVersionText
|
2022-06-20 23:51:16 +02:00
|
|
|
width: parent.width
|
|
|
|
|
padding: Theme.Values.spacing
|
2023-02-10 16:15:49 +01:00
|
|
|
text: qsTranslate("QtC::QmlProjectManager", "Qt Design Studio Version - ") + root.qdsVersion
|
2022-05-06 09:52:21 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
Column {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: projectFileInfoMissingBox
|
|
|
|
|
width: parent.width
|
|
|
|
|
visible: !projectFileInfoVersionBox.visible
|
|
|
|
|
|
2022-06-20 23:51:16 +02:00
|
|
|
PageText {
|
2022-05-06 09:52:21 +03:00
|
|
|
id: projectFileInfoMissingText
|
2022-06-20 23:51:16 +02:00
|
|
|
width: parent.width
|
|
|
|
|
padding: Theme.Values.spacing
|
2023-02-10 16:15:49 +01:00
|
|
|
text: qsTranslate("QtC::QmlProjectManager", "No QML project file found - Would you like to create one?")
|
2022-05-06 09:52:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PushButton {
|
|
|
|
|
id: generateProjectFileButton
|
2023-02-10 16:15:49 +01:00
|
|
|
text: qsTranslate("QtC::QmlProjectManager", "Generate")
|
2022-05-06 09:52:21 +03:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|