Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- import QtQuick.Controls 2.2
- import QtQuick.Dialogs 1.2
- import "."
- Dialog {
- width: 800
- height: 450
- modality: Qt.WindowModal
- title: qsTr("Select data source")
- standardButtons: StandardButton.Cancel
- StackView {
- id: stackView
- anchors.fill: parent
- background: Rectangle {
- color: Style.windowBackgroundColor
- }
- initialItem: dataSourceTypeSelector
- Item {
- id: dataSourceTypeSelector
- Column {
- anchors.centerIn: parent
- height: 4 * 50 + 3 * spacing
- spacing: 30
- DarkButton {
- id: remoteServerButton
- width: 240
- height: 60
- text: "Remote server"
- icon: "icons/ic_cloud_black_24px.svg"
- iconTextSpacing: 20
- contentHorizontalOffset: 20
- onClicked: stackView.push(remoteServer)
- }
- DarkButton {
- id: phoneServerButton
- width: 240
- height: 60
- text: "Phone (WiFi)"
- icon: "icons/ic_phonelink_ring_black_24px.svg"
- iconTextSpacing: 20
- contentHorizontalOffset: 20
- onClicked: stackView.push(phoneWifi)
- }
- DarkButton {
- id: phoneDirectoryButton
- width: 240
- height: 60
- text: "Phone (USB)"
- icon: "icons/ic_phonelink_black_24px.svg"
- iconTextSpacing: 20
- contentHorizontalOffset: 20
- onClicked: stackView.push(phoneDirectory)
- }
- DarkButton {
- id: localComputerDirectoryButton
- width: 240
- height: 60
- text: "Local computer directory"
- icon: "icons/ic_computer_black_24px.svg"
- iconTextSpacing: 20
- contentHorizontalOffset: 20
- onClicked: stackView.push(localComputerDirectory)
- }
- }
- }
- Item {
- id: remoteServer
- x: 10000
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- height: 30
- color: "red"
- Text {
- anchors.centerIn: parent
- text: "This version doesn't support this data source type."
- color: "white"
- }
- }
- DarkButton {
- anchors.left: parent.left
- anchors.top: parent.top
- icon: "icons/ic_arrow_back_black_24px.svg"
- contentHorizontalOffset: 20
- onClicked: stackView.pop()
- }
- LoginForm {
- anchors.centerIn: parent
- onSignIn: console.log("Sign in: {User: \"%1\", Password: \"%2\"}".arg(login).arg(password))
- }
- }
- Item {
- id: phoneWifi
- x: 10000
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- height: 30
- color: "red"
- Text {
- anchors.centerIn: parent
- text: "This version doesn't support this data source type."
- color: "white"
- }
- }
- DarkButton {
- anchors.left: parent.left
- anchors.top: parent.top
- icon: "icons/ic_arrow_back_black_24px.svg"
- contentHorizontalOffset: 20
- onClicked: stackView.pop()
- }
- PhoneWifiSelector {
- anchors.centerIn: parent
- onSelected: console.log("Selected phone {name: \"%1\", address: \"%2\"}".arg(name).arg(address))
- }
- }
- Item {
- id: phoneDirectory
- x: 10000
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- height: 30
- color: "red"
- Text {
- anchors.centerIn: parent
- text: "This version doesn't support this data source type."
- color: "white"
- }
- }
- DarkButton {
- anchors.left: parent.left
- anchors.top: parent.top
- icon: "icons/ic_arrow_back_black_24px.svg"
- contentHorizontalOffset: 20
- onClicked: stackView.pop()
- }
- Text {
- anchors.centerIn: parent
- text: "Phone (USB)"
- }
- }
- Item {
- id: localComputerDirectory
- x: 10000
- DarkButton {
- anchors.left: parent.left
- anchors.top: parent.top
- icon: "icons/ic_arrow_back_black_24px.svg"
- contentHorizontalOffset: 20
- onClicked: stackView.pop()
- }
- Text {
- anchors.centerIn: parent
- text: "Local computer"
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment