[vlc-devel] commit: Qt: We might want to share more that just a description ( Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Jan 28 01:38:48 CET 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 27 16:07:47 2010 +0100| [699252e9d8ebe16a1ed26ba5c2aa99301f8ce207] | committer: Jean-Baptiste Kempf 

Qt: We might want to share more that just a description

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

 modules/gui/qt4/components/epg/EPGWidget.hpp |    2 +-
 modules/gui/qt4/dialogs/epg.cpp              |    8 +++++++-
 modules/gui/qt4/dialogs/epg.hpp              |    4 ++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGWidget.hpp b/modules/gui/qt4/components/epg/EPGWidget.hpp
index 84e88d1..4a99a0b 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.hpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.hpp
@@ -61,7 +61,7 @@ private:
     QMultiMap<QString, EPGEvent*> m_events;
 
 signals:
-    void descriptionChanged( const QString& );
+    void itemSelectionChanged( EPGEvent * );
 };
 
 #endif // EPGWIDGET_H
diff --git a/modules/gui/qt4/dialogs/epg.cpp b/modules/gui/qt4/dialogs/epg.cpp
index e30ad52..16db0e8 100644
--- a/modules/gui/qt4/dialogs/epg.cpp
+++ b/modules/gui/qt4/dialogs/epg.cpp
@@ -61,10 +61,16 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
     splitter->addWidget( descBox );
     layout->addWidget( splitter );
 
-    CONNECT( epg, descriptionChanged( const QString & ), description, setText( const QString & ) );
+    CONNECT( epg, descriptionChanged( EPGEvent *), this, showEvent( EPGEvent *) );
 }
 
 EpgDialog::~EpgDialog()
 {
 }
 
+void EpgDialog::showEvent( EPGEvent *event )
+{
+    if( !event ) return;
+
+    description->setText( event->description );
+}
diff --git a/modules/gui/qt4/dialogs/epg.hpp b/modules/gui/qt4/dialogs/epg.hpp
index 1f4658a..a1159e3 100644
--- a/modules/gui/qt4/dialogs/epg.hpp
+++ b/modules/gui/qt4/dialogs/epg.hpp
@@ -28,6 +28,7 @@
 #include "util/singleton.hpp"
 
 class QLabel;
+class EPGEvent;
 class EpgDialog : public QVLCFrame, public Singleton<EpgDialog>
 {
     Q_OBJECT;
@@ -38,6 +39,9 @@ private:
     QLabel *description;
 
     friend class    Singleton<EpgDialog>;
+
+private slots:
+    void showEvent( EPGEvent * );
 };
 
 #endif




More information about the vlc-devel mailing list