forked from papyros/qml-material
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigationDrawerPage.qml
More file actions
40 lines (31 loc) · 989 Bytes
/
Copy pathNavigationDrawerPage.qml
File metadata and controls
40 lines (31 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* QML Material - An application framework implementing Material Design.
*
* Copyright (C) 2016 Michael Spencer <sonrisesoftware@gmail.com>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import QtQuick 2.4
import QtQuick.Controls 1.3 as Controls
Page {
id: navPage
backAction: navDrawer.action
title: page.title
actions: page.actions
actionBar.backgroundColor: page.actionBar.backgroundColor
actionBar.decorationColor: page.actionBar.decorationColor
property var navDrawer
property var page
function navigate(page) {
navPage.page = page
navDrawer.close()
}
onNavDrawerChanged: navDrawer.parent = navPage
onPageChanged: stackView.push({ item: page, replace: true })
Controls.StackView {
id: stackView
anchors.fill: parent
}
}