#include "simapi.h" /**************************************************************************** ** Form implementation generated from reading ui file './filetransferbase.ui' ** ** Created: Вск Мар 4 15:40:38 2007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "filetransferbase.h" #include #include #include #include #include #include #include #include #include #include /* * 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 ); Spacer5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); FileTransferLayout->addItem( Spacer5, 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 ); Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); FileTransferLayout->addItem( Spacer3, 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 ); Spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); Layout3->addItem( Spacer4 ); 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"