2018-08-12 20:51:57 +02:00
|
|
|
/*
|
|
|
|
Speed Climbing Stopwatch - Simple Stopwatch for Climbers
|
|
|
|
Copyright (C) 2018 Itsblue Development - Dorian Zeder
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, version 3 of the License.
|
|
|
|
|
|
|
|
This program 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 Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-07-25 00:32:20 +02:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtMultimedia 5.8
|
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Controls 2.2
|
2018-07-28 14:12:55 +02:00
|
|
|
import QtQuick.Layouts 1.3
|
2018-08-28 23:03:35 +02:00
|
|
|
import "./components"
|
|
|
|
import "./styles"
|
2018-07-25 00:32:20 +02:00
|
|
|
|
2018-07-26 20:51:46 +02:00
|
|
|
Popup {
|
|
|
|
id: root
|
2018-07-25 00:32:20 +02:00
|
|
|
x: startButt.x
|
|
|
|
y: startButt.y
|
|
|
|
width: startButt.width
|
|
|
|
height: startButt.height
|
2018-07-26 22:13:43 +02:00
|
|
|
modal: true
|
|
|
|
dim: false
|
2018-08-28 23:03:35 +02:00
|
|
|
scale: 0
|
2018-07-25 00:32:20 +02:00
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
property var connections
|
2018-08-18 21:27:18 +02:00
|
|
|
|
|
|
|
signal connectRequested(var type)
|
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
onConnectionsChanged: {
|
|
|
|
//loop trough all connections
|
|
|
|
for (var key in connections) {
|
|
|
|
if(!connections[key])continue; //skip if empty to avoid errors
|
|
|
|
//check if any connection is in the state "connecting"
|
|
|
|
if(connections[key]["status"] === "connecting"){
|
|
|
|
root.closePolicy = Popup.NoAutoClose //make the dalog non-closable
|
|
|
|
return
|
|
|
|
}
|
2018-08-18 21:27:18 +02:00
|
|
|
}
|
2018-08-28 23:03:35 +02:00
|
|
|
//if no connection is in "conecting" state make popup closable
|
|
|
|
root.closePolicy = Popup.CloseOnPressOutside
|
2018-08-18 21:27:18 +02:00
|
|
|
}
|
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
function connect(type) {
|
|
|
|
connectRequested(type)
|
2018-08-18 21:27:18 +02:00
|
|
|
}
|
|
|
|
|
2018-07-25 00:32:20 +02:00
|
|
|
enter: Transition {
|
2018-08-28 23:03:35 +02:00
|
|
|
NumberAnimation { properties: "scale"; to: 1; duration: 300; easing.type: Easing.Linear }
|
2018-07-25 00:32:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
exit: Transition {
|
2018-08-28 23:03:35 +02:00
|
|
|
NumberAnimation { properties: "scale"; to: 0; duration: 300; easing.type: Easing.Linear }
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
2018-07-25 00:32:20 +02:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
radius: width * 0.5
|
2018-08-28 23:03:35 +02:00
|
|
|
color: StyleSettings.viewColor
|
|
|
|
border.color: StyleSettings.lineColor
|
2018-07-25 00:32:20 +02:00
|
|
|
border.width: 1
|
2018-07-28 14:12:55 +02:00
|
|
|
|
2018-07-25 00:32:20 +02:00
|
|
|
Label {
|
2018-07-28 14:12:55 +02:00
|
|
|
id: head_text
|
|
|
|
text: options_stack.currentItem.title
|
2018-10-14 18:39:39 +02:00
|
|
|
font.pixelSize: headlineUnderline.width * 0.05
|
2018-08-28 23:03:35 +02:00
|
|
|
color: enabled ? StyleSettings.textColor:StyleSettings.disabledTextColor
|
2018-07-25 00:32:20 +02:00
|
|
|
anchors {
|
|
|
|
horizontalCenter: parent.horizontalCenter
|
|
|
|
top: parent.top
|
|
|
|
topMargin: headlineUnderline.anchors.topMargin / 2 - height / 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: headlineUnderline
|
|
|
|
height: 1
|
|
|
|
width: parent.width
|
2018-08-28 23:03:35 +02:00
|
|
|
color: StyleSettings.lineColor
|
2018-07-25 00:32:20 +02:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
left: parent.left
|
|
|
|
right: parent.right
|
|
|
|
topMargin: parent.height * 0.15
|
|
|
|
rightMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
|
|
leftMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
|
|
}
|
|
|
|
}
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
Button {
|
|
|
|
id: head_back
|
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: parent.width * 0.17
|
|
|
|
top:parent.top
|
2018-08-03 15:18:23 +02:00
|
|
|
topMargin: parent.height * 0.01
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
2018-08-28 23:03:35 +02:00
|
|
|
|
2018-08-03 15:18:23 +02:00
|
|
|
height: parent.height * 0.13
|
2018-08-28 23:03:35 +02:00
|
|
|
width: height
|
|
|
|
opacity: root.closePolicy === Popup.NoAutoClose ? 0:1
|
2018-08-18 21:27:18 +02:00
|
|
|
enabled: opacity > 0
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
radius: width * 0.5
|
2018-08-28 23:03:35 +02:00
|
|
|
color: parent.pressed ? StyleSettings.buttonPressedColor:StyleSettings.buttonColor
|
|
|
|
border.color: StyleSettings.buttonBorderColor
|
2018-07-28 14:12:55 +02:00
|
|
|
border.width: 1
|
|
|
|
Image {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: parent.width * 0.2
|
2018-08-28 23:03:35 +02:00
|
|
|
source: StyleSettings.backIcon
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
options_stack.depth > 1 ? options_stack.pop():root.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
NumberAnimation {
|
2018-08-28 23:03:35 +02:00
|
|
|
duration: 200
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-08-18 21:27:18 +02:00
|
|
|
|
2018-07-25 00:32:20 +02:00
|
|
|
}
|
2018-07-26 20:51:46 +02:00
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
StackView {
|
|
|
|
id: options_stack
|
2018-08-11 23:54:34 +02:00
|
|
|
property int text_pixelSize: root.height * 0.06
|
2019-01-01 15:23:15 +01:00
|
|
|
property int rowSpacing: root.height * 0.01
|
2018-07-28 14:12:55 +02:00
|
|
|
initialItem: settings
|
|
|
|
width: headlineUnderline.width
|
2018-07-25 00:32:20 +02:00
|
|
|
|
2018-08-18 21:27:18 +02:00
|
|
|
enabled: opacity !== 0 //disable when not visible
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: ( parent.width - headlineUnderline.width ) / 2
|
2018-08-11 23:54:34 +02:00
|
|
|
topMargin: headlineUnderline.anchors.topMargin * 0.8
|
2018-07-28 14:12:55 +02:00
|
|
|
bottom: parent.bottom
|
|
|
|
}
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
NumberAnimation {duration: 200}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*-----start page of the settings-----*/
|
|
|
|
Component {
|
|
|
|
id: settings
|
|
|
|
|
|
|
|
Column {
|
2018-08-14 17:07:42 +02:00
|
|
|
property string title: qsTr("Options")
|
2018-07-28 14:12:55 +02:00
|
|
|
id: settings_col
|
2019-01-01 15:23:15 +01:00
|
|
|
spacing: options_stack.rowSpacing
|
2018-07-28 14:12:55 +02:00
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
/*----Connect to external devices----*/
|
2018-10-04 18:35:29 +02:00
|
|
|
NextPageDelegate {
|
2018-07-28 14:12:55 +02:00
|
|
|
id: connect_del
|
2018-10-04 18:35:29 +02:00
|
|
|
text: qsTr("extentions")
|
2018-08-18 21:27:18 +02:00
|
|
|
onClicked: {
|
|
|
|
options_stack.push(connect)
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*----Automated Start----*/
|
2018-10-04 18:35:29 +02:00
|
|
|
NextPageDelegate {
|
2018-07-28 14:12:55 +02:00
|
|
|
id: autostart_del
|
2018-08-14 17:07:42 +02:00
|
|
|
text: qsTr("start sequence")
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
options_stack.push(autostart)
|
|
|
|
}
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
2018-08-28 23:03:35 +02:00
|
|
|
|
|
|
|
/*----Style Settings----*/
|
|
|
|
ItemDelegate {
|
|
|
|
id: style_del
|
|
|
|
text: qsTr("change style")
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
StyleSettings.setTheme()
|
|
|
|
}
|
|
|
|
}
|
2019-01-01 15:23:15 +01:00
|
|
|
|
|
|
|
/*----Error Dialog----*/
|
|
|
|
ItemDelegate {
|
|
|
|
id: error_del
|
|
|
|
text: qsTr("open error popup")
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
errorDialog.open()
|
|
|
|
}
|
|
|
|
}
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
2018-07-26 20:51:46 +02:00
|
|
|
|
2018-09-09 20:18:00 +02:00
|
|
|
/*-----Page to connect to extenstions like a startpad or buzzer-----*/
|
2018-08-18 21:27:18 +02:00
|
|
|
Component {
|
|
|
|
id: connect
|
|
|
|
Column {
|
|
|
|
id: connect_col
|
2018-10-04 18:35:29 +02:00
|
|
|
property string title: qsTr("extentions")
|
2018-08-18 21:27:18 +02:00
|
|
|
property int delegateHeight: height*0.18
|
2018-09-23 17:54:20 +02:00
|
|
|
|
2018-10-04 18:35:29 +02:00
|
|
|
NextPageDelegate {
|
2018-09-23 17:54:20 +02:00
|
|
|
id: baseConn_del
|
|
|
|
text: qsTr("Base Station")
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
options_stack.push(baseStation)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
ConnectionDelegate {
|
2018-08-18 21:27:18 +02:00
|
|
|
id: connect_buzz_del
|
2018-08-28 23:03:35 +02:00
|
|
|
|
|
|
|
status: root.connections.buzzer
|
|
|
|
connect: root.connect
|
|
|
|
type: "buzzer"
|
|
|
|
|
2018-08-18 21:27:18 +02:00
|
|
|
width: parent.width
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
2018-08-28 23:03:35 +02:00
|
|
|
}
|
2018-08-18 21:27:18 +02:00
|
|
|
|
2018-08-28 23:03:35 +02:00
|
|
|
ConnectionDelegate {
|
|
|
|
id: connect_stap_del
|
|
|
|
|
|
|
|
status: root.connections.startpad
|
|
|
|
connect: root.connect
|
|
|
|
type: "startpad"
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
2018-08-18 21:27:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
/*-----Page to setup automatc start sequence-----*/
|
|
|
|
Component {
|
|
|
|
id: autostart
|
|
|
|
Column {
|
|
|
|
id: autostart_col
|
|
|
|
property string title: "Autostart"
|
2018-08-11 23:54:34 +02:00
|
|
|
property int delegateHeight: height*0.18
|
2018-07-28 14:12:55 +02:00
|
|
|
|
2018-10-04 18:35:29 +02:00
|
|
|
function updateSett(key, val, del){
|
|
|
|
del.enabled = false
|
|
|
|
_cppAppSettings.writeSetting(key, val)
|
|
|
|
if(baseConn.state === "connected"){
|
|
|
|
switch(key){
|
|
|
|
case "ready_en":
|
|
|
|
key = "READY_EN"
|
|
|
|
break
|
|
|
|
case "ready_delay":
|
|
|
|
key = "READY_DELAY"
|
|
|
|
break
|
|
|
|
case "at_marks_en":
|
|
|
|
key = "AT_MARKS_EN"
|
|
|
|
break
|
|
|
|
case "at_marks_delay":
|
|
|
|
key = "AT_MARKS_DELAY"
|
|
|
|
break
|
|
|
|
}
|
|
|
|
baseConn.sendCommand("SET_SETTING_"+key+"_"+val)
|
|
|
|
}
|
|
|
|
del.enabled = true
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
SwitchDelegate {
|
|
|
|
id: ready_del
|
|
|
|
text: qsTr("say 'ready'")
|
2018-08-28 23:03:35 +02:00
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
checked: _cppAppSettings.loadSetting("ready_en") === "true"
|
|
|
|
width: parent.width
|
2018-08-11 23:54:34 +02:00
|
|
|
height: parent.delegateHeight
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
|
|
|
|
onCheckedChanged: {
|
2018-10-04 18:35:29 +02:00
|
|
|
parent.updateSett("ready_en",checked, ready_del)
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
|
2018-08-11 23:54:34 +02:00
|
|
|
indicator: SimpleIndicator{}
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
ItemDelegate {
|
|
|
|
id: ready_delay_del
|
2018-08-14 17:07:42 +02:00
|
|
|
text: qsTr("delay (ms)")
|
2018-08-28 23:03:35 +02:00
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
enabled: ready_del.checked
|
|
|
|
width: parent.width
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
2018-08-11 23:54:34 +02:00
|
|
|
height: parent.delegateHeight
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
TextField {
|
|
|
|
focus: true
|
2018-08-14 17:07:42 +02:00
|
|
|
placeholderText: qsTr("time")
|
2018-07-28 14:12:55 +02:00
|
|
|
width: parent.width * 0.3
|
2018-08-11 23:54:34 +02:00
|
|
|
height: parent.height
|
2018-07-28 14:12:55 +02:00
|
|
|
anchors.right: parent.right
|
2018-08-11 23:54:34 +02:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2018-07-28 14:12:55 +02:00
|
|
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
|
|
|
|
|
|
|
text: _cppAppSettings.loadSetting("ready_delay")
|
|
|
|
|
|
|
|
onTextChanged: {
|
2018-10-04 18:35:29 +02:00
|
|
|
autostart_col.updateSett("ready_delay", text, ready_delay_del)
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
}
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
SwitchDelegate {
|
|
|
|
id: at_marks_del
|
|
|
|
text: qsTr("say\n'at your marks'")
|
2018-08-28 23:03:35 +02:00
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
checked: _cppAppSettings.loadSetting("at_marks_en") === "true"
|
|
|
|
width: parent.width
|
2018-08-11 23:54:34 +02:00
|
|
|
//height: parent.delegateHeight * 1.5
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
|
|
|
|
onCheckedChanged: {
|
2018-10-04 18:35:29 +02:00
|
|
|
parent.updateSett("at_marks_en",at_marks_del.checked, at_marks_del)
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
|
2018-08-11 23:54:34 +02:00
|
|
|
indicator: SimpleIndicator{}
|
2018-07-26 20:51:46 +02:00
|
|
|
}
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
ItemDelegate {
|
|
|
|
id: at_marks_delay_del
|
2018-08-14 17:07:42 +02:00
|
|
|
text: qsTr("delay (ms)")
|
2018-08-28 23:03:35 +02:00
|
|
|
contentItem: Text {
|
|
|
|
text: parent.text
|
|
|
|
color: StyleSettings.textColor
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
enabled: at_marks_del.checked
|
|
|
|
width: parent.width
|
2018-08-11 23:54:34 +02:00
|
|
|
height: parent.delegateHeight
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
focus: true
|
2018-08-14 17:07:42 +02:00
|
|
|
placeholderText: qsTr("time")
|
2018-07-28 14:12:55 +02:00
|
|
|
width: parent.width * 0.3
|
2018-08-11 23:54:34 +02:00
|
|
|
height: parent.height
|
2018-07-28 14:12:55 +02:00
|
|
|
anchors.right: parent.right
|
2018-08-11 23:54:34 +02:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2018-07-28 14:12:55 +02:00
|
|
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
|
|
|
|
|
|
|
text: _cppAppSettings.loadSetting("at_marks_delay")
|
|
|
|
|
|
|
|
onTextChanged: {
|
2018-10-04 18:35:29 +02:00
|
|
|
autostart_col.updateSett("at_marks_delay",text, at_marks_delay_del)
|
2018-07-28 14:12:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-23 17:54:20 +02:00
|
|
|
/*-----Page to connect to and manage the Base Station----*/
|
|
|
|
Component {
|
|
|
|
id: baseStation
|
|
|
|
Column {
|
|
|
|
id: baseStation_col
|
|
|
|
property string title: qsTr("Base Station")
|
|
|
|
property int delegateHeight: height*0.18
|
|
|
|
|
|
|
|
ConnectionDelegate {
|
|
|
|
id: connect_base_del
|
|
|
|
text: "connect"
|
|
|
|
|
|
|
|
status: root.connections.baseStation
|
|
|
|
connect: root.connect
|
|
|
|
type: "baseStation"
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
}
|
2018-10-04 18:35:29 +02:00
|
|
|
|
|
|
|
NextPageDelegate {
|
|
|
|
id: baseStationConnections_del
|
|
|
|
text: qsTr("connected extentions")
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
baseConn.refreshConnections()
|
|
|
|
options_stack.push(baseStationConnections)
|
|
|
|
}
|
|
|
|
}
|
2018-09-23 17:54:20 +02:00
|
|
|
}
|
2018-10-04 18:35:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*-----Page to view devices that core connected to the pase startion-----*/
|
|
|
|
Component{
|
|
|
|
id: baseStationConnections
|
|
|
|
ListView {
|
|
|
|
function getModel(){
|
|
|
|
var keys = Object.keys(baseConn.connections);
|
|
|
|
|
|
|
|
var len = keys.length
|
|
|
|
return(len)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getDetails(index){
|
|
|
|
var ret = baseConn.connections[index]
|
|
|
|
var details = ret.split("|")
|
|
|
|
return(details)
|
|
|
|
}
|
|
|
|
|
|
|
|
id: baseStationConnections_list
|
|
|
|
property string title: qsTr("connections")
|
|
|
|
property int delegateHeight: height*0.18
|
|
|
|
model: getModel()
|
|
|
|
delegate: ConnectionDelegate {
|
|
|
|
enabled: false
|
|
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
|
|
width: parent.width
|
|
|
|
height: baseStationConnections_list.delegateHeight
|
|
|
|
|
|
|
|
text: baseStationConnections_list.getDetails(index)[2]
|
|
|
|
status: {'status': baseStationConnections_list.getDetails(index)[4], 'progress': 0}
|
|
|
|
}
|
|
|
|
}
|
2018-09-23 17:54:20 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-07-28 14:12:55 +02:00
|
|
|
/*-----Custom animations-----*/
|
|
|
|
|
|
|
|
pushEnter: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
property: "opacity"
|
|
|
|
from: 0
|
|
|
|
to: 1
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pushExit: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
property: "opacity"
|
|
|
|
from: 1
|
|
|
|
to: 0
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
popExit: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
property: "opacity"
|
|
|
|
from: 1
|
|
|
|
to: 0
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
popEnter: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
property: "opacity"
|
|
|
|
from: 0
|
|
|
|
to: 1
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
2018-07-25 00:32:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-07-28 14:12:55 +02:00
|
|
|
|
|
|
|
|
2018-07-25 00:32:20 +02:00
|
|
|
}
|