CONNECT_MAP_SET( recordButton, RECORD_ACTION );
BUTTON_SET_BAR( recordButton );
ENABLE_ON_INPUT( recordButton );
+ recordButton->setCheckable( true );
+ CONNECT( THEMIM->getIM(), recordingStateChanged( bool ),
+ recordButton, setChecked( bool ) );
widget = recordButton;
}
break;
i_type != SynchroChanged_Type &&
i_type != CachingEvent_Type &&
i_type != BookmarksChanged_Type &&
- i_type != InterfaceAoutUpdate_Type )
+ i_type != InterfaceAoutUpdate_Type &&
+ i_type != RecordingEvent_Type )
return;
if( !hasInput() ) return;
i_type != InfoChanged_Type &&
i_type != SynchroChanged_Type &&
i_type != BookmarksChanged_Type &&
- i_type != InterfaceAoutUpdate_Type
+ i_type != InterfaceAoutUpdate_Type &&
+ i_type != RecordingEvent_Type
)
&& ( i_input_id != ple->i_id ) )
return;
case InterfaceAoutUpdate_Type:
UpdateAout();
break;
+ case RecordingEvent_Type:
+ UpdateRecord();
+ break;
default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
}
break;
case INPUT_EVENT_RECORD:
- /* This happens when a recording starts. What do we do then?
- Display a red light? */
- /* event = new IMEvent( RecordingEvent_Type, 0 );
- break; */
+ event = new IMEvent( RecordingEvent_Type, 0 );
+ break;
case INPUT_EVENT_PROGRAM:
/* This is for PID changes */
emit infoChanged( input_GetItem( p_input ) );
}
+void InputManager::UpdateRecord()
+{
+ if( hasInput() )
+ {
+ emit recordingStateChanged( var_GetBool( p_input, "record" ) );
+ }
+}
+
/* User update of the slider */
void InputManager::sliderUpdate( float new_pos )
{
SynchroChanged_Type,
CachingEvent_Type,
BookmarksChanged_Type,
-/* RecordingEvent_Type,
- ProgramChanged_Type,
+ RecordingEvent_Type,
+/* ProgramChanged_Type,
SignalChanged_Type, */
FullscreenControlToggle_Type = QEvent::User + IMEventType + 20,
void UpdateAout();
void UpdateStats();
void UpdateCaching();
+ void UpdateRecord();
void AtoBLoop( int );
void artChanged( QString );
/// Play/pause status
void statusChanged( int );
+ void recordingStateChanged( bool );
/// Teletext
void teletextPossible( bool );
void teletextActivated( bool );