#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './filetransferbase.ui'
**
** Created: вт мар 30 16:44:59 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "filetransferbase.h"

#include <qvariant.h>
#include <qprogressbar.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qslider.h>
#include <qpushbutton.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a FileTransferBase 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.
 */
FileTransferBase::FileTransferBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "FileTransfer" );
    FileTransferLayout = new QGridLayout( this, 1, 1, 11, 6, "FileTransferLayout"); 

    barFile = new QProgressBar( this, "barFile" );

    FileTransferLayout->addMultiCellWidget( barFile, 0, 0, 0, 2 );

    barTotal = new QProgressBar( this, "barTotal" );

    FileTransferLayout->addMultiCellWidget( barTotal, 1, 1, 0, 2 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    FileTransferLayout->addItem( spacer, 7, 1 );

    lblState = new QLabel( this, "lblState" );

    FileTransferLayout->addMultiCellWidget( lblState, 2, 2, 0, 2 );

    edtTime = new QLineEdit( this, "edtTime" );
    edtTime->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, edtTime->sizePolicy().hasHeightForWidth() ) );

    FileTransferLayout->addWidget( edtTime, 3, 1 );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    FileTransferLayout->addItem( spacer_2, 3, 2 );

    lblTime = new QLabel( this, "lblTime" );
    lblTime->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    FileTransferLayout->addWidget( lblTime, 3, 0 );

    lblEstimated = new QLabel( this, "lblEstimated" );
    lblEstimated->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    FileTransferLayout->addWidget( lblEstimated, 4, 0 );

    edtEstimated = new QLineEdit( this, "edtEstimated" );
    edtEstimated->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, edtEstimated->sizePolicy().hasHeightForWidth() ) );

    FileTransferLayout->addWidget( edtEstimated, 4, 1 );

    sldSpeed = new QSlider( this, "sldSpeed" );
    sldSpeed->setProperty( "minValue", 1 );
    sldSpeed->setProperty( "maxValue", 100 );
    sldSpeed->setProperty( "orientation", "Horizontal" );

    FileTransferLayout->addMultiCellWidget( sldSpeed, 6, 6, 0, 2 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    FileTransferLayout->addWidget( TextLabel1, 5, 0 );

    edtSpeed = new QLineEdit( this, "edtSpeed" );
    edtSpeed->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, edtSpeed->sizePolicy().hasHeightForWidth() ) );

    FileTransferLayout->addWidget( edtSpeed, 5, 1 );

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

    btnGo = new QPushButton( this, "btnGo" );
    Layout3->addWidget( btnGo );

    chkClose = new QCheckBox( this, "chkClose" );
    Layout3->addWidget( chkClose );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout3->addItem( spacer_3 );

    btnCancel = new QPushButton( this, "btnCancel" );
    Layout3->addWidget( btnCancel );

    FileTransferLayout->addMultiCellLayout( Layout3, 8, 8, 0, 2 );
    languageChange();
    resize( QSize(348, 263).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( btnCancel, sldSpeed );
    setTabOrder( sldSpeed, edtTime );
    setTabOrder( edtTime, edtEstimated );
    setTabOrder( edtEstimated, edtSpeed );
    setTabOrder( edtSpeed, chkClose );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FileTransferBase::languageChange()
{
    setProperty( "caption", i18n( "File transfer" ) );
    lblState->setProperty( "text", QString::null );
    lblTime->setProperty( "text", i18n( "Time:" ) );
    lblEstimated->setProperty( "text", i18n( "Estimated time:" ) );
    TextLabel1->setProperty( "text", i18n( "Speed:" ) );
    btnGo->setProperty( "text", i18n( "&Go to dir" ) );
    chkClose->setProperty( "text", i18n( "Close after &transfer" ) );
    btnCancel->setProperty( "text", i18n( "&Cancel" ) );
}

#include "filetransferbase.moc"
