/****************************************************************************
** Form implementation generated from reading ui file 'DialogExecute.ui'
**
**   Created : Fri Jan 23 09:13:02 2004
**        by : Varol Okan
** Copyright : (c) Varol Okan
**   License : GPL v 2.0
**
****************************************************************************/

#include "dialogexecute.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

/*
 *  Constructs a DialogExecute as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
DialogExecute::DialogExecute( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "DialogExecute" );
    setSizeGripEnabled( TRUE );
    DialogExecuteLayout = new QGridLayout( this, 1, 1, 11, 6, "DialogExecuteLayout"); 

    layout3 = new QVBoxLayout( 0, 0, 6, "layout3"); 

    textLabel1 = new QLabel( this, "textLabel1" );
    layout3->addWidget( textLabel1 );
    QSpacerItem* spacer = new QSpacerItem( 21, 31, QSizePolicy::Minimum, QSizePolicy::Expanding );
    layout3->addItem( spacer );

    textLabel2 = new QLabel( this, "textLabel2" );
    layout3->addWidget( textLabel2 );

    lineEdit1 = new QLineEdit( this, "lineEdit1" );
    layout3->addWidget( lineEdit1 );

    textLabel2_2 = new QLabel( this, "textLabel2_2" );
    layout3->addWidget( textLabel2_2 );

    lineEdit1_2 = new QLineEdit( this, "lineEdit1_2" );
    layout3->addWidget( lineEdit1_2 );

    textLabel2_3 = new QLabel( this, "textLabel2_3" );
    layout3->addWidget( textLabel2_3 );

    lineEdit1_3 = new QLineEdit( this, "lineEdit1_3" );
    layout3->addWidget( lineEdit1_3 );

    Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 

    buttonHelp = new QPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( TRUE );
    Layout1->addWidget( buttonHelp );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout1->addItem( spacer_2 );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout1->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout1->addWidget( buttonCancel );
    layout3->addLayout( Layout1 );

    DialogExecuteLayout->addLayout( layout3, 0, 0 );
    languageChange();
    resize( QSize(606, 547).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
DialogExecute::~DialogExecute()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DialogExecute::languageChange()
{
    setCaption( tr( "Command Queue" ) );
    textLabel1->setText( tr( "<p align=\"center\"><B><h2>Here is the list of commands which will be executed. You can modify each simgle command, or accept the default settings.</H2></B></p>" ) );
    textLabel2->setText( tr( "<p align=\"center\">The following command(s) will convert a avi file into mpeg2 format.</p>" ) );
    textLabel2_2->setText( tr( "<p align=\"center\">This command will convert the background image into <BR>a MPEG2 stream in NTSC format 720x480 (60Hz)</p>" ) );
    textLabel2_3->setText( tr( "<p align=\"center\">Here we use spumux to add the subpicture (buttons) to the mpeg2 video.</p>" ) );
    buttonHelp->setText( tr( "&Help" ) );
    buttonHelp->setAccel( QKeySequence( tr( "F1" ) ) );
    buttonOk->setText( tr( "&OK" ) );
    buttonOk->setAccel( QKeySequence( QString::null ) );
    buttonCancel->setText( tr( "&Cancel" ) );
    buttonCancel->setAccel( QKeySequence( QString::null ) );
}

