Skip to content
Snippets Groups Projects
Commit d7bbed05 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-11655 Implement drawer menu

parent 9ed7ee34
No related branches found
No related tags found
1 merge request!31QDS-11655 Implement drawer menu
Pipeline #66270 passed
...@@ -82,14 +82,13 @@ Rectangle { ...@@ -82,14 +82,13 @@ Rectangle {
id: stackLayout id: stackLayout
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: navFooter.top
anchors.bottomMargin: 10 anchors.bottomMargin: 10
anchors.top: qdsicon1.bottom anchors.top: qdsicon1.bottom
anchors.bottom: root.bottom
anchors.rightMargin: 20 anchors.rightMargin: 20
anchors.leftMargin: 20 anchors.leftMargin: 20
anchors.topMargin: 10 anchors.topMargin: 10
HomePage { HomePage {
id: homePage id: homePage
Layout.fillWidth: true Layout.fillWidth: true
...@@ -120,128 +119,8 @@ Rectangle { ...@@ -120,128 +119,8 @@ Rectangle {
id: headerPage id: headerPage
Layout.fillWidth: true Layout.fillWidth: true
} }
} }
Item {
id: navFooter
y: 703
height: 97
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.rightMargin: 0
anchors.leftMargin: 0
anchors.bottomMargin: 0
Layout.fillHeight: true
Layout.fillWidth: true
Rectangle {
id: rectangle
color: "#cecece"
anchors.fill: parent
RowLayout {
id: row
anchors.fill: parent
anchors.bottomMargin: 31
anchors.rightMargin: 10
anchors.leftMargin: 10
spacing: 5
TabButton {
id: home
text: qsTr("Home")
Layout.fillWidth: true
checked: true
checkable: true
autoExclusive: true
Connections {
target: home
function onClicked(){
stackLayout.currentIndex = 0
}
}
}
TabButton {
id: examples
text: qsTr("Examples")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: examples
function onClicked(){
stackLayout.currentIndex = 1
}
}
}
TabButton {
id: logs
text: qsTr("Logs")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: logs
function onClicked(){
stackLayout.currentIndex = 2
}
}
}
TabButton {
id: network
text: qsTr("Network")
Layout.fillWidth: true
checkable: true
autoExclusive: true
visible: true;
Connections {
target: network
function onClicked(){
stackLayout.currentIndex = 3
}
}
}
TabButton {
id: settings
text: qsTr("Settings")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: settings
function onClicked(){
stackLayout.currentIndex = 4
}
}
}
TabButton {
id: about
text: qsTr("About")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: about
function onClicked(){
stackLayout.currentIndex = 5
}
}
}
}
}
}
states: [ states: [
State { State {
name: "vertical" name: "vertical"
...@@ -271,8 +150,129 @@ Rectangle { ...@@ -271,8 +150,129 @@ Rectangle {
] ]
Drawer {
id: drawer
width: 150
height: root.height
ColumnLayout {
id: column
anchors.fill: parent
anchors.bottomMargin: 31
anchors.rightMargin: 10
anchors.leftMargin: 10
spacing: 5
Image {
id: qdsicon2
source: "content/images/appicon.png"
sourceSize.width: drawer.width / 2
anchors.horizontalCenter: parent.horizontalCenter
}
TabButton {
id: home
text: qsTr("Home")
Layout.fillWidth: true
checked: true
checkable: true
autoExclusive: true
Connections {
target: home
function onClicked(){
stackLayout.currentIndex = 0
}
}
}
TabButton {
id: examples
text: qsTr("Examples")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: examples
function onClicked(){
stackLayout.currentIndex = 1
}
}
}
TabButton {
id: logs
text: qsTr("Logs")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: logs
function onClicked(){
stackLayout.currentIndex = 2
}
}
}
TabButton {
id: network
text: qsTr("Network")
Layout.fillWidth: true
checkable: true
autoExclusive: true
visible: true;
Connections {
target: network
function onClicked(){
stackLayout.currentIndex = 3
}
}
}
TabButton {
id: settings
text: qsTr("Settings")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: settings
function onClicked(){
stackLayout.currentIndex = 4
}
}
}
TabButton {
id: about
text: qsTr("About")
Layout.fillWidth: true
checkable: true
autoExclusive: true
Connections {
target: about
function onClicked(){
stackLayout.currentIndex = 5
}
}
}
}
}
Button {
id: menuButon
x: 8
y: 8
text: qsTr("Menu")
Connections {
target: menuButon
function onClicked(){
drawer.open();
}
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment