Commit 42bd98c6 authored by Ilkka Ollakka's avatar Ilkka Ollakka Committed by Jean-Baptiste Kempf

QT4: Connect INPUT_EVENT_ITEM_EPG to update epg-widget via inputmanager

Now epg-content should update automaticly when user changes channel etc.
(cherry picked from commit f53ff18f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b57a7089
...@@ -72,6 +72,7 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ...@@ -72,6 +72,7 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
layout->addWidget( splitter ); layout->addWidget( splitter );
CONNECT( epg, itemSelectionChanged( EPGEvent *), this, showEvent( EPGEvent *) ); CONNECT( epg, itemSelectionChanged( EPGEvent *), this, showEvent( EPGEvent *) );
CONNECT( THEMIM->getIM(), epgChanged(), this, updateInfos() );
QPushButton *update = new QPushButton( qtr( "Update" ) ); //Temporary to test QPushButton *update = new QPushButton( qtr( "Update" ) ); //Temporary to test
layout->addWidget( update, 0, Qt::AlignRight ); layout->addWidget( update, 0, Qt::AlignRight );
......
...@@ -257,6 +257,9 @@ void InputManager::customEvent( QEvent *event ) ...@@ -257,6 +257,9 @@ void InputManager::customEvent( QEvent *event )
case ProgramChanged_Type: case ProgramChanged_Type:
UpdateProgramEvent(); UpdateProgramEvent();
break; break;
case EPGEvent_Type:
UpdateEPG();
break;
default: default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type ); msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
assert(0); assert(0);
...@@ -361,6 +364,11 @@ static int InputEvent( vlc_object_t *p_this, const char *, ...@@ -361,6 +364,11 @@ static int InputEvent( vlc_object_t *p_this, const char *,
event = new IMEvent( ProgramChanged_Type ); event = new IMEvent( ProgramChanged_Type );
break; break;
case INPUT_EVENT_ITEM_EPG:
/* EPG data changed */
event = new IMEvent( EPGEvent_Type );
break;
case INPUT_EVENT_SIGNAL: case INPUT_EVENT_SIGNAL:
/* This is for capture-card signals */ /* This is for capture-card signals */
/* event = new IMEvent( SignalChanged_Type ); /* event = new IMEvent( SignalChanged_Type );
...@@ -547,6 +555,14 @@ void InputManager::UpdateTeletext() ...@@ -547,6 +555,14 @@ void InputManager::UpdateTeletext()
} }
} }
void InputManager::UpdateEPG()
{
if( hasInput() )
{
emit epgChanged();
}
}
void InputManager::UpdateVout() void InputManager::UpdateVout()
{ {
if( hasInput() ) if( hasInput() )
......
...@@ -62,6 +62,7 @@ enum { ...@@ -62,6 +62,7 @@ enum {
LoopChanged_Type, LoopChanged_Type,
RepeatChanged_Type, RepeatChanged_Type,
LeafToParent_Type, LeafToParent_Type,
EPGEvent_Type,
/* SignalChanged_Type, */ /* SignalChanged_Type, */
FullscreenControlToggle_Type = QEvent::User + IMEventType + 20, FullscreenControlToggle_Type = QEvent::User + IMEventType + 20,
...@@ -170,6 +171,7 @@ private: ...@@ -170,6 +171,7 @@ private:
void UpdateCaching(); void UpdateCaching();
void UpdateRecord(); void UpdateRecord();
void UpdateProgramEvent(); void UpdateProgramEvent();
void UpdateEPG();
public slots: public slots:
void setInput( input_thread_t * ); ///< Our controlled input changed void setInput( input_thread_t * ); ///< Our controlled input changed
...@@ -234,6 +236,7 @@ signals: ...@@ -234,6 +236,7 @@ signals:
void cachingChanged( float ); void cachingChanged( float );
/// Program Event changes /// Program Event changes
void encryptionChanged( bool ); void encryptionChanged( bool );
void epgChanged();
}; };
class MainInputManager : public QObject class MainInputManager : public QObject
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment