Commit f53ff18f authored by Ilkka Ollakka's avatar Ilkka Ollakka

QT4: Connect INPUT_EVENT_ITEM_EPG to update epg-widget via inputmanager

Now epg-content should update automaticly when user changes channel etc.
parent 286d3083
......@@ -72,6 +72,7 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
layout->addWidget( splitter );
CONNECT( epg, itemSelectionChanged( EPGEvent *), this, showEvent( EPGEvent *) );
CONNECT( THEMIM->getIM(), epgChanged(), this, updateInfos() );
QPushButton *update = new QPushButton( qtr( "Update" ) ); //Temporary to test
layout->addWidget( update, 0, Qt::AlignRight );
......
......@@ -257,6 +257,9 @@ void InputManager::customEvent( QEvent *event )
case ProgramChanged_Type:
UpdateProgramEvent();
break;
case EPGEvent_Type:
UpdateEPG();
break;
default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
assert(0);
......@@ -361,6 +364,11 @@ static int InputEvent( vlc_object_t *p_this, const char *,
event = new IMEvent( ProgramChanged_Type );
break;
case INPUT_EVENT_ITEM_EPG:
/* EPG data changed */
event = new IMEvent( EPGEvent_Type );
break;
case INPUT_EVENT_SIGNAL:
/* This is for capture-card signals */
/* event = new IMEvent( SignalChanged_Type );
......@@ -547,6 +555,14 @@ void InputManager::UpdateTeletext()
}
}
void InputManager::UpdateEPG()
{
if( hasInput() )
{
emit epgChanged();
}
}
void InputManager::UpdateVout()
{
if( hasInput() )
......
......@@ -62,6 +62,7 @@ enum {
LoopChanged_Type,
RepeatChanged_Type,
LeafToParent_Type,
EPGEvent_Type,
/* SignalChanged_Type, */
FullscreenControlToggle_Type = QEvent::User + IMEventType + 20,
......@@ -170,6 +171,7 @@ private:
void UpdateCaching();
void UpdateRecord();
void UpdateProgramEvent();
void UpdateEPG();
public slots:
void setInput( input_thread_t * ); ///< Our controlled input changed
......@@ -234,6 +236,7 @@ signals:
void cachingChanged( float );
/// Program Event changes
void encryptionChanged( bool );
void epgChanged();
};
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