summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@users.noreply.github.com>2017-06-21 22:08:18 +0200
committerGitHub <noreply@github.com>2017-06-21 22:08:18 +0200
commit3b13701adfa9ccbcf442c5611a80ad2568040cd1 (patch)
tree959ec50f66df234c797f0a49411ddb7a7b7b7f81 /navit
parent18ce924a1daaad37ae460cb70079ca7fa47f6a4f (diff)
downloadnavit-3b13701adfa9ccbcf442c5611a80ad2568040cd1.tar.gz
Sailfish config (#271)R7642
* Create config using xslt This converts the sailfish build to use xslt instead of predefined config. Unfortunately getting the zoom levels right is pain in the ass and therefor not (yet) done. * Configure internal gui for sailfish * Enable drag_bitmap * Move zoom buttons to overlay to remove them from bitmap drag * sailfish: use android style cursors for Car * fix: add build deps for newer sdk version. Add heightlines map * Remove standalone Sailfish config Got obsolete since this is now generated from xslt
Diffstat (limited to 'navit')
-rw-r--r--navit/xslt/sailfish_cursor.xslt114
-rw-r--r--navit/xslt/sailfish_disable.xslt56
-rw-r--r--navit/xslt/sailfish_gui.xslt35
-rw-r--r--navit/xslt/sailfish_mapset.xslt32
-rw-r--r--navit/xslt/sailfish_osd.xslt38
-rw-r--r--navit/xslt/sailfish_qt5.xslt42
-rw-r--r--navit/xslt/sailfish_svg.xslt34
7 files changed, 351 insertions, 0 deletions
diff --git a/navit/xslt/sailfish_cursor.xslt b/navit/xslt/sailfish_cursor.xslt
new file mode 100644
index 000000000..01029638c
--- /dev/null
+++ b/navit/xslt/sailfish_cursor.xslt
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/layout[@name='Car' or @name='Car-dark']/cursor">
+ <cursor w="57" h="57">
+ <xsl:text>&#x0A; </xsl:text>
+ <itemgra speed_range="-2">
+ <xsl:text>&#x0A; </xsl:text>
+ <polyline color="#00BC00" radius="0" width="4">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="0"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polyline>
+ <xsl:text>&#x0A; </xsl:text>
+ <circle color="#008500" radius="9" width="3">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="0"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </circle>
+ <xsl:text>&#x0A; </xsl:text>
+ <circle color="#00BC00" radius="13" width="3">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="0"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </circle>
+ <xsl:text>&#x0A; </xsl:text>
+ <circle color="#008500" radius="18" width="3">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="0"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </circle>
+ <xsl:text>&#x0A; </xsl:text>
+ </itemgra>
+ <xsl:text>&#x0A; </xsl:text>
+ <itemgra speed_range="3-">
+ <xsl:text>&#x0A; </xsl:text>
+ <polygon color="#00000066">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-27"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="12"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="21" y="-27"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="-12"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-27"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polygon>
+ <xsl:text>&#x0A; </xsl:text>
+ <polygon color="#008500">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="21"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="-3"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polygon>
+ <xsl:text>&#x0A; </xsl:text>
+ <polygon color="#00BC00">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="21"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="-3"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polygon>
+ <xsl:text>&#x0A; </xsl:text>
+ <polyline color="#008500" width="1">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="21"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="-3"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="-21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polyline>
+ <xsl:text>&#x0A; </xsl:text>
+ <polyline color="#008500" width="1">
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="21"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="0" y="-3"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <coord x="21" y="-18"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </polyline>
+ <xsl:text>&#x0A; </xsl:text>
+ </itemgra>
+ <xsl:text>&#x0A; </xsl:text>
+ </cursor>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_disable.xslt b/navit/xslt/sailfish_disable.xslt
new file mode 100644
index 000000000..4f730b00e
--- /dev/null
+++ b/navit/xslt/sailfish_disable.xslt
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Disable all vehicles -->
+ <xsl:template match="vehicle">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="enabled">no</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <!-- Disable all graphics -->
+ <xsl:template match="graphics">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="enabled">no</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <!-- Disable all mapsets -->
+ <xsl:template match="mapset">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="enabled">no</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <!-- Disable all osd -->
+ <xsl:template match="osd">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="enabled">no</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <!-- Disable all speech -->
+ <xsl:template match="speech">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="enabled">no</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_gui.xslt b/navit/xslt/sailfish_gui.xslt
new file mode 100644
index 000000000..2f2c8fd02
--- /dev/null
+++ b/navit/xslt/sailfish_gui.xslt
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="drag_bitmap">1</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/gui[@type='internal']">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:attribute name="font_size">350</xsl:attribute>
+ <xsl:attribute name="icon_xs">32</xsl:attribute>
+ <xsl:attribute name="icon_s">96</xsl:attribute>
+ <xsl:attribute name="icon_l">96</xsl:attribute>
+ <xsl:attribute name="enabled">yes</xsl:attribute>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_mapset.xslt b/navit/xslt/sailfish_mapset.xslt
new file mode 100644
index 000000000..2febc81f4
--- /dev/null
+++ b/navit/xslt/sailfish_mapset.xslt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/mapset[1]">
+ <mapset enabled="yes">
+ <xsl:text>&#x0A; </xsl:text>
+ <map type="binfile" enabled="yes" active="no" data="/usr/share/harbour-navit/maps/osm_bbox_11.3,47.9,11.7,48.2.bin"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <map type="binfile" enabled="yes" data="~/Maps/map.navit.bin"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <map type="binfile" enabled="yes" active="no" name="map.navit.heightlines.bin" data="~/Maps/map.navit.heightlines.bin"/>
+ <xsl:text>&#x0A; </xsl:text>
+ </mapset>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_osd.xslt b/navit/xslt/sailfish_osd.xslt
new file mode 100644
index 000000000..ca9925a49
--- /dev/null
+++ b/navit/xslt/sailfish_osd.xslt
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/osd[1]">
+ <osd enabled="yes" type="gps_status" x="0" y="0" w="50" h="50"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="no" type="text" label="${{vehicle.position_sats_used}}/${{vehicle.position_qual}}" x="0" y="0" w="50" h="50" background_color="#00000058" font_size="400"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="text" label="${{vehicle.position_speed}}" x="50" y="0" w="150" h="50" background_color="#00000058" font_size="400"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="text" label="${{navigation.item.destination_length[named]}}" x="200" y="0" w="240" h="50" background_color="#00000058" font_size="400"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="navigation_next_turn" x="-100" y="0" w="100" h="100" icon_w="90" icon_h="80" background_color="#00000058"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="button" x="-96" y="-96" w="96" h="96" command="zoom_in()" src="zoom_in" use_overlay="true"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="text" label="${{navigation.item[1].length[named]}}" x="-100" y="100" w="100" h="50" background_color="#00000058" font_size="400"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <osd enabled="yes" type="button" x="0" y="-96" w="96" h="96" command="zoom_out()" src="zoom_out" use_overlay="true"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_qt5.xslt b/navit/xslt/sailfish_qt5.xslt
new file mode 100644
index 000000000..5ee20e2e9
--- /dev/null
+++ b/navit/xslt/sailfish_qt5.xslt
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/graphics[1]">
+ <graphics type="qt5" qt5_platform="wayland"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/vehicle[1]">
+ <vehicle name="Qt5" profilename="car" enabled="yes" active="1" source="qt5://"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/config/navit/speech[1]">
+ <speech type="qt5_espeak" cps="15"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/navit/xslt/sailfish_svg.xslt b/navit/xslt/sailfish_svg.xslt
new file mode 100644
index 000000000..7203ed34d
--- /dev/null
+++ b/navit/xslt/sailfish_svg.xslt
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>
+
+ <!-- Default rule: copy all -->
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Force all png icons to svg and add w and h if not exist -->
+ <xsl:template match="icon">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:if test="@src[substring(., string-length()-3)='.png']|@src[substring(., string-length()-3)='.xpm']">
+ <xsl:attribute name="src">
+ <xsl:value-of select="concat(substring(@src,1, string-length(@src)-3),'svg')"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="not(@h)">
+ <xsl:attribute name="h">15</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="not(@w)">
+ <xsl:attribute name="w">15</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>