Warning, /system/mycroft-gui/containments/mark2/package/contents/ui/networking/Connecting.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * Copyright 2018 by Aditya Mehra <aix.m@outlook.com>
0003 *
0004 * Licensed under the Apache License, Version 2.0 (the "License");
0005 * you may not use this file except in compliance with the License.
0006 * You may obtain a copy of the License at
0007 *
0008 * http://www.apache.org/licenses/LICENSE-2.0
0009 *
0010 * Unless required by applicable law or agreed to in writing, software
0011 * distributed under the License is distributed on an "AS IS" BASIS,
0012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 * See the License for the specific language governing permissions and
0014 * limitations under the License.
0015 *
0016 */
0017
0018 import QtQuick.Layouts 1.4
0019 import QtQuick 2.4
0020 import QtQuick.Controls 2.0
0021 import org.kde.kirigami 2.5 as Kirigami
0022 import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
0023 import org.kde.lottie 1.0
0024
0025 Item {
0026 id: connectingView
0027 anchors.fill: parent
0028 property int connectedStatus
0029 property int disconnectedStatus
0030
0031 PlasmaNM.NetworkStatus {
0032 id: networkStatus
0033 onNetworkStatusChanged: {
0034 console.log(networkStatus.networkStatus)
0035 if(networkStatus.networkStatus == "Connected"){
0036 connectedStatus = 1
0037 disconnectedStatus = 0
0038 }
0039 if(networkStatus.networkStatus == "Disconnected"){
0040 disconnectedStatus = 1
0041 connectedStatus = 0
0042 }
0043 }
0044 }
0045
0046 Connections {
0047 target: connectedStatus
0048 onConnectedStatusChanged: {
0049 if(connectedStatus == 1){
0050 networkingLoader.source = "../networking/Success.qml"
0051 }
0052 }
0053 }
0054
0055 Connections {
0056 target: disconnectedStatus
0057 onDisconnectedStatusChanged: {
0058 if(disconnectedStatus == 1){
0059 networkingLoader.source = "../networking/Fail.qml"
0060 }
0061 }
0062 }
0063
0064 ColumnLayout {
0065 anchors.fill: parent
0066
0067 Item {
0068 id: topArea
0069 Layout.fillWidth: true
0070 Layout.preferredHeight: Kirigami.Units.gridUnit * 2
0071
0072 Kirigami.Heading {
0073 id: connectionTextHeading
0074 level: 1
0075 wrapMode: Text.WordWrap
0076 anchors.centerIn: parent
0077 font.bold: true
0078 text: "Connecting To Wi-Fi"
0079 color: Kirigami.Theme.linkColor
0080 }
0081 }
0082
0083 LottieAnimation {
0084 id: l1
0085 Layout.fillWidth: true
0086 Layout.fillHeight: true
0087 source: Qt.resolvedUrl("Animations/connecting.json")
0088 loops: Animation.Infinite
0089 fillMode: Image.PreserveAspectFit
0090 running: true
0091
0092 onSourceChanged: {
0093 console.log(l1.status)
0094 }
0095 }
0096 }
0097 }
0098