#include <QScrollArea>
#include <QFileDialog>
-static const char *psz_type[] = { "Broadcast", "Schedule", "VOD" };
VLMDialog *VLMDialog::instance = NULL;
ui.saveButton->hide();
#define ADDMEDIATYPES( str, type ) ui.mediaType->addItem( qtr( str ), QVariant( type ) );
- ADDMEDIATYPES( "Broadcast", QVLM_Broadcast );
- ADDMEDIATYPES( "Schedule", QVLM_Schedule );
- ADDMEDIATYPES( "Video On Demand ( VOD )", QVLM_VOD );
+ ADDMEDIATYPES( N_("Broadcast"), QVLM_Broadcast );
+ ADDMEDIATYPES( N_("Schedule"), QVLM_Schedule );
+ ADDMEDIATYPES( N_("Video On Demand ( VOD )"), QVLM_VOD );
#undef ADDMEDIATYPES
/* Schedule Stuffs */
new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
vlmItemLayout->addItem( spacer );
- QPushButton *importButton = new QPushButton( qtr( "Import" ) );
+ QPushButton *importButton = new QPushButton( qtr( "I&mport" ) );
ui.buttonBox->addButton( importButton, QDialogButtonBox::ActionRole );
- QPushButton *exportButton = new QPushButton( qtr( "Export" ) );
+ QPushButton *exportButton = new QPushButton( qtr( "E&xport" ) );
ui.buttonBox->addButton( exportButton, QDialogButtonBox::ActionRole );
QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
{
delete vlmWrapper;
- /* FIXME :you have to destroy vlm here to close
+ /* TODO :you have to destroy vlm here to close
* but we shouldn't destroy vlm here in case somebody else wants it */
if( p_vlm )
{
clearWidgets();
}
-// FIXME : VOD are not exported to the file
+/* TODO : VOD are not exported to the file */
bool VLMDialog::exportVLMConf()
{
QString saveVLMConfFileName = QFileDialog::getSaveFileName(
- this, qtr( "Choose a filename to save the VLM configuration..." ),
+ this, qtr( "Save VLM configuration as..." ),
qfu( config_GetHomeDir() ),
qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
bool VLMDialog::importVLMConf()
{
QString openVLMConfFileName = QFileDialog::getOpenFileName(
- this, qtr( "Open a VLM Configuration File" ),
+ this, qtr( "Open VLM configuration..." ),
qfu( config_GetHomeDir() ),
qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
void VLMDialog::selectInput()
{
- OpenDialog *o = OpenDialog::getInstance( this, p_intf, SELECT, true );
+ OpenDialog *o = OpenDialog::getInstance( this, p_intf, false, SELECT, true );
o->exec();
ui.inputLedit->setText( o->getMRL() );
}
break;
// vlmObj->
}
- vlmObj->update(); /* It should call the correct function is VLMAWidget
- is abstract, but I am far from sure... FIXME ? */
+ vlmObj->update();
}
clearWidgets();
}
objLayout->addWidget( time, 1, 3, 1, 2 );*/
QToolButton *modifyButton = new QToolButton;
- modifyButton->setIcon( QIcon( QPixmap( ":/pixmaps/menus_settings_16px.png" ) ) );
+ modifyButton->setIcon( QIcon( QPixmap( ":/settings" ) ) );
objLayout->addWidget( modifyButton, 0, 5 );
QToolButton *deleteButton = new QToolButton;
- deleteButton->setIcon( QIcon( QPixmap( ":/pixmaps/menus_quit_16px.png" ) ) );
+ deleteButton->setIcon( QIcon( QPixmap( ":/quit" ) ) );
objLayout->addWidget( deleteButton, 0, 6 );
BUTTONACT( modifyButton, modify() );
parent->removeVLMItem( this );
}
-//FIXME, remove me before release
-void VLMAWidget::enterEvent( QEvent *event )
-{
- printf( "test" );
-}
-
void VLMAWidget::toggleEnabled( bool b_enable )
{
VLMWrapper::EnableItem( name, b_enable );
: VLMAWidget( _name, _input, _output,
_enabled, _parent, QVLM_Broadcast )
{
- nameLabel->setText( "Broadcast: " + name );
+ nameLabel->setText( qtr("Broadcast: ") + name );
type = QVLM_Broadcast;
b_looped = _looped;
playButton = new QToolButton;
- playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
+ playButton->setIcon( QIcon( QPixmap( ":/play_16px" ) ) );
objLayout->addWidget( playButton, 1, 0 );
b_playing = true;
QToolButton *stopButton = new QToolButton;
- stopButton->setIcon( QIcon( QPixmap( ":/pixmaps/stop_16px.png" ) ) );
+ stopButton->setIcon( QIcon( QPixmap( ":/stop_16px" ) ) );
objLayout->addWidget( stopButton, 1, 1 );
loopButton = new QToolButton;
{
VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
if( b_looped )
- loopButton->setIcon( QIcon( QPixmap( ":/pixmaps/playlist_repeat_all.png" ) ) );
+ loopButton->setIcon( QIcon( QPixmap( ":/repeat_all" ) ) );
else
- loopButton->setIcon( QIcon( QPixmap( ":/pixmaps/playlist_repeat_off.png" ) ) );
+ loopButton->setIcon( QIcon( QPixmap( ":/repeat_off" ) ) );
}
void VLMBroadcast::togglePlayPause()
if( b_playing = true )
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
- playButton->setIcon( QIcon( QPixmap( ":/pixmaps/pause_16px.png" ) ) );
+ playButton->setIcon( QIcon( QPixmap( ":/pause_16px" ) ) );
}
else
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
- playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
+ playButton->setIcon( QIcon( QPixmap( ":/play_16px" ) ) );
}
b_playing = !b_playing;
}
void VLMBroadcast::stop()
{
VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
- playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
+ playButton->setIcon( QIcon( QPixmap( ":/play_16px" ) ) );
}
/****************
bool enabled, VLMDialog *parent )
: VLMAWidget( name, input, output, enabled, parent, QVLM_Schedule )
{
- nameLabel->setText( "Schedule: " + name );
+ nameLabel->setText( qtr("Schedule: ") + name );
schetime = _schetime;
schedate = _schedate;
rNumber = _scherepeatnumber;
bool enabled, QString _mux, VLMDialog *parent)
: VLMAWidget( name, input, output, enabled, parent, QVLM_VOD )
{
- nameLabel->setText( "VOD:" + name );
+ nameLabel->setText( qtr("VOD: ") + name );
mux = _mux;
muxLabel = new QLabel;