summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Verebelyi <vviktor2@gmail.com>2020-10-08 23:31:54 +0100
committerViktor Verebelyi <vviktor2@gmail.com>2020-10-08 23:31:54 +0100
commit8719cdbb3e3a6b5bba5b881a632559163e96f39e (patch)
tree8f793e5ec5b0210579ca434d79e5cd835ab96043
parentdb081ccc9dd5c884ac2c4232ec35b7f1b6dfa9b2 (diff)
downloadnavit-8719cdbb3e3a6b5bba5b881a632559163e96f39e.tar.gz
Add:qt5_gui:Levy Add destination details to destination overview screen
-rw-r--r--navit/gui/qt5_qml/gui_qt5_qml.qrc1
-rw-r--r--navit/gui/qt5_qml/themes/Levy/DestinationDetailsBar.qml124
-rw-r--r--navit/gui/qt5_qml/themes/Levy/MainLayout.qml23
3 files changed, 147 insertions, 1 deletions
diff --git a/navit/gui/qt5_qml/gui_qt5_qml.qrc b/navit/gui/qt5_qml/gui_qt5_qml.qrc
index 2b6637a4c..8788f63a4 100644
--- a/navit/gui/qt5_qml/gui_qt5_qml.qrc
+++ b/navit/gui/qt5_qml/gui_qt5_qml.qrc
@@ -950,5 +950,6 @@
<file>themes/Levy/SearchDrawerFavouritesList.qml</file>
<file>themes/Levy/SearchDrawerContextMenu.qml</file>
<file>themes/Levy/SearchDrawerBreadcrumbs.qml</file>
+ <file>themes/Levy/DestinationDetailsBar.qml</file>
</qresource>
</RCC>
diff --git a/navit/gui/qt5_qml/themes/Levy/DestinationDetailsBar.qml b/navit/gui/qt5_qml/themes/Levy/DestinationDetailsBar.qml
new file mode 100644
index 000000000..9f123446c
--- /dev/null
+++ b/navit/gui/qt5_qml/themes/Levy/DestinationDetailsBar.qml
@@ -0,0 +1,124 @@
+import QtQuick 2.9
+import QtQuick.Layouts 1.3
+
+Item {
+ id: __root
+ property alias address: addressText.text
+
+ signal routeOverviewClicked ()
+ signal poisClicked()
+ signal addBookmarkClicked()
+ Rectangle{
+ id: buttonsBackground
+ height: parent.height * 0.45
+ anchors.right: parent.right
+ anchors.left: parent.left
+ border.width: 1
+ radius: height / 2
+ anchors.top: parent.top
+ visible: true
+
+ Text {
+ id:addressText
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ font.pointSize: 18
+ }
+ }
+
+ ColumnLayout {
+ id: rowLayout
+ height: parent.height * 0.45
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 0
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.leftMargin: 0
+ spacing: 0
+
+ RowLayout {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Rectangle {
+ height: parent.height*0.8
+ color: "#ffffff"
+ radius: height/2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.width: 1
+
+ Text {
+ text: qsTr("Route Overview")
+ font.pointSize: 16
+ fontSizeMode: Text.HorizontalFit
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: __root.routeOverviewClicked()
+ }
+ }
+
+ Rectangle {
+ height: parent.height*0.8
+ color: "#ffffff"
+ radius: height/2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.width: 1
+ Text {
+ text: qsTr("POIs")
+ anchors.verticalCenter: parent.verticalCenter
+ font.pointSize: 16
+ anchors.horizontalCenter: parent.horizontalCenter
+ fontSizeMode: Text.HorizontalFit
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: __root.poisClicked()
+ }
+ }
+
+ Rectangle {
+ id: rectangle
+ height: parent.height*0.8
+ color: "#ffffff"
+ radius: height/2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.width: 1
+
+ Text {
+ text: qsTr("Add as Bookmark")
+ fontSizeMode: Text.HorizontalFit
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pointSize: 16
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: __root.addBookmarkClicked()
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+/*##^## Designer {
+ D{i:0;autoSize:true;height:240;width:1200}D{i:1;anchors_height:240}
+}
+ ##^##*/
diff --git a/navit/gui/qt5_qml/themes/Levy/MainLayout.qml b/navit/gui/qt5_qml/themes/Levy/MainLayout.qml
index a61d8045a..4ac68e1de 100644
--- a/navit/gui/qt5_qml/themes/Levy/MainLayout.qml
+++ b/navit/gui/qt5_qml/themes/Levy/MainLayout.qml
@@ -48,6 +48,7 @@ Item {
navit: Navit
onDestinationAdded: {
navigation.routeOverview();
+ destinationDetailsBar.address = destination;
}
onNavigationFinished: {
mapNavigationBar.state = ""
@@ -250,7 +251,21 @@ Item {
}
}
- Item {
+ DestinationDetailsBar {
+ id: destinationDetailsBar
+ height: parent.width > parent.height ? parent.height * 0.2 : parent.width * 0.3
+ anchors.topMargin: parent.height * 0.05
+ // visible: false
+ clip: true
+ anchors.top: routeCalculating.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 0
+ visible: false
+ onPoisClicked: {
+ __root.state = "routeOverviewPOIs";
+ searchDrawer.searchPOIs("");
+ }
+ } Item {
id: recenterButton
width: parent.width > parent.height ? parent.height * 0.1 : parent.width * 0.1
height: width
@@ -489,6 +504,12 @@ Item {
x: (parent.width * 0.025) + (mapNavigationBar.height / 2) - (width / 2)
state: "routeOverview"
}
+
+ PropertyChanges {
+ target: destinationDetailsBar
+ width: parent.width > parent.height ? parent.height : parent.width
+ visible: true
+ }
},
State {
name: "menuDrawerOpen"