summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-01-13 12:49:05 +0100
committerlouis <louis.braun@gmx.de>2015-01-13 12:49:05 +0100
commite13811af7f525f973257dcb1bb833fcff7732dc8 (patch)
tree39753617dd2acff72d508a9faee1b5ef2ae97da7
parent30b3a8c935c019154ab50d099b499fe170efc196 (diff)
downloadvdr-plugin-skindesigner-e13811af7f525f973257dcb1bb833fcff7732dc8.tar.gz
vdr-plugin-skindesigner-e13811af7f525f973257dcb1bb833fcff7732dc8.tar.bz2
added weatherforecast template
-rw-r--r--services/weatherforecast.h4
-rw-r--r--skins/metrixhd/themes/default/menuicons/pluginicons/weatherforecast.pngbin0 -> 1726 bytes
-rw-r--r--skins/metrixhd/xmlfiles/displaychannel.xml12
-rw-r--r--skins/metrixhd/xmlfiles/plug-weatherforecast-weatherforecastdetailcurrent.xml66
-rw-r--r--views/viewhelpers.c3
5 files changed, 81 insertions, 4 deletions
diff --git a/services/weatherforecast.h b/services/weatherforecast.h
index c3f6b48..13f3c1e 100644
--- a/services/weatherforecast.h
+++ b/services/weatherforecast.h
@@ -8,6 +8,8 @@ public:
cServiceCurrentWeather(void) {
timeStamp = "";
temperature = "";
+ minTemperature = "";
+ maxTemperature = "";
apparentTemperature = "";
summary = "";
icon = "";
@@ -26,6 +28,8 @@ public:
std::string timeStamp;
std::string temperature;
std::string apparentTemperature;
+ std::string minTemperature;
+ std::string maxTemperature;
std::string summary;
std::string icon;
std::string precipitationIntensity;
diff --git a/skins/metrixhd/themes/default/menuicons/pluginicons/weatherforecast.png b/skins/metrixhd/themes/default/menuicons/pluginicons/weatherforecast.png
new file mode 100644
index 0000000..a88f11d
--- /dev/null
+++ b/skins/metrixhd/themes/default/menuicons/pluginicons/weatherforecast.png
Binary files differ
diff --git a/skins/metrixhd/xmlfiles/displaychannel.xml b/skins/metrixhd/xmlfiles/displaychannel.xml
index fdf2aea..a7b33af 100644
--- a/skins/metrixhd/xmlfiles/displaychannel.xml
+++ b/skins/metrixhd/xmlfiles/displaychannel.xml
@@ -218,6 +218,8 @@
{timestamp} timestamp of forecast in dd.mm hh:mm
{temperature} current temperature in °C
{apparenttemperature} apparent (feeled) temperature
+ {mintemperature} minimum temperature this day
+ {maxtemperature} maximum temperature this day
{summary} short weather summary
{icon} weather icon
{precipitationintensity} precipitation intensity in l/m2
@@ -233,11 +235,15 @@
{ozone} ozone value in DU
-->
<currentweather>
- <area x="70%" y="15%" width="13%" height="13%" layer="1">
+ <area x="70%" y="15%" width="13%" height="13%" layer="2">
<drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
</area>
- <area x="85%" y="15%" width="13%" height="13%" layer="1">
- <drawtext align="center" valign="center" font="{light}" fontsize="90%" color="{clrWhite}" text="{temperature}°C" />
+ <area x="85%" y="15%" width="13%" height="13%" layer="2">
+ <drawtext x="0" y="0" font="{light}" fontsize="25%" color="{clrWhite}" text="{mintemperature}°C" />
+ <drawtext x="0" y="75%" font="{light}" fontsize="25%" color="{clrWhite}" text="{maxtemperature}°C" />
+ </area>
+ <area x="85%" y="15%" width="13%" height="13%" layer="3">
+ <drawtext align="right" valign="center" font="{light}" fontsize="60%" color="{clrWhite}" text="{temperature}°C" />
</area>
</currentweather>
diff --git a/skins/metrixhd/xmlfiles/plug-weatherforecast-weatherforecastdetailcurrent.xml b/skins/metrixhd/xmlfiles/plug-weatherforecast-weatherforecastdetailcurrent.xml
new file mode 100644
index 0000000..42026d5
--- /dev/null
+++ b/skins/metrixhd/xmlfiles/plug-weatherforecast-weatherforecastdetailcurrent.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE menuplugin SYSTEM "../../../dtd/displaymenuplugin.dtd">
+
+<menuplugin x="0" y="0" width="100%" height="100%" fadetime="0">
+ <background>
+ <area x="0" y="0" width="100%" height="100%" layer="1">
+ <fill color="{clrTransBlack}" />
+ </area>
+ </background>
+
+ <header>
+ <area x="0" y="0" width="1" height="1" layer="1">
+ <fill color="{clrTransparent}" />
+ </area>
+ </header>
+
+ <detailheader>
+ <area x="0" y="0" width="100%" height="20%" layer="2">
+ <fill color="{clrTransBlueLight}" />
+ </area>
+ <area x="0" y="0" width="100%" height="20%" layer="3">
+ <drawtext x="20" valign="center" font="{light}" fontsize="40%" color="{clrWhite}" text="{menuheader}" />
+ </area>
+ <area x="{areawidth} - {areaheight}*0.2" y="0" width="{areaheight}*0.2" height="20%" layer="4">
+ <drawimage imagetype="icon" path="{icon}" align="center" valign="center" width="90%" height="90%"/>
+ </area>
+ <area x="{areawidth} - {areaheight}*0.6" y="0" width="{areaheight}*0.35" height="20%" layer="4">
+ <drawtext align="right" valign="center" font="{light}" fontsize="90%" color="{clrWhite}" text="{temperature}°C" />
+ </area>
+ </detailheader>
+
+ <datetime>
+ <area x="0" y="0" width="1" height="1" layer="1">
+ <fill color="{clrTransparent}" />
+ </area>
+ </datetime>
+
+ <colorbuttons>
+ <area x="0" y="0" width="1" height="1" layer="1">
+ <fill color="{clrTransparent}" />
+ </area>
+ </colorbuttons>
+
+ <scrollbar>
+ <area x="98%" y="20%" width="2%" height="65%" layer="3">
+ <fill color="{clrWhite}" />
+ <drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
+ <drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrWhite}" />
+ </area>
+ </scrollbar>
+
+ <tab name="current" x="2%" y="20%" width="94%" height="65%" layer="2" scrollheight="{areaheight}/4">
+ <drawtext x="0" y="0" font="{semibold}" fontsize="10%" color="{clrWhite}" text="Wetterlage: {summary}" />
+ <drawtext x="0" y="10%" font="{light}" fontsize="10%" color="{clrWhite}" text="Aktuelle Temperatur: {temperature}°C" />
+ <drawtext x="0" y="20%" font="{light}" fontsize="10%" color="{clrWhite}" text="Gefühlte Temperatur: {apparenttemperature}°C" />
+ <drawtext x="0" y="30%" font="{light}" fontsize="10%" color="{clrWhite}" text="heutiges Minimum: {mintemperature}°C, heutiges Maximum: {maxtemperature}°C" />
+ <drawtext x="0" y="40%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagswahrscheinlichkeit: {precipitationprobability} %" />
+ <drawtext x="0" y="50%" font="{light}" fontsize="10%" color="{clrWhite}" text="Niederschlagsmenge: {precipitationintensity} l/qm" />
+ <drawtext x="0" y="60%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftfeuchtigkeit: {humidity} %" />
+ <drawtext x="0" y="70%" font="{light}" fontsize="10%" color="{clrWhite}" text="Windgeschwindigkeit: {windspeed} km/h aus {windbearingstring}" />
+ <drawtext x="0" y="80%" font="{light}" fontsize="10%" color="{clrWhite}" text="Sicht: {visibility} km" />
+ <drawtext x="0" y="90%" font="{light}" fontsize="10%" color="{clrWhite}" text="Bewölkung: {cloudcover} %" />
+ <drawtext x="0" y="100%" font="{light}" fontsize="10%" color="{clrWhite}" text="Luftdruck: {pressure} HPa" />
+ <drawtext x="0" y="110%" font="{light}" fontsize="10%" color="{clrWhite}" text="Ozon: {ozone} DU" />
+ </tab>
+</menuplugin>
diff --git a/views/viewhelpers.c b/views/viewhelpers.c
index af2233a..8fdffaf 100644
--- a/views/viewhelpers.c
+++ b/views/viewhelpers.c
@@ -435,10 +435,11 @@ void cViewHelpers::SetCurrentWeatherTokens(map < string, string > &stringTokens,
if (!pWeatherForecast->Service("GetCurrentWeather", &currentWeather)) {
return;
}
-esyslog("skindesigner: service call successfull");
stringTokens.insert(pair<string,string>("timestamp", currentWeather.timeStamp));
stringTokens.insert(pair<string,string>("temperature", currentWeather.temperature));
stringTokens.insert(pair<string,string>("apparenttemperature", currentWeather.apparentTemperature));
+ stringTokens.insert(pair<string,string>("mintemperature", currentWeather.minTemperature));
+ stringTokens.insert(pair<string,string>("maxtemperature", currentWeather.maxTemperature));
stringTokens.insert(pair<string,string>("summary", currentWeather.summary));
stringTokens.insert(pair<string,string>("icon", currentWeather.icon));
stringTokens.insert(pair<string,string>("precipitationintensity", currentWeather.precipitationIntensity));