[-]
[+]
|
Changed |
marble.spec
|
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151120.tar.xz/src/apps/marble-maps-sailfishos/NavigationManager.qml
^
|
@@ -12,9 +12,11 @@
import QtQuick 2.2
import QtMultimedia 5.4
+import Sailfish.Silica 1.0
+
import org.kde.edu.marble 0.20
-Item {
+Page {
id: root
property var marbleItem: null
property var tts: null
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151120.tar.xz/src/apps/marble-maps-sailfishos/PlacemarkDialog.qml
^
|
@@ -19,9 +19,9 @@
id: root
property var placemark: null
- property string actionIconSource: rowLayout.currentItem === addDestinationButton ? routeEditor.currentProfileIcon : "qrc:///add.png"
+ property string actionIconSource: rowLayout.currentItem === addDestinationSwitch ? routeEditor.currentProfileIcon : "qrc:///add.png"
- height: placemark === null ? 0 : Theme.paddingLarge * 2 + Math.max(infoLayout.height, actionsLayout.height)
+ height: placemark === null ? 0 : Theme.horizontalPageMargin * 2 + Math.max(infoLayout.height, actionsLayout.height)
function addToRoute() {
rowLayout.currentItem.execute()
@@ -77,78 +77,65 @@
anchors {
right: parent.right
rightMargin: Theme.horizontalPageMargin
- bottom: parent.bottom
+ bottomMargin: Theme.horizontalPageMargin
}
- ComboBox {
+ Item {
+ id: spacer
+ height: Theme.itemSizeSmall * 0.5
+ width: 1
+ }
+
+ Row {
id: rowLayout
anchors.right: parent.right
+ spacing: Theme.paddingSmall
+ property Item currentItem: addDestinationSwitch
- menu: ContextMenu {
- MenuItem {
- text: qsTr("Car (fastest)");
- function execute() {
- }
+ RouteProfileRadioButton {
+ id: addDepartureSwitch
+ visible: routing.routeRequestModel.count === 0
+ icon.source: "qrc:///ic_place_departure.png"
+ onClicked: { rowLayout.setCurrentItem(addDepartureSwitch); }
+ function execute() {
+ routing.addViaByPlacemarkAtIndex(0, placemark);
+// routing.removeSearchResultPlacemark(placemark); TODO: missing in Routing API
+ placemark = null;
}
- MenuItem {
- text: qsTr("Bicycle");
- function execute() {
- }
+ }
+ RouteProfileRadioButton {
+ id: addPlaceViaSwitch
+ icon.source: "qrc:///ic_place_via.png"
+ onClicked: { rowLayout.setCurrentItem(addPlaceViaSwitch); }
+ function execute() {
+ ensureRouteHasDeparture();
+ routing.addViaByPlacemark(placemark);
+ routing.clearSearchResultPlacemarks();
+ placemark = null;
}
- MenuItem {
- id: addDestinationButton
- text: qsTr("Pedestrian");
- function execute() {
- }
+ }
+ RouteProfileRadioButton {
+ id: addDestinationSwitch
+ checked: true
+ icon.source: "qrc:///ic_place_arrival.png"
+ onClicked: { rowLayout.setCurrentItem(addDestinationSwitch); }
+ function execute() {
+ ensureRouteHasDeparture();
+ routing.addViaByPlacemarkAtIndex(routing.waypointCount(), placemark);
+ routing.clearSearchResultPlacemarks();
+ placemark = null;
+ }
+ }
+
+ function setCurrentItem(item) {
+ if (currentItem !== item) {
+ currentItem = item;
+ [addDepartureSwitch, addPlaceViaSwitch, addDestinationSwitch].forEach(function(i) {
+ i.checked = (i === item);
+ });
}
}
}
-// Row {
-// id: rowLayout
-// anchors.right: parent.right
-// spacing: 0
-//
-// TODO: no such item in silica
-// ExclusiveGroup {
-// id: viaGroup
-// }
-//
-// RouteProfileRadioButton {
-// anchors.margins: 0
-// visible: routing.routeRequestModel.count === 0
-// exclusiveGroup: viaGroup
-// imageSource: "qrc:///ic_place_departure.png"
-// function execute() {
-// routing.addViaByPlacemarkAtIndex(0, placemark);
-// routing.removeSearchResultPlacemark(placemark);
-// placemark = null;
-// }
-// }
-// RouteProfileRadioButton {
-// anchors.margins: 0
-// exclusiveGroup: viaGroup
-// imageSource: "qrc:///ic_place_via.png"
-// function execute() {
-// ensureRouteHasDeparture()
-// routing.addViaByPlacemark(placemark)
-// routing.clearSearchResultPlacemarks();
-// placemark = null;
-// }
-// }
-// RouteProfileRadioButton {
-// id: addDestinationButton
-// anchors.margins: 0
-// checked: true
-// exclusiveGroup: viaGroup
-// imageSource: "qrc:///ic_place_arrival.png"
-// function execute() {
-// ensureRouteHasDeparture()
-// routing.addViaByPlacemarkAtIndex(routing.waypointCount(), placemark)
-// routing.clearSearchResultPlacemarks();
-// placemark = null;
-// }
-// }
-// }
}
function ensureRouteHasDeparture() {
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151120.tar.xz/src/apps/marble-maps-sailfishos/RouteProfileRadioButton.qml
^
|
@@ -8,32 +8,26 @@
// Copyright 2015 Dennis Nienhüser <nienhueser@kde.org>
//
-import QtQuick 2.4
+import QtQuick 2.2
-RadioButton {
+import Sailfish.Silica 1.0
+
+BackgroundItem {
id: root
- property string imageSource
- SystemPalette{
- id: palette
- colorGroup: SystemPalette.Active
- }
+ property alias icon: image
+ property bool checked: false
+
+ width: image.width
+ height: image.height + 2 * Theme.paddingSmall
+ highlighted: checked
- style: RadioButtonStyle {
- indicator: Rectangle {
- color: control.checked ? palette.highlight : palette.base
- width: image.width
- height: image.height + Screen.pixelDensity * 1
- radius: Screen.pixelDensity * 1
-
- Image {
- anchors.centerIn: parent
- id: image
- width: Screen.pixelDensity * 5
- height: width
- fillMode: Image.PreserveAspectFit
- source: root.imageSource
- }
- }
+ Image {
+ id: image
+ anchors.centerIn: parent
+ fillMode: Image.PreserveAspectFit
+ opacity: parent.enabled ? 1.0 : 0.4
+ width: Theme.iconSizeSmall
+ height: Theme.iconSizeSmall
}
}
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151120.tar.xz/src/apps/marble-maps-sailfishos/WaypointImage.qml
^
|
@@ -9,8 +9,8 @@
//
import QtQuick 2.2
-import QtGraphicalEffects 1.0
-import QtQuick.Window 2.0
+
+import Sailfish.Silica 1.0
import org.kde.edu.marble 0.20
@@ -22,12 +22,16 @@
signal clicked()
- width: Screen.pixelDensity * 6
+ width: image.width
height: width
Image {
id: image
- anchors.fill: parent
+ anchors.centerIn: parent
+ fillMode: Image.PreserveAspectFit
+
+ width: Theme.iconSizeSmall
+ height: width
states: [
State {
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151120.tar.xz/src/lib/marble/declarative/MarbleDeclarativePlugin.cpp
^
|
@@ -78,6 +78,7 @@
qmlRegisterUncreatableType<BookmarksModel>( uri, 0, 20, "BookmarksModel", "Do not create" );
qmlRegisterUncreatableType<Marble::AbstractFloatItem>( uri, 0, 20, "FloatItem", "Do not create" );
qmlRegisterUncreatableType<Marble::RenderPlugin>( uri, 0, 20, "RenderPlugin", "Do not create" );
+ qmlRegisterUncreatableType<Marble::MarbleMap>( uri, 0, 20, "MarbleMap", "Do not create" );
}
void MarbleDeclarativePlugin::initializeEngine( QQmlEngine *engine, const char *)
|
[-]
[+]
|
Changed |
marble.yaml
^
|
@@ -1,6 +1,6 @@
Name: marble
Summary: Virtual Globe
-Version: 1.12.20_sfos_151119
+Version: 1.12.20_sfos_151120
Release: 1
Group: Applications/Engineering
License: LGPLv2+
|