Warning, /plasma-bigscreen/calamares-bigscreen-branding/bigscreen/Requirements.qml is written in an unsupported language. File is not indexed.

0001 /* === This file is part of Calamares - <https://calamares.io> ===
0002  *
0003  *   SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
0004  *   SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
0005  *   SPDX-FileCopyrightText: 2022 Aditya Mehra <aix.m@outlook.com>
0006  *   SPDX-License-Identifier: GPL-3.0-or-later
0007  *
0008  *   Calamares is Free Software: see the License-Identifier above.
0009  *
0010  */
0011 
0012 import io.calamares.core 1.0
0013 import io.calamares.ui 1.0
0014 
0015 import QtQuick 2.7
0016 import QtQuick.Controls 2.2
0017 import QtQuick.Layouts 1.3
0018 import org.kde.kirigami 2.7 as Kirigami
0019 
0020 Rectangle {
0021     focus: true
0022     color: "#ff212121"
0023     anchors.fill: parent
0024     anchors.topMargin: 50
0025 
0026     TextArea {
0027         id: required
0028         anchors.horizontalCenter: parent.horizontalCenter
0029         anchors.top: parent.top
0030         anchors.topMargin: 1
0031         horizontalAlignment: TextEdit.AlignHCenter
0032         width: 640
0033         font.pointSize: 11
0034         textFormat: Text.RichText
0035         antialiasing: true
0036         activeFocusOnPress: false
0037         wrapMode: Text.WordWrap
0038 
0039         property var requirementsText: qsTr("<p>This computer does not satisfy the minimum requirements for installing %1.<br/>
0040         Installation cannot continue.</p>").arg(Branding.string(Branding.VersionedName))
0041         property var recommendationsText: qsTr("<p>This computer does not satisfy some of the recommended requirements for setting up %1.<br/>
0042         Setup can continue, but some features might be disabled.</p>").arg(Branding.string(Branding.VersionedName))
0043 
0044         text: config.requirementsModel.satisfiedMandatory ? recommendationsText : requirementsText
0045     }
0046 
0047     Rectangle {
0048         width: 640
0049         height: 360
0050         anchors.horizontalCenter: parent.horizontalCenter
0051         anchors.top: required.bottom
0052         anchors.topMargin: 5
0053         color: "#ff212121"
0054 
0055         Component {
0056             id: requirementsDelegate
0057 
0058             Item {
0059                 width: 640
0060                 height: 35
0061                 visible: true
0062 
0063                 Column {
0064                     anchors.centerIn: parent
0065 
0066                     Rectangle {
0067                         implicitWidth: 640
0068                         implicitHeight: 35
0069                         // Colors and images based on the two satisfied-bools:
0070                         // - if satisfied, then green / ok
0071                         // - otherwise if mandatory, then red / stop
0072                         // - otherwise, then yellow / warning
0073                         border.color: satisfied ? "#228b22" : (mandatory ? "#ff0000" : "#ffa411")
0074                         color: satisfied ? "#f0fff0" : (mandatory ? "#ffc0cb" : "#ffefd5")
0075 
0076                         Image {
0077                             anchors.verticalCenter: parent.verticalCenter
0078                             anchors.right: parent.right
0079                             anchors.margins: 20
0080                             source: satisfied ? "qrc:/data/images/yes.svgz" : (mandatory ? "qrc:/data/images/no.svgz" : "qrc:/data/images/information.svgz")
0081                         }
0082 
0083                         Text {
0084                             text: satisfied ? details : negatedText
0085                             anchors.centerIn: parent
0086                             font.pointSize: 11
0087                         }
0088                     }
0089                 }
0090             }
0091         }
0092 
0093         ListView {
0094             id: requirementsList
0095             anchors.fill: parent
0096             spacing: 5
0097             // This uses the filtered model, so that only unsatisfied
0098             // requirements are ever shown. You could use *requirementsModel*
0099             // to get all of them.
0100             model: config.unsatisfiedRequirements
0101             delegate: requirementsDelegate
0102         }
0103     }
0104 }
0105