68 lines
1.8 KiB
QML
68 lines
1.8 KiB
QML
|
/*
|
||
|
Speed Climbing Stopwatch - Simple Stopwatch for Climbers
|
||
|
Copyright (C) 2018 - 2019 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/>.
|
||
|
*/
|
||
|
|
||
|
import QtQuick 2.9
|
||
|
import QtMultimedia 5.8
|
||
|
import QtQuick.Window 2.2
|
||
|
import QtQuick.Controls 2.4
|
||
|
import QtQuick.Layouts 1.3
|
||
|
import QtGraphicalEffects 1.0
|
||
|
import com.itsblue.speedclimbingstopwatch 1.0
|
||
|
|
||
|
import "../components"
|
||
|
|
||
|
Column {
|
||
|
property string title: "add profile"
|
||
|
property string secondButt: "ok"
|
||
|
property string newProfileName: ""
|
||
|
|
||
|
Connections {
|
||
|
target: head_add
|
||
|
|
||
|
enabled: true
|
||
|
|
||
|
onClicked: {
|
||
|
if(speedBackend.createAthlete(userNameTf.text, fullNameTf.text)){
|
||
|
profilesStack.get(profilesStack.depth - 2 ).opened()
|
||
|
profilesStack.pop()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
TextField {
|
||
|
id: fullNameTf
|
||
|
width: parent.width
|
||
|
placeholderText: "full name"
|
||
|
onTextChanged: {
|
||
|
parent.newProfileName = text
|
||
|
}
|
||
|
Keys.onReturnPressed: {
|
||
|
}
|
||
|
}
|
||
|
TextField {
|
||
|
id: userNameTf
|
||
|
width: parent.width
|
||
|
placeholderText: "username"
|
||
|
onTextChanged: {
|
||
|
parent.newProfileName = text
|
||
|
}
|
||
|
Keys.onReturnPressed: {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|