[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
Thu Jun 17 22:14:33 CEST 2010


vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Jun 17 22:14:15 2010 +0200| [e600df620ad1805ff6948fe4e679144d25d2cb95] | committer: Adrien Maglo 

Qt/EPG: Display the program start and end times just before the title in the description box.

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

 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 7087c3d..f3fbb18 100644
--- a/modules/gui/qt4/components/epg/EPGItem.cpp
+++ b/modules/gui/qt4/components/epg/EPGItem.cpp
@@ -153,5 +153,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