Warning, /system/mycroft-gui/application/Idler.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * Copyright 2018 by Marco Martin <mart@kde.org>
0003  * Copyright 2018 David Edmundson <davidedmundson@kde.org>
0004  *
0005  * Licensed under the Apache License, Version 2.0 (the "License");
0006  * you may not use this file except in compliance with the License.
0007  * You may obtain a copy of the License at
0008  *
0009  *    http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  *
0017  */
0018 
0019 import QtQuick 2.15
0020 import QtQuick.Controls 2.15
0021 import Mycroft 1.0 as Mycroft
0022 
0023 /* Class used to simulate the homescreen in cases where we're not using minimal shell
0024  */
0025 
0026 Item {
0027     //I was asked to have a button. I have no idea why one wouldn't just connect on startup...
0028     Button {
0029         anchors.centerIn: parent
0030         text: "start"
0031         visible: Mycroft.MycroftController.status == Mycroft.MycroftController.Closed
0032         onClicked: (mouse)=> { 
0033             Mycroft.MycroftController.start();
0034         }
0035     }
0036 
0037     ClockFace {
0038         id: face
0039         anchors.centerIn: parent
0040         width: Math.min(parent.width, parent.height) * 0.7
0041         height: Math.min(parent.width, parent.height) * 0.7
0042         visible: Mycroft.MycroftController.status == Mycroft.MycroftController.Open
0043         showSecondsHand: true
0044         Timer {
0045             interval: 1000
0046             running: true
0047             repeat: true
0048             onTriggered: face.time = new Date();
0049         }
0050     }
0051 }