This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
app/resources/qml/ProfilesDialog/AddProfilePage.qml

72 lines
1.9 KiB
QML
Raw Permalink Normal View History

/*
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 de.itsblue.ScStw 2.0
import de.itsblue.ScStw.Styling 2.0
import de.itsblue.ScStw.Styling.Components 1.0
import de.itsblue.ScStwApp 2.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: {
}
}
}