You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k9copy/libk9copy/backupdlg.cpp

175 lines
6.3 KiB

#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './backupdlg.ui'
**
** Created: dim. oct. 26 08:55:58 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "backupdlg.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qprogressbar.h>
#include <kpushbutton.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kpushbutton.h"
/*
* Constructs a backupDlg 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.
*/
backupDlg::backupDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "backupDlg" );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( QSize( 0, 0 ) );
setMaximumSize( QSize( 9999, 9999 ) );
setBaseSize( QSize( 500, 230 ) );
setCursor( QCursor( 3 ) );
setModal( TRUE );
backupDlgLayout = new QGridLayout( this, 1, 1, 3, 8, "backupDlgLayout");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
textLabel1->setCursor( QCursor( 3 ) );
textLabel1->setFrameShape( QLabel::NoFrame );
textLabel1->setFrameShadow( QLabel::Raised );
backupDlgLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 3 );
layout3 = new QVBoxLayout( 0, 0, 6, "layout3");
lblStep = new QLabel( this, "lblStep" );
lblStep->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, lblStep->sizePolicy().hasHeightForWidth() ) );
QFont lblStep_font( lblStep->font() );
lblStep_font.setItalic( TRUE );
lblStep->setFont( lblStep_font );
lblStep->setCursor( QCursor( 3 ) );
layout3->addWidget( lblStep );
pbStep = new QProgressBar( this, "pbStep" );
pbStep->setCursor( QCursor( 3 ) );
layout3->addWidget( pbStep );
pbTotal = new QProgressBar( this, "pbTotal" );
pbTotal->setCursor( QCursor( 3 ) );
pbTotal->setMargin( 0 );
pbTotal->setTotalSteps( 4400 );
pbTotal->setPercentageVisible( TRUE );
layout3->addWidget( pbTotal );
backupDlgLayout->addMultiCellLayout( layout3, 3, 3, 0, 3 );
textLabel1_2 = new QLabel( this, "textLabel1_2" );
textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
textLabel1_2->setCursor( QCursor( 3 ) );
backupDlgLayout->addWidget( textLabel1_2, 2, 0 );
lblTime = new QLabel( this, "lblTime" );
lblTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, lblTime->sizePolicy().hasHeightForWidth() ) );
lblTime->setCursor( QCursor( 3 ) );
backupDlgLayout->addWidget( lblTime, 2, 1 );
layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
spacer1 = new QSpacerItem( 131, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout1->addItem( spacer1 );
bAbort = new KPushButton( this, "bAbort" );
bAbort->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bAbort->sizePolicy().hasHeightForWidth() ) );
bAbort->setCursor( QCursor( 0 ) );
bAbort->setProperty( "stdItem", 26 );
layout1->addWidget( bAbort );
backupDlgLayout->addMultiCellLayout( layout1, 4, 4, 0, 3 );
lblFactor = new QLabel( this, "lblFactor" );
lblFactor->setCursor( QCursor( 3 ) );
backupDlgLayout->addWidget( lblFactor, 2, 3 );
frame3 = new QFrame( this, "frame3" );
frame3->setCursor( QCursor( 3 ) );
frame3->setFrameShape( QFrame::StyledPanel );
frame3->setFrameShadow( QFrame::Raised );
frame3->setMargin( 1 );
frame3Layout = new QGridLayout( frame3, 1, 1, 2, 6, "frame3Layout");
bPlay = new KPushButton( frame3, "bPlay" );
bPlay->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, bPlay->sizePolicy().hasHeightForWidth() ) );
bPlay->setMinimumSize( QSize( 25, 25 ) );
bPlay->setMaximumSize( QSize( 25, 25 ) );
bPlay->setCursor( QCursor( 0 ) );
bPlay->setToggleButton( TRUE );
bPlay->setOn( TRUE );
bPlay->setFlat( FALSE );
frame3Layout->addWidget( bPlay, 1, 1 );
spacer4 = new QSpacerItem( 476, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
frame3Layout->addItem( spacer4, 1, 0 );
image = new QLabel( frame3, "image" );
image->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, image->sizePolicy().hasHeightForWidth() ) );
image->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
image->setCursor( QCursor( 3 ) );
image->setScaledContents( TRUE );
frame3Layout->addMultiCellWidget( image, 0, 0, 0, 1 );
backupDlgLayout->addMultiCellWidget( frame3, 1, 1, 0, 3 );
spacer3 = new QSpacerItem( 380, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
backupDlgLayout->addItem( spacer3, 2, 2 );
languageChange();
resize( QSize(385, 425).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( bAbort, SIGNAL( clicked() ), this, SLOT( bAbortClick() ) );
}
/*
* Destroys the object and frees any allocated resources
*/
backupDlg::~backupDlg()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void backupDlg::languageChange()
{
setCaption( tr2i18n( "k9Copy - Backup progression" ) );
textLabel1->setText( tr2i18n( "<p align=\"left\"><b>DVD Backup</b></p>" ) );
lblStep->setText( tr2i18n( "Current step" ) );
textLabel1_2->setText( tr2i18n( "Elapsed Time" ) );
lblTime->setText( tr2i18n( "--:--:--" ) );
bPlay->setText( QString::null );
}
void backupDlg::bAbortClick()
{
qWarning( "backupDlg::bAbortClick(): Not implemented yet" );
}
void backupDlg::bPlayToggled(bool)
{
qWarning( "backupDlg::bPlayToggled(bool): Not implemented yet" );
}
#include "backupdlg.moc"