Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/contents/ui/PlacesType.qml
1 | import QtQuick 2.9 | 1 | import QtQuick 2.9 | ||
---|---|---|---|---|---|
2 | import QtQml.Models 2.2 | 2 | import QtQml.Models 2.2 | ||
3 | import QtQuick.Controls 2.2 | 3 | import QtQuick.Controls 2.2 | ||
4 | import QtQuick.Layouts 1.3 | 4 | import QtQuick.Layouts 1.3 | ||
5 | import org.kde.plasma.core 2.0 as PlasmaCore | 5 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
6 | import org.kde.plasma.plasmoid 2.0 | 6 | import org.kde.plasma.plasmoid 2.0 | ||
7 | import org.kde.plasma.components 2.0 as PlasmaComponents | 7 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
8 | import QtWebKit 3.0 | ||||
9 | import QtWebKit.experimental 1.0 | ||||
8 | 10 | | |||
9 | Rectangle { | 11 | Rectangle { | ||
10 | id: partclc | 12 | id: partclc | ||
11 | height: units.gridUnit * 15 | 13 | height: cbheight | ||
12 | width: cbwidth | 14 | width: cbwidth | ||
13 | color: theme.backgroundColor | 15 | color: theme.backgroundColor | ||
16 | property alias routeLmodel: routeListModel | ||||
17 | | ||||
18 | Component.onCompleted: { | ||||
19 | console.log(cbheight) | ||||
20 | } | ||||
21 | | ||||
22 | ListModel { | ||||
23 | id: routeListModel | ||||
24 | } | ||||
14 | 25 | | |||
15 | ListView { | 26 | ListView { | ||
16 | id: placesmodelview | 27 | id: placesmodelview | ||
17 | anchors.fill: parent | 28 | anchors.fill: parent | ||
18 | model: plcLmodel | 29 | model: plcLmodel | ||
19 | spacing: 4 | 30 | spacing: 4 | ||
20 | focus: false | 31 | focus: false | ||
21 | interactive: true | 32 | interactive: true | ||
22 | clip: true; | 33 | clip: true; | ||
23 | delegate: PlacesDelegate{} | 34 | delegate: PlacesDelegate{} | ||
24 | ScrollBar.vertical: ScrollBar { | 35 | ScrollBar.vertical: ScrollBar { | ||
25 | active: true | 36 | active: true | ||
26 | policy: ScrollBar.AlwaysOn | 37 | policy: ScrollBar.AlwaysOn | ||
27 | snapMode : ScrollBar.SnapAlways | 38 | snapMode : ScrollBar.SnapAlways | ||
28 | } | 39 | } | ||
29 | } | 40 | } | ||
41 | | ||||
42 | Drawer { | ||||
43 | id: navMapDrawer | ||||
44 | width: parent.width | ||||
45 | height: cbdrawercontentheight | ||||
46 | edge: Qt.RightEdge | ||||
47 | dragMargin: 0 | ||||
48 | property alias getURL: navMapView.url | ||||
49 | | ||||
50 | Rectangle { | ||||
51 | id: navParentRect | ||||
52 | width: parent.width | ||||
53 | height: parent.height | ||||
54 | color: Qt.lighter(theme.backgroundColor, 1.2) | ||||
55 | | ||||
56 | WebView { | ||||
57 | id: navMapView | ||||
58 | width: parent.width | ||||
59 | height: parent.height / 2 | ||||
60 | experimental.useDefaultContentItemSize: true | ||||
61 | experimental.userStyleSheets: "../code/maps.css" | ||||
62 | experimental.page.height: navMapView.height | ||||
63 | experimental.page.width: parent.width | ||||
64 | } | ||||
65 | | ||||
66 | ListView { | ||||
67 | id: navMapDirections | ||||
68 | anchors.top: navMapView.bottom | ||||
69 | anchors.left: parent.left | ||||
70 | anchors.right: parent.right | ||||
71 | anchors.bottom: parent.bottom | ||||
72 | model: routeLmodel | ||||
73 | spacing: 2 | ||||
74 | focus: false | ||||
75 | interactive: true | ||||
76 | clip: true; | ||||
77 | delegate: NavigationDelegate{} | ||||
78 | ScrollBar.vertical: ScrollBar { | ||||
79 | active: true | ||||
80 | policy: ScrollBar.AlwaysOn | ||||
81 | snapMode : ScrollBar.SnapAlways | ||||
82 | } | ||||
83 | } | ||||
84 | } | ||||
85 | } | ||||
30 | } | 86 | } | ||
31 | 87 | |