#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kdarProgressDlg.ui'
**
** Created: Sun Jul 10 12:14:58 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kdarProgressDlg.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <ksqueezedtextlabel.h>
#include <kprogress.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a kdarProgressDlg 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.
 */
kdarProgressDlg::kdarProgressDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "kdarProgressDlg" );
    setSizeGripEnabled( TRUE );
    kdarProgressDlgLayout = new QVBoxLayout( this, 11, 6, "kdarProgressDlgLayout"); 

    statusGroupBox = new QGroupBox( this, "statusGroupBox" );
    statusGroupBox->setColumnLayout(0, Qt::Vertical );
    statusGroupBox->layout()->setSpacing( 6 );
    statusGroupBox->layout()->setMargin( 11 );
    statusGroupBoxLayout = new QVBoxLayout( statusGroupBox->layout() );
    statusGroupBoxLayout->setAlignment( Qt::AlignTop );

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

    textLabel4 = new QLabel( statusGroupBox, "textLabel4" );
    layout5->addWidget( textLabel4 );

    mediaTypeTextLabel = new QLabel( statusGroupBox, "mediaTypeTextLabel" );
    mediaTypeTextLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, mediaTypeTextLabel->sizePolicy().hasHeightForWidth() ) );
    layout5->addWidget( mediaTypeTextLabel );
    spacer2 = new QSpacerItem( 71, 20, QSizePolicy::Maximum, QSizePolicy::Minimum );
    layout5->addItem( spacer2 );
    statusGroupBoxLayout->addLayout( layout5 );

    sliceInfoTextLabel = new QLabel( statusGroupBox, "sliceInfoTextLabel" );
    statusGroupBoxLayout->addWidget( sliceInfoTextLabel );

    currentFileKSqueezedTextLabel = new KSqueezedTextLabel( statusGroupBox, "currentFileKSqueezedTextLabel" );
    statusGroupBoxLayout->addWidget( currentFileKSqueezedTextLabel );

    layout5_2 = new QHBoxLayout( 0, 0, 6, "layout5_2"); 
    spacer3 = new QSpacerItem( 21, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    layout5_2->addItem( spacer3 );

    extraFileInfoKSqueezedTextLabel = new KSqueezedTextLabel( statusGroupBox, "extraFileInfoKSqueezedTextLabel" );
    layout5_2->addWidget( extraFileInfoKSqueezedTextLabel );
    statusGroupBoxLayout->addLayout( layout5_2 );

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

    textLabel1 = new QLabel( statusGroupBox, "textLabel1" );
    layout2->addWidget( textLabel1 );

    filesProcessedKProgress = new KProgress( statusGroupBox, "filesProcessedKProgress" );
    layout2->addWidget( filesProcessedKProgress );
    statusGroupBoxLayout->addLayout( layout2 );

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

    textLabel1_2 = new QLabel( statusGroupBox, "textLabel1_2" );
    layout4->addWidget( textLabel1_2 );

    elapsedTimeTextLabel = new QLabel( statusGroupBox, "elapsedTimeTextLabel" );
    elapsedTimeTextLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, elapsedTimeTextLabel->sizePolicy().hasHeightForWidth() ) );
    elapsedTimeTextLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
    layout4->addWidget( elapsedTimeTextLabel );
    statusGroupBoxLayout->addLayout( layout4 );
    kdarProgressDlgLayout->addWidget( statusGroupBox );

    Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout1->addWidget( buttonCancel );
    kdarProgressDlgLayout->addLayout( Layout1 );
    languageChange();
    resize( QSize(626, 289).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kdarProgressDlg::languageChange()
{
    setCaption( tr2i18n( "Creating archive..." ) );
    statusGroupBox->setTitle( tr2i18n( "Status" ) );
    textLabel4->setText( tr2i18n( "Media type:", "The type of storage medium (e.g. CD-R, DVD, etc.)" ) );
    mediaTypeTextLabel->setText( QString::null );
    sliceInfoTextLabel->setText( QString::null );
    currentFileKSqueezedTextLabel->setText( QString::null );
    extraFileInfoKSqueezedTextLabel->setText( QString::null );
    textLabel1->setText( tr2i18n( "Files processed:", "Percentage of files procressed during creation" ) );
    textLabel1_2->setText( tr2i18n( "Elapsed time:", "total elapsed time during creation" ) );
    elapsedTimeTextLabel->setText( QString::null );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonCancel->setAccel( QKeySequence( QString::null ) );
}

void kdarProgressDlg::cancelOperation()
{
    qWarning( "kdarProgressDlg::cancelOperation(): Not implemented yet" );
}

#include "kdarProgressDlg.moc"
