2020-02-12 16:03:19 +01:00
|
|
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
|
|
|
*
|
|
|
|
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
2020-04-01 16:19:00 +02:00
|
|
|
* Copyright 2020, Anke Boersma <demm@kaosx.us>
|
2020-02-12 16:03:19 +01:00
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Calamares is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-04-20 15:00:04 +02:00
|
|
|
import io.calamares.core 1.0
|
2020-03-18 11:12:15 +01:00
|
|
|
import io.calamares.ui 1.0
|
2019-12-14 18:14:35 +01:00
|
|
|
|
|
|
|
import QtQuick 2.10
|
|
|
|
import QtQuick.Controls 2.10
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import org.kde.kirigami 2.7 as Kirigami
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import QtQuick.Window 2.3
|
|
|
|
|
2020-02-12 15:08:18 +01:00
|
|
|
Page
|
2019-12-14 18:14:35 +01:00
|
|
|
{
|
2020-02-12 16:03:19 +01:00
|
|
|
id: welcome
|
2019-12-14 18:14:35 +01:00
|
|
|
|
2020-04-20 15:00:04 +02:00
|
|
|
header: Item {
|
2020-02-12 16:03:19 +01:00
|
|
|
width: parent.width
|
2020-03-30 21:21:36 +02:00
|
|
|
height: parent.height
|
2020-04-01 16:21:43 +02:00
|
|
|
|
2020-04-20 15:00:04 +02:00
|
|
|
Text {
|
2020-02-12 16:03:19 +01:00
|
|
|
id: welcomeTopText
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
2020-04-20 15:00:04 +02:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
padding: 40
|
2020-02-12 16:03:19 +01:00
|
|
|
// In QML, QString::arg() only takes one argument
|
2020-04-20 15:00:04 +02:00
|
|
|
text: qsTr("<h3>Welcome to the %1 <quote>%2</quote> installer</h3>
|
|
|
|
<p>This program will ask you some questions and set up %1 on your computer.</p>").arg(Branding.string(Branding.ProductName)).arg(Branding.string(Branding.Version))
|
2020-02-12 16:03:19 +01:00
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
Image {
|
2020-02-12 16:03:19 +01:00
|
|
|
id: welcomeImage
|
|
|
|
anchors.centerIn: parent
|
|
|
|
// imagePath() returns a full pathname, so make it refer to the filesystem
|
|
|
|
// .. otherwise the path is interpreted relative to the "call site", which
|
|
|
|
// .. might be the QRC file.
|
|
|
|
source: "file:/" + Branding.imagePath(Branding.ProductWelcome)
|
|
|
|
sourceSize.width: width
|
|
|
|
sourceSize.height: height
|
2020-03-30 21:21:36 +02:00
|
|
|
fillMode: Image.PreserveAspectFit
|
2020-02-12 16:03:19 +01:00
|
|
|
}
|
2020-02-12 18:24:07 +01:00
|
|
|
|
2020-04-20 15:00:04 +02:00
|
|
|
RowLayout {
|
2020-02-12 18:24:07 +01:00
|
|
|
id: buttonBar
|
2020-04-20 15:00:04 +02:00
|
|
|
width: parent.width / 1.5
|
2020-02-12 18:24:07 +01:00
|
|
|
height: 64
|
|
|
|
|
|
|
|
anchors.bottom: parent.bottom
|
2020-04-20 15:00:04 +02:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-02-12 18:24:07 +01:00
|
|
|
|
|
|
|
spacing: Kirigami.Units.largeSpacing* 2
|
|
|
|
|
2020-04-20 15:00:04 +02:00
|
|
|
Button {
|
2020-02-12 18:24:07 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("About")
|
2020-03-30 21:21:36 +02:00
|
|
|
icon.name: "dialog-information"
|
2020-02-12 18:24:07 +01:00
|
|
|
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
2020-03-30 21:21:36 +02:00
|
|
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
2020-04-01 16:19:00 +02:00
|
|
|
|
2020-04-20 15:00:04 +02:00
|
|
|
visible: true
|
2020-04-01 16:19:00 +02:00
|
|
|
onClicked: {
|
2020-04-20 15:00:04 +02:00
|
|
|
//onClicked: load.source = "file:/usr/share/calamares/branding/default/show.qml"
|
2020-04-01 16:19:00 +02:00
|
|
|
onClicked: load.source = "about.qml"
|
|
|
|
}
|
2020-02-12 18:24:07 +01:00
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
|
|
|
|
Button {
|
2020-02-12 18:24:07 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("Support")
|
2020-03-30 21:21:36 +02:00
|
|
|
icon.name: "system-help"
|
2020-02-12 18:24:07 +01:00
|
|
|
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
2020-03-30 21:21:36 +02:00
|
|
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
2020-02-12 18:24:07 +01:00
|
|
|
|
2020-04-02 20:16:05 +02:00
|
|
|
visible: config.supportUrl !== ""
|
|
|
|
onClicked: Qt.openUrlExternally(config.supportUrl)
|
2020-02-12 18:24:07 +01:00
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
|
|
|
|
Button {
|
2020-02-12 18:24:07 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("Known issues")
|
2020-03-30 21:21:36 +02:00
|
|
|
icon.name: "tools-report-bug"
|
2020-02-12 18:24:07 +01:00
|
|
|
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
2020-03-30 21:21:36 +02:00
|
|
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
2020-02-12 18:24:07 +01:00
|
|
|
|
2020-04-02 20:16:05 +02:00
|
|
|
visible: config.knownIssuesUrl !== ""
|
|
|
|
onClicked: Qt.openUrlExternally(config.knownIssuesUrl)
|
2020-02-12 18:24:07 +01:00
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
|
|
|
|
Button {
|
2020-02-12 18:24:07 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("Release notes")
|
2020-03-30 21:21:36 +02:00
|
|
|
icon.name: "folder-text"
|
2020-02-12 18:24:07 +01:00
|
|
|
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
2020-03-30 21:21:36 +02:00
|
|
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
2020-02-12 18:24:07 +01:00
|
|
|
|
2020-04-02 20:16:05 +02:00
|
|
|
visible: config.releaseNotesUrl !== ""
|
|
|
|
onClicked: Qt.openUrlExternally(config.releaseNotesUrl)
|
2020-02-12 18:24:07 +01:00
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
|
|
|
|
Button {
|
2020-02-12 18:24:07 +01:00
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("Donate")
|
2020-03-30 21:21:36 +02:00
|
|
|
icon.name: "taxes-finances"
|
2020-02-12 18:24:07 +01:00
|
|
|
Kirigami.Theme.backgroundColor: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.4)
|
2020-03-30 21:21:36 +02:00
|
|
|
Kirigami.Theme.textColor: Kirigami.Theme.textColor
|
2020-02-12 18:24:07 +01:00
|
|
|
|
2020-04-02 20:16:05 +02:00
|
|
|
visible: config.donateUrl !== ""
|
2020-02-12 18:24:07 +01:00
|
|
|
onClicked: Qt.openUrlExternally(config.donateUrl)
|
|
|
|
}
|
|
|
|
}
|
2020-04-20 15:00:04 +02:00
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: languageBar
|
|
|
|
width: parent.width /1.2
|
|
|
|
height: 48
|
|
|
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: parent.height /7
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
spacing: Kirigami.Units.largeSpacing* 4
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: parent.width
|
|
|
|
Layout.fillWidth: true
|
|
|
|
focus: true
|
|
|
|
Image {
|
|
|
|
id: image
|
|
|
|
height: 48
|
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
source: "img/language-icon-48px.png"
|
|
|
|
}
|
|
|
|
|
|
|
|
ComboBox {
|
|
|
|
id: languages
|
|
|
|
anchors.left: image.right
|
|
|
|
width: languageBar.width /1.1
|
|
|
|
textRole: "label"
|
|
|
|
currentIndex: 4 //model.currentIndex
|
|
|
|
model: config.languagesModel
|
|
|
|
onCurrentIndexChanged: console.debug(currentText, currentIndex)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
2020-04-01 16:19:00 +02:00
|
|
|
id:load
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
2020-02-12 16:03:19 +01:00
|
|
|
}
|
2019-12-14 18:14:35 +01:00
|
|
|
}
|