diff options
author | louis <louis.braun@gmx.de> | 2014-01-15 18:25:37 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-01-15 18:25:37 +0100 |
commit | 02b1fba7426d98d106a62d21615f55ae12661beb (patch) | |
tree | 4fa3b42ba3b3e6f42a23cf75c935eab1bc7f2881 | |
parent | 88bb260f4d234a13fd0c99b9e03436bda6d10f0a (diff) | |
download | vdr-plugin-tvguide-02b1fba7426d98d106a62d21615f55ae12661beb.tar.gz vdr-plugin-tvguide-02b1fba7426d98d106a62d21615f55ae12661beb.tar.bz2 |
Display baseline for current time
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | po/ca_ES.po | 5 | ||||
-rwxr-xr-x | po/de_DE.po | 5 | ||||
-rw-r--r-- | po/ru_RU.po | 5 | ||||
-rw-r--r-- | po/sk_SK.po | 5 | ||||
-rw-r--r-- | setup.c | 2 | ||||
-rw-r--r-- | themes/tvguide-blue.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-darkblue.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-darkred.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-darkredNG.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-default.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-green.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-iceblue.theme | 1 | ||||
-rw-r--r-- | themes/tvguide-keepitsimple.theme | 1 | ||||
-rw-r--r-- | timeline.c | 26 | ||||
-rw-r--r-- | timeline.h | 6 | ||||
-rw-r--r-- | timer.c | 7 | ||||
-rw-r--r-- | timer.h | 2 |
20 files changed, 69 insertions, 7 deletions
@@ -106,3 +106,4 @@ Version 1.1.0 - restructured detailöed EPG View that tv frame and status buttons are displayed - Favorites menu with EPG Search favorite timers with blue key +- Display baseline for current time @@ -12,6 +12,7 @@ cTvguideConfig::cTvguideConfig() { displayTime = 160;
displayStatusHeader = 1;
displayChannelGroups = 1;
+ displayTimeBase = 1;
headerHeightPercent = 20;
channelGroupsPercent = 5;
epgViewBorder = 50;
@@ -216,6 +217,7 @@ bool cTvguideConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "showTimeInGrid") == 0) showTimeInGrid = atoi(Value);
else if (strcmp(Name, "displayStatusHeader") == 0) displayStatusHeader = atoi(Value);
else if (strcmp(Name, "displayChannelGroups") == 0) displayChannelGroups = atoi(Value);
+ else if (strcmp(Name, "displayTimeBase") == 0) displayTimeBase = atoi(Value);
else if (strcmp(Name, "headerHeightPercent") == 0) headerHeightPercent = atoi(Value);
else if (strcmp(Name, "channelGroupsPercent") == 0) channelGroupsPercent = atoi(Value);
else if (strcmp(Name, "epgViewBorder") == 0) epgViewBorder = atoi(Value);
@@ -54,6 +54,7 @@ class cTvguideConfig { int displayTime;
int displayStatusHeader;
int displayChannelGroups;
+ int displayTimeBase;
int headerHeightPercent;
int channelGroupsPercent;
int epgViewBorder;
@@ -190,6 +191,7 @@ THEME_CLR(theme, clrTimeline1, clrWhite); THEME_CLR(theme, clrTimeline1Blending, 0xFF828282);
THEME_CLR(theme, clrTimeline2, clrBlack);
THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F);
+THEME_CLR(theme, clrTimeBase, 0xA0FF0000);
THEME_CLR(theme, clrButtonRed, 0x00000000);
THEME_CLR(theme, clrButtonRedBorder, 0x00000000);
THEME_CLR(theme, clrButtonGreen, 0x00000000);
diff --git a/po/ca_ES.po b/po/ca_ES.po index 0bcb159..ce1a8f3 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-tvguide 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-01-14 17:00+0100\n" +"POT-Creation-Date: 2014-01-15 18:19+0100\n" "PO-Revision-Date: 2013-09-21 17:49+0200\n" "Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n" "Language-Team: \n" @@ -648,6 +648,9 @@ msgstr "Alçada dels grups de canals (% alçada OSD)" msgid "Width of channel groups (Perc. of osd width)" msgstr "Amplada dels grups de canals (% amplada OSD)" +msgid "Display current time baseline" +msgstr "" + msgid "Show Channel Logos" msgstr "Mosta Logotip del canal" diff --git a/po/de_DE.po b/po/de_DE.po index 90ac008..5dde422 100755 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-tvguide 0.0.1\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-01-14 17:00+0100\n" +"POT-Creation-Date: 2014-01-15 18:19+0100\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n" "Last-Translator: Horst\n" "Language-Team: \n" @@ -645,6 +645,9 @@ msgstr "Höhe der Kanalgruppen (% der OSD Höhe)" msgid "Width of channel groups (Perc. of osd width)" msgstr "Breite der Kanalgruppen (% der OSD Breite)" +msgid "Display current time baseline" +msgstr "Linie für aktuelle Uhrzeit anzeigen" + msgid "Show Channel Logos" msgstr "Kanallogos anzeigen" diff --git a/po/ru_RU.po b/po/ru_RU.po index 1eeb7d9..5a646d8 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-tvguide 1.0.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-01-14 17:00+0100\n" +"POT-Creation-Date: 2014-01-15 18:19+0100\n" "PO-Revision-Date: 2013-09-25 17:49+0400\n" "Last-Translator: AmiD, ilya\n" "Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n" @@ -645,6 +645,9 @@ msgstr "Высота группы каналов (% от высоты OSD)" msgid "Width of channel groups (Perc. of osd width)" msgstr "Ширина группы каналов (% от ширины OSD)" +msgid "Display current time baseline" +msgstr "" + msgid "Show Channel Logos" msgstr "Показывать логотипы каналов" diff --git a/po/sk_SK.po b/po/sk_SK.po index d2baeba..1e20006 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-tvguide 1.1.0\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-01-14 17:00+0100\n" +"POT-Creation-Date: 2014-01-15 18:19+0100\n" "PO-Revision-Date: 2013-09-15 00:12+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -645,6 +645,9 @@ msgstr "Vka skupiny kanla (% z OSD vky)" msgid "Width of channel groups (Perc. of osd width)" msgstr "rka skupiny kanla (% z OSD rky)" +msgid "Display current time baseline" +msgstr "" + msgid "Show Channel Logos" msgstr "Zobrazi log kanlov" @@ -63,6 +63,7 @@ void cTvguideSetup::Store(void) { SetupStore("showTimeInGrid", tvguideConfig.showTimeInGrid); SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader); SetupStore("displayChannelGroups", tvguideConfig.displayChannelGroups); + SetupStore("displayTimeBase", tvguideConfig.displayTimeBase); SetupStore("headerHeightPercent", tvguideConfig.headerHeightPercent); SetupStore("channelGroupsPercent", tvguideConfig.channelGroupsPercent); SetupStore("epgViewBorder", tvguideConfig.epgViewBorder); @@ -263,6 +264,7 @@ void cMenuSetupScreenLayout::Set(void) { } } + Add(new cMenuEditBoolItem(tr("Display current time baseline"), &tmpTvguideConfig->displayTimeBase)); Add(new cMenuEditStraItem(tr("Show Channel Logos"), &tmpTvguideConfig->hideChannelLogos, 2, hideChannelLogosItems)); if (!tmpTvguideConfig->hideChannelLogos) { Add(InfoItem(tr("Logo Path used"), *tvguideConfig.logoPath)); diff --git a/themes/tvguide-blue.theme b/themes/tvguide-blue.theme index 5fa4b9c..25f8bf2 100644 --- a/themes/tvguide-blue.theme +++ b/themes/tvguide-blue.theme @@ -21,6 +21,7 @@ clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 clrTimeline2Blending = 903F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 diff --git a/themes/tvguide-darkblue.theme b/themes/tvguide-darkblue.theme index 8340587..7fd6feb 100644 --- a/themes/tvguide-darkblue.theme +++ b/themes/tvguide-darkblue.theme @@ -21,6 +21,7 @@ clrTimeline1 = FFFFFFFF clrTimeline1Blending = FF828282 clrTimeline2 = FF000000 clrTimeline2Blending = FF3F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 diff --git a/themes/tvguide-darkred.theme b/themes/tvguide-darkred.theme index 9e9a3b4..a1af3ac 100644 --- a/themes/tvguide-darkred.theme +++ b/themes/tvguide-darkred.theme @@ -21,6 +21,7 @@ clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 clrTimeline2Blending = 903F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 diff --git a/themes/tvguide-darkredNG.theme b/themes/tvguide-darkredNG.theme index 097710d..c59363a 100644 --- a/themes/tvguide-darkredNG.theme +++ b/themes/tvguide-darkredNG.theme @@ -21,6 +21,7 @@ clrTimeline1 = FFFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = FF000000 clrTimeline2Blending = 903F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 diff --git a/themes/tvguide-default.theme b/themes/tvguide-default.theme index 3310cc3..05f8683 100644 --- a/themes/tvguide-default.theme +++ b/themes/tvguide-default.theme @@ -21,6 +21,7 @@ clrTimeline1 = FFFFFFFF clrTimeline1Blending = FF828282 clrTimeline2 = FF000000 clrTimeline2Blending = FF3F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 00000000 clrButtonRedBorder = 00000000 clrButtonGreen = 00000000 diff --git a/themes/tvguide-green.theme b/themes/tvguide-green.theme index e113882..e86f512 100644 --- a/themes/tvguide-green.theme +++ b/themes/tvguide-green.theme @@ -21,6 +21,7 @@ clrTimeline1 = BBFFFFFF clrTimeline1Blending = 90828282 clrTimeline2 = BB000000 clrTimeline2Blending = 903F3F3F +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 diff --git a/themes/tvguide-iceblue.theme b/themes/tvguide-iceblue.theme index 2b36c26..766f77d 100644 --- a/themes/tvguide-iceblue.theme +++ b/themes/tvguide-iceblue.theme @@ -17,6 +17,7 @@ clrTimeline1 = FFDDDDDD clrTimeline1Blending = 00000000 clrTimeline2 = FF000000 clrTimeline2Blending = 00000000 +clrTimeBase = A0FF0000 clrButtonRed = FFBB0000 clrButtonRedBorder = FF000000 clrButtonGreen = FF00BB00 diff --git a/themes/tvguide-keepitsimple.theme b/themes/tvguide-keepitsimple.theme index 7dec01f..e329523 100644 --- a/themes/tvguide-keepitsimple.theme +++ b/themes/tvguide-keepitsimple.theme @@ -17,6 +17,7 @@ clrTimeline1 = FF737CA1 clrTimeline1Blending = 00000000 clrTimeline2 = FF2B3856 clrTimeline2Blending = 00000000 +clrTimeBase = A0FF0000 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonGreen = 9900BB00 @@ -16,6 +16,10 @@ cTimeLine::cTimeLine(cMyTime *myTime) { 0,
geoManager.timeLineWidth,
1440*geoManager.minutePixel));
+ timeBase = osdManager.requestPixmap(3, cRect(0,
+ geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
+ geoManager.osdWidth,
+ geoManager.timeLineGridHeight));
} else if (tvguideConfig.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight,
@@ -29,8 +33,12 @@ cTimeLine::cTimeLine(cMyTime *myTime) { 0,
1440*geoManager.minutePixel,
geoManager.timeLineHeight));
+ timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
+ geoManager.statusHeaderHeight,
+ geoManager.timeLineGridWidth,
+ geoManager.timeLineHeight + tvguideConfig.channelRows * geoManager.rowHeight));
}
-
+ timeBase->Fill(clrTransparent);
int clockY = 10;
int clockX;
if (tvguideConfig.scaleVideo) {
@@ -192,6 +200,20 @@ void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, in }
}
+void cTimeLine::drawCurrentTimeBase(void) {
+ timeBase->Fill(clrTransparent);
+ bool nowVisible = myTime->NowVisible();
+ if (!nowVisible)
+ return;
+ int deltaTime = (myTime->GetNow() - myTime->GetStart()) / 60 * geoManager.minutePixel;
+ if (tvguideConfig.displayMode == eVertical) {
+ timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase));
+ } else {
+ timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
+ }
+}
+
+
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = NULL;
if (tvguideConfig.style == eStyleBlendingDefault) {
@@ -232,6 +254,8 @@ void cTimeLine::setTimeline() { yNew = 0;
}
timeline->SetDrawPortPoint(cPoint(xNew, yNew));
+ if (tvguideConfig.displayTimeBase)
+ drawCurrentTimeBase();
}
void cTimeLine::drawClock() {
@@ -12,15 +12,17 @@ private: cStyledPixmap *dateViewer;
cPixmap *timeline;
cStyledPixmap *clock;
- cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
+ cPixmap *timeBase;
void decorateTile(int posX, int posY, int tileWidth, int tileHeight);
void drawRoundedCorners(int posX, int posY, int width, int height, int radius);
+ cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
+ void drawCurrentTimeBase(void);
public:
cTimeLine(cMyTime *myTime);
virtual ~cTimeLine(void);
+ void setTimeline();
void drawDateViewer();
void drawTimeline();
- void setTimeline();
void drawClock();
};
@@ -120,6 +120,13 @@ time_t cMyTime::GetRounded() { return mktime(rounded);
}
+bool cMyTime::NowVisible(void) {
+ if (t > tStart)
+ return true;
+ return false;
+}
+
+
void cMyTime::debug() {
esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd));
}
@@ -15,6 +15,7 @@ class cMyTime { virtual ~cMyTime(void);
static cString printTime(time_t displayTime);
void Now();
+ time_t GetNow() { return t; };
void AddStep(int step);
bool DelStep(int step);
void SetTime(time_t newTime);
@@ -29,6 +30,7 @@ class cMyTime { bool tooFarInPast(time_t current);
int GetTimelineOffset();
time_t GetRounded();
+ bool NowVisible(void);
void debug();
};
|