QString typeShortName;
QString inputText = ui.inputLedit->text();
QString outputText = ui.outputLedit->text();
- bool b_checked;
+ bool b_checked = ui.enableCheck->isChecked();
VLMAWidget * vlmAwidget;
{
case QVLM_Broadcast:
typeShortName = "Bcast";
- vlmAwidget = new VLMBroadcast( name, inputText, outputText, b_checked, this );
+ vlmAwidget = new VLMBroadcast( name, inputText, outputText,
+ b_checked, this );
break;
case QVLM_VOD:
typeShortName = "VOD";
- vlmAwidget = new VLMVod( name, inputText, outputText, b_checked, this );
+ vlmAwidget = new VLMVod( name, inputText, outputText,
+ b_checked, this );
break;
case QVLM_Schedule:
typeShortName = "Sched";
- vlmAwidget = new VLMSchedule( name, inputText, outputText, b_checked, this );
+ vlmAwidget = new VLMSchedule( name, inputText, outputText,
+ b_checked, this );
break;
default:
msg_Warn( p_intf, "Something bad happened" );
date->setDate( QDate::currentDate() );
ui.enableCheck->setChecked( true );
ui.nameLedit->setReadOnly( false );
+ ui.saveButton->hide();
+ ui.addButton->show();
}
void VLMDialog::saveModifications()
vlmObj->setChecked( ui.enableCheck->isChecked() );
vlmObj->b_enabled = ui.enableCheck->isChecked();
}
- ui.saveButton->hide();
- ui.addButton->show();
clearWidgets();
}
currentIndex = vlmItems.indexOf( vlmObj );
if( currentIndex < 0 ) return;
+ msg_Dbg( p_intf, "Type: %i", vlmObj->type );
ui.vlmListItem->setCurrentRow( currentIndex );
ui.nameLedit->setText( vlmObj->name );
ui.inputLedit->setText( vlmObj->input );
QString _input,
QString _output,
bool _enabled,
- VLMDialog *_parent )
+ VLMDialog *_parent,
+ int _type )
: QGroupBox( _name, _parent )
{
parent = _parent;
input = _input;
output = _output;
b_enabled = _enabled;
+ type = _type;
+
+ setCheckable( true );
setChecked( b_enabled );
objLayout = new QGridLayout( this );
VLMBroadcast::VLMBroadcast( QString _name, QString _input, QString _output,
bool _enabled, VLMDialog *_parent)
: VLMAWidget( _name, _input, _output,
- _enabled, _parent)
+ _enabled, _parent, QVLM_Broadcast )
{
nameLabel->setText( "Broadcast: " + name );
+ type = QVLM_Broadcast;
QToolButton *playButton = new QToolButton;
playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
objLayout->addWidget( playButton, 1, 0 );
VLMSchedule::VLMSchedule( QString name, QString input, QString output,
bool enabled, VLMDialog *parent) : VLMAWidget( name, input,
- output, enabled, parent)
+ output, enabled, parent, QVLM_Schedule )
{
nameLabel->setText( "Schedule: " + name );
}
VLMVod::VLMVod( QString name, QString input, QString output,
bool enabled, VLMDialog *parent) : VLMAWidget( name, input,
- output, enabled, parent)
+ output, enabled, parent, QVLM_VOD )
{
nameLabel->setText( "VOD:" + name );
}
Q_OBJECT
friend class VLMDialog;
public:
- VLMAWidget( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
+ VLMAWidget( QString name, QString input, QString output, bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast );
protected:
QLabel *nameLabel;
QString name;
QString input;
QString output;
bool b_enabled;
+ int type;
VLMDialog *parent;
virtual void enterEvent( QEvent * );
QGridLayout *objLayout;
VLMBroadcast( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
private:
bool b_looped;
-
private slots:
void stop();
void togglePlayPause();
{
public:
VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
+private:
+
};
#endif