]> git.sesse.net Git - vlc/commitdiff
Qt: We might want to share more that just a description
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 27 Jan 2010 15:07:47 +0000 (16:07 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 28 Jan 2010 00:38:51 +0000 (01:38 +0100)
modules/gui/qt4/components/epg/EPGWidget.hpp
modules/gui/qt4/dialogs/epg.cpp
modules/gui/qt4/dialogs/epg.hpp

index 84e88d183f07b80c3470a121c0fa98c1f3d59cc3..4a99a0b2cceab647d0dc73809adcd4f2e28f321b 100644 (file)
@@ -61,7 +61,7 @@ private:
     QMultiMap<QString, EPGEvent*> m_events;
 
 signals:
-    void descriptionChanged( const QString& );
+    void itemSelectionChanged( EPGEvent * );
 };
 
 #endif // EPGWIDGET_H
index e30ad520759e640e3c02385f7795f4a889147a47..16db0e8ffb78d36f3ef59b496f27c778d5c0a64d 100644 (file)
@@ -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 );
+}
index 1f4658aee68e7c40768fd9a60317b27db83ac8fe..a1159e34abd356fe62bce0e6c35b58a433ef8c71 100644 (file)
@@ -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