diff options
author | Marco Martin <notmart@gmail.com> | 2017-03-31 16:15:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-01 09:35:51 +0200 |
commit | 751626eec574363ef694e1301744704915e6b2ea (patch) | |
tree | feebeca13c2405cf9a5501435bd85b9acf360b7f /mobile-widgets/qml/DownloadFromDiveComputer.qml | |
parent | 34a42d7f04319973cbecfcc3b21c6bf8b29f2a22 (diff) | |
download | subsurface-751626eec574363ef694e1301744704915e6b2ea.tar.gz |
QML UI: Fully port dive edit to Kirigami2
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1
Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type
Signed-off-by: Marco Martin <notmart@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml')
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index d75db6737..9021a0668 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -1,11 +1,11 @@ import QtQuick 2.3 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.2 +import QtQuick.Controls 1.4 as QQC1 +import QtQuick.Controls 2.0 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.1 import org.subsurfacedivelog.mobile 1.0 -import org.kde.kirigami 1.0 as Kirigami +import org.kde.kirigami 2.0 as Kirigami Kirigami.Page { id: diveComputerDownloadWindow @@ -17,7 +17,7 @@ Kirigami.Page { /* this can be done by hitting the back key contextualActions: [ - Action { + Kirigami.Action { text: qsTr("Close Preferences") iconName: "dialog-cancel" onTriggered: { @@ -35,27 +35,27 @@ Kirigami.Page { RowLayout { anchors.top:parent.top Layout.fillWidth: true - Text { text: qsTr(" Vendor name: ") } + Kirigami.Label { text: qsTr(" Vendor name: ") } ComboBox { Layout.fillWidth: true } } RowLayout { - Text { text: qsTr(" Dive Computer:") } + Kirigami.Label { text: qsTr(" Dive Computer:") } ComboBox { Layout.fillWidth: true } } RowLayout { - Text { text: " Progress:" } + Kirigami.Label { text: " Progress:" } Layout.fillWidth: true ProgressBar { Layout.fillWidth: true } } RowLayout { - SubsurfaceButton { + Button { text: qsTr("Download") onClicked: { text: qsTr("Retry") stackView.pop(); } } - SubsurfaceButton { + Button { id:quitbutton text: qsTr("Quit") onClicked: { @@ -64,26 +64,26 @@ Kirigami.Page { } } RowLayout { - Text { + Kirigami.Label { text: qsTr(" Downloaded dives") } } - TableView { + QQC1.TableView { width: parent.width Layout.fillWidth: true // The tableview should fill Layout.fillHeight: true // all remaining vertical space height: parent.height // on this screen - TableViewColumn { + QQC1.TableViewColumn { width: parent.width / 2 role: "datetime" title: qsTr("Date / Time") } - TableViewColumn { + QQC1.TableViewColumn { width: parent.width / 4 role: "duration" title: qsTr("Duration") } - TableViewColumn { + QQC1.TableViewColumn { width: parent.width / 4 role: "depth" title: qsTr("Depth") @@ -91,33 +91,33 @@ Kirigami.Page { } RowLayout { Layout.fillWidth: true - SubsurfaceButton { + Button { text: qsTr("Accept") onClicked: { stackView.pop(); } } - SubsurfaceButton { + Button { text: qsTr("Quit") onClicked: { stackView.pop(); } } - Text { + Kirigami.Label { text: "" // Spacer between 2 button groups Layout.fillWidth: true } - SubsurfaceButton { + Button { text: qsTr("Select All") } - SubsurfaceButton { + Button { id: unselectbutton text: qsTr("Unselect All") } } RowLayout { // spacer to make space for silly button Layout.minimumHeight: 1.2 * unselectbutton.height - Text { + Kirigami.Label { text:"" } } |