|
@@ -1,154 +0,0 @@
|
|
|
-import QtQuick 2.4
|
|
|
-import QtQuick.Controls 2.3
|
|
|
-import QtQuick.Layouts 1.3
|
|
|
-
|
|
|
-Popup {
|
|
|
- id: popup
|
|
|
- height: 450
|
|
|
- dim: true
|
|
|
- clip: false
|
|
|
- width: 400
|
|
|
- modal: true
|
|
|
- focus: true
|
|
|
- closePolicy: Popup.NoAutoClose
|
|
|
-
|
|
|
- Connections {
|
|
|
- target: _qmlHandler
|
|
|
- onIpPopupSetStatus: {
|
|
|
- ipPopupStatusText.text = status
|
|
|
- }
|
|
|
- onIpPopupClose: {
|
|
|
- popup.close()
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- Page {
|
|
|
- anchors.fill: parent
|
|
|
-
|
|
|
- header: TabBar {
|
|
|
- id: header
|
|
|
- currentIndex: swipeView.currentIndex
|
|
|
- contentHeight: 50
|
|
|
-
|
|
|
- TabButton {
|
|
|
- text: qsTr("Login")
|
|
|
- }
|
|
|
-
|
|
|
- TabButton {
|
|
|
- text: qsTr("Signup")
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- SwipeView {
|
|
|
- id: swipeView
|
|
|
- anchors.fill: parent
|
|
|
- currentIndex: header.currentIndex
|
|
|
- clip: true
|
|
|
-
|
|
|
- Page {
|
|
|
- ColumnLayout {
|
|
|
- anchors.fill: parent
|
|
|
-
|
|
|
- Text {
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- id: ipPopupTitle
|
|
|
- color: "#ffffff"
|
|
|
- text: qsTr("Login")
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- verticalAlignment: Text.AlignVCenter
|
|
|
- font.pixelSize: 20
|
|
|
- }
|
|
|
-
|
|
|
- TextField {
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- id: ipPopupIpInput
|
|
|
- selectByMouse: true
|
|
|
- focus: true
|
|
|
- text: qsTr("")
|
|
|
- placeholderText: "IP-Address"
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- validator: RegExpValidator {
|
|
|
- regExp: /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/
|
|
|
- }
|
|
|
- // @disable-check M222
|
|
|
- Keys.onReturnPressed: ipPopupConnectButton.activate()
|
|
|
- // @disable-check M222
|
|
|
- Keys.onEnterPressed: ipPopupConnectButton.activate()
|
|
|
- }
|
|
|
-
|
|
|
- TextField {
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- id: ipPopupUsernameInput
|
|
|
- selectByMouse: true
|
|
|
- focus: true
|
|
|
- text: qsTr("")
|
|
|
- placeholderText: "Username"
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- // @disable-check M222
|
|
|
- Keys.onReturnPressed: ipPopupConnectButton.activate()
|
|
|
- // @disable-check M222
|
|
|
- Keys.onEnterPressed: ipPopupConnectButton.activate()
|
|
|
- }
|
|
|
-
|
|
|
- TextField {
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- id: ipPopupPasswordInput
|
|
|
- selectByMouse: true
|
|
|
- focus: true
|
|
|
- text: qsTr("")
|
|
|
- placeholderText: "Password"
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- // @disable-check M222
|
|
|
- Keys.onReturnPressed: ipPopupConnectButton.activate()
|
|
|
- // @disable-check M222
|
|
|
- Keys.onEnterPressed: ipPopupConnectButton.activate()
|
|
|
- echoMode: TextInput.Password
|
|
|
- }
|
|
|
-
|
|
|
- Text {
|
|
|
- id: ipPopupStatusText
|
|
|
- color: "#df3f3f"
|
|
|
- text: qsTr("")
|
|
|
- horizontalAlignment: Text.AlignHCenter
|
|
|
- verticalAlignment: Text.AlignVCenter
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- font.pixelSize: 20
|
|
|
- }
|
|
|
-
|
|
|
- Button {
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- id: ipPopupConnectButton
|
|
|
- text: qsTr("Connect")
|
|
|
- enabled: (ipPopupIpInput.acceptableInput
|
|
|
- && ipPopupUsernameInput.text != ""
|
|
|
- && ipPopupPasswordInput.text != "")
|
|
|
- font.pointSize: 16
|
|
|
- // @disable-check M223
|
|
|
- onClicked: {
|
|
|
- // @disable-check M222
|
|
|
- ipPopupConnectButton.activate()
|
|
|
- }
|
|
|
-
|
|
|
- // @disable-check M222
|
|
|
- function activate() {
|
|
|
- // @disable-check M223
|
|
|
- if (ipPopupConnectButton.enabled) {
|
|
|
- // @disable-check M222
|
|
|
- _qmlHandler.onIpPopupConnectButton(
|
|
|
- ipPopupIpInput.text,
|
|
|
- ipPopupUsernameInput.text,
|
|
|
- ipPopupUsernameInput.text)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- Page {
|
|
|
- Button {
|
|
|
- text: qsTr("HallO")
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|