[vlc-commits] commit: Qt/EPG: Display the program start and end times just before the title in the description box . (Adrien Maglo )

git at videolan.org git at videolan.org
Fri Jun 18 09:24:46 CEST 2010


vlc/vlc-1.1 | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Jun 17 22:14:15 2010 +0200| [5ff7bcdfa34c4e0732204381bffe0471e4396f04] | committer: Jean-Baptiste Kempf 

Qt/EPG: Display the program start and end times just before the title in the description box.
(cherry picked from commit e600df620ad1805ff6948fe4e679144d25d2cb95)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=5ff7bcdfa34c4e0732204381bffe0471e4396f04
---

 modules/gui/qt4/components/epg/EPGItem.cpp |    2 ++
 modules/gui/qt4/dialogs/epg.cpp            |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGItem.cpp b/modules/gui/qt4/components/epg/EPGItem.cpp
index 39dbea5..9e6f44e 100644
--- a/modules/gui/qt4/components/epg/EPGItem.cpp
+++ b/modules/gui/qt4/components/epg/EPGItem.cpp
@@ -152,5 +152,7 @@ void EPGItem::focusInEvent( QFocusEvent * event )
     EPGEvent *evEPG = new EPGEvent( m_name );
     evEPG->description = m_description;
     evEPG->shortDescription = m_shortDescription;
+    evEPG->start = m_start;
+    evEPG->duration = m_duration;
     m_view->eventFocused( evEPG );
 }
diff --git a/modules/gui/qt4/dialogs/epg.cpp b/modules/gui/qt4/dialogs/epg.cpp
index 7c112d3..9b31c8f 100644
--- a/modules/gui/qt4/dialogs/epg.cpp
+++ b/modules/gui/qt4/dialogs/epg.cpp
@@ -93,7 +93,11 @@ void EpgDialog::showEvent( EPGEvent *event )
 {
     if( !event ) return;
 
-    title->setText( event->name );
+    QDateTime end = event->start.addSecs( event->duration );
+    title->setText( event->start.toString( "hh:mm" ) + " - "
+                    + end.toString( "hh:mm" ) + " : "
+                    + event->name );
+
     if( !event->description.isEmpty() )
         description->setText( event->description );
     else



More information about the vlc-commits mailing list