#include <QFileDialog>
-VLMDialog *VLMDialog::instance = NULL;
-
-VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( parent, _p_intf )
+VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
p_vlm = vlm_New( p_intf );
{
QString saveVLMConfFileName = QFileDialog::getSaveFileName( this,
qtr( "Save VLM configuration as..." ),
- qfu( config_GetHomeDir() ),
+ QVLCUserDir( VLC_DOCUMENTS_DIR ),
qtr( "VLM conf (*.vlm);;All (*)" ) );
if( !saveVLMConfFileName.isEmpty() )
QString openVLMConfFileName = toNativeSeparators(
QFileDialog::getOpenFileName(
this, qtr( "Open VLM configuration..." ),
- qfu( config_GetHomeDir() ),
+ QVLCUserDir( VLC_DOCUMENTS_DIR ),
qtr( "VLM conf (*.vlm);;All (*)" ) ) );
if( !openVLMConfFileName.isEmpty() )
objLayout->addWidget( time, 1, 3, 1, 2 );*/
QToolButton *modifyButton = new QToolButton;
- modifyButton->setIcon( QIcon( QPixmap( ":/menu/settings" ) ) );
+ modifyButton->setIcon( QIcon( ":/menu/settings" ) );
objLayout->addWidget( modifyButton, 0, 5 );
QToolButton *deleteButton = new QToolButton;
- deleteButton->setIcon( QIcon( QPixmap( ":/menu/quit" ) ) );
+ deleteButton->setIcon( QIcon( ":/menu/quit" ) );
objLayout->addWidget( deleteButton, 0, 6 );
BUTTONACT( modifyButton, modify() );
b_looped = _looped;
playButton = new QToolButton;
- playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
+ playButton->setIcon( QIcon( ":/menu/play" ) );
objLayout->addWidget( playButton, 1, 0 );
b_playing = true;
QToolButton *stopButton = new QToolButton;
- stopButton->setIcon( QIcon( QPixmap( ":/toolbar/stop_b" ) ) );
+ stopButton->setIcon( QIcon( ":/toolbar/stop_b" ) );
objLayout->addWidget( stopButton, 1, 1 );
loopButton = new QToolButton;
{
VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
if( b_looped )
- loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_all" ) ) );
+ loopButton->setIcon( QIcon( ":/buttons/playlist/repeat_all" ) );
else
- loopButton->setIcon( QIcon( QPixmap( ":/buttons/playlist/repeat_off" ) ) );
+ loopButton->setIcon( QIcon( ":/buttons/playlist/repeat_off" ) );
}
void VLMBroadcast::togglePlayPause()
if( b_playing )
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
- playButton->setIcon( QIcon( QPixmap( ":/menu/pause" ) ) );
+ playButton->setIcon( QIcon( ":/menu/pause" ) );
}
else
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
- playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
+ playButton->setIcon( QIcon( ":/menu/play" ) );
}
b_playing = !b_playing;
}
void VLMBroadcast::stop()
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
- playButton->setIcon( QIcon( QPixmap( ":/menu/play" ) ) );
+ playButton->setIcon( QIcon( ":/menu/play" ) );
}
/****************
command = "setup \"" + name + "\" inputdel all";
vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
vlm_MessageDelete( message );
- command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
+
if( !output.isEmpty() )
{
command = "setup \"" + name + "\" output \"" + output + "\"";
const QString& mux )
{
vlm_message_t *message;
- QString command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+ QString command;
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
if( !output.isEmpty() )
{
const QString& mux )
{
vlm_message_t *message;
- QString command = "setup \"" + name + "\" input \"" + input + "\"";
- vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
- vlm_MessageDelete( message );
+ QString command;
+
+ if(!input.isEmpty())
+ {
+ QStringList inputs = input.split(":", QString::SkipEmptyParts);
+
+ command = "setup \"" + name + "\" input \"" + inputs[0].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+
+ for( int i = 1; i < inputs.size(); i++ )
+ {
+ command = "setup \"" + name + "\" option \"" + inputs[i].trimmed() + "\"";
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
+ }
+ }
if( !output.isEmpty() )
{