Warning, /plasma-mobile/mycroft-plasmoid-mobile/plasmoid/contents/ui/PlacesType.qml is written in an unsupported language. File is not indexed.

0001 /* Copyright 2016 Aditya Mehra <aix.m@outlook.com>                            
0002 
0003     This library is free software; you can redistribute it and/or
0004     modify it under the terms of the GNU Lesser General Public
0005     License as published by the Free Software Foundation; either
0006     version 2.1 of the License, or (at your option) version 3, or any
0007     later version accepted by the membership of KDE e.V. (or its
0008     successor approved by the membership of KDE e.V.), which shall
0009     act as a proxy defined in Section 6 of version 3 of the license.
0010     
0011     This library is distributed in the hope that it will be useful,
0012     but WITHOUT ANY WARRANTY; without even the implied warranty of
0013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014     Lesser General Public License for more details.
0015     
0016     You should have received a copy of the GNU Lesser General Public
0017     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 
0020 import QtQuick 2.9
0021 import QtQml.Models 2.2
0022 import QtQuick.Controls 2.2
0023 import QtQuick.Layouts 1.3
0024 import org.kde.plasma.core 2.0 as PlasmaCore
0025 import org.kde.plasma.plasmoid 2.0
0026 import org.kde.plasma.components 2.0 as PlasmaComponents
0027 import QtWebKit 3.0
0028 import QtWebKit.experimental 1.0
0029 
0030 Rectangle {
0031     id: partclc
0032     height: cbheight
0033     width: cbwidth
0034     color: theme.backgroundColor
0035     property alias routeLmodel: routeListModel
0036     
0037     Component.onCompleted: {
0038         console.log(cbheight)
0039     }
0040     
0041 ListModel {
0042         id: routeListModel
0043 }
0044 
0045 ListView {
0046      id: placesmodelview
0047      anchors.fill: parent
0048      model: plcLmodel
0049      spacing: 4
0050      focus: false
0051      interactive: true
0052      clip: true;
0053      delegate: PlacesDelegate{}
0054      ScrollBar.vertical: ScrollBar {
0055         active: true
0056         policy: ScrollBar.AlwaysOn
0057         snapMode : ScrollBar.SnapAlways
0058       }
0059     }
0060 
0061 Drawer {
0062     id: navMapDrawer
0063     width: parent.width
0064     height: cbdrawercontentheight
0065     edge: Qt.RightEdge
0066     dragMargin: 0
0067     property alias getURL: navMapView.url
0068 
0069     Rectangle {
0070             id: navParentRect
0071             width: parent.width
0072             height: parent.height
0073             color: Qt.lighter(theme.backgroundColor, 1.2)
0074 
0075         WebView {
0076             id: navMapView
0077             width: parent.width
0078             height: parent.height / 2
0079             experimental.useDefaultContentItemSize: true
0080             experimental.userStyleSheets: "../code/maps.css"
0081             experimental.page.height: navMapView.height
0082             experimental.page.width: parent.width
0083             }
0084 
0085         ListView {
0086             id: navMapDirections
0087             anchors.top: navMapView.bottom
0088             anchors.left: parent.left
0089             anchors.right: parent.right
0090             anchors.bottom: parent.bottom
0091             model: routeLmodel
0092             spacing: 2
0093             focus: false
0094             interactive: true
0095             clip: true;
0096             delegate: NavigationDelegate{}
0097             ScrollBar.vertical: ScrollBar {
0098                active: true
0099                policy: ScrollBar.AlwaysOn
0100                snapMode : ScrollBar.SnapAlways
0101            }
0102          }
0103       }
0104    }
0105 }
0106