|
|
|
#include <tdelocale.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 <tqvariant.h>
|
|
|
|
#include <tqpushbutton.h>
|
|
|
|
#include <tqlabel.h>
|
|
|
|
#include <tqprogressbar.h>
|
|
|
|
#include <kpushbutton.h>
|
|
|
|
#include <tqframe.h>
|
|
|
|
#include <tqlayout.h>
|
|
|
|
#include <tqtooltip.h>
|
|
|
|
#include <tqwhatsthis.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( TQWidget* parent, const char* name, bool modal, WFlags fl )
|
|
|
|
: TQDialog( parent, name, modal, fl )
|
|
|
|
{
|
|
|
|
if ( !name )
|
|
|
|
setName( "backupDlg" );
|
|
|
|
setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
|
|
|
|
setMinimumSize( TQSize( 0, 0 ) );
|
|
|
|
setMaximumSize( TQSize( 9999, 9999 ) );
|
|
|
|
setBaseSize( TQSize( 500, 230 ) );
|
|
|
|
setCursor( TQCursor( 3 ) );
|
|
|
|
setModal( TRUE );
|
|
|
|
backupDlgLayout = new TQGridLayout( this, 1, 1, 3, 8, "backupDlgLayout");
|
|
|
|
|
|
|
|
textLabel1 = new TQLabel( this, "textLabel1" );
|
|
|
|
textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
textLabel1->setCursor( TQCursor( 3 ) );
|
|
|
|
textLabel1->setFrameShape( TQLabel::NoFrame );
|
|
|
|
textLabel1->setFrameShadow( TQLabel::Raised );
|
|
|
|
|
|
|
|
backupDlgLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 3 );
|
|
|
|
|
|
|
|
layout3 = new TQVBoxLayout( 0, 0, 6, "layout3");
|
|
|
|
|
|
|
|
lblStep = new TQLabel( this, "lblStep" );
|
|
|
|
lblStep->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, lblStep->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
TQFont lblStep_font( lblStep->font() );
|
|
|
|
lblStep_font.setItalic( TRUE );
|
|
|
|
lblStep->setFont( lblStep_font );
|
|
|
|
lblStep->setCursor( TQCursor( 3 ) );
|
|
|
|
layout3->addWidget( lblStep );
|
|
|
|
|
|
|
|
pbStep = new TQProgressBar( this, "pbStep" );
|
|
|
|
pbStep->setCursor( TQCursor( 3 ) );
|
|
|
|
layout3->addWidget( pbStep );
|
|
|
|
|
|
|
|
pbTotal = new TQProgressBar( this, "pbTotal" );
|
|
|
|
pbTotal->setCursor( TQCursor( 3 ) );
|
|
|
|
pbTotal->setMargin( 0 );
|
|
|
|
pbTotal->setTotalSteps( 4400 );
|
|
|
|
pbTotal->setPercentageVisible( TRUE );
|
|
|
|
layout3->addWidget( pbTotal );
|
|
|
|
|
|
|
|
backupDlgLayout->addMultiCellLayout( layout3, 3, 3, 0, 3 );
|
|
|
|
|
|
|
|
textLabel1_2 = new TQLabel( this, "textLabel1_2" );
|
|
|
|
textLabel1_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
textLabel1_2->setCursor( TQCursor( 3 ) );
|
|
|
|
|
|
|
|
backupDlgLayout->addWidget( textLabel1_2, 2, 0 );
|
|
|
|
|
|
|
|
lblTime = new TQLabel( this, "lblTime" );
|
|
|
|
lblTime->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, lblTime->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
lblTime->setCursor( TQCursor( 3 ) );
|
|
|
|
|
|
|
|
backupDlgLayout->addWidget( lblTime, 2, 1 );
|
|
|
|
|
|
|
|
layout1 = new TQHBoxLayout( 0, 0, 6, "layout1");
|
|
|
|
spacer1 = new TQSpacerItem( 131, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
|
|
|
layout1->addItem( spacer1 );
|
|
|
|
|
|
|
|
bAbort = new KPushButton( this, "bAbort" );
|
|
|
|
bAbort->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bAbort->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
bAbort->setCursor( TQCursor( 0 ) );
|
|
|
|
bAbort->setProperty( "stdItem", 26 );
|
|
|
|
layout1->addWidget( bAbort );
|
|
|
|
|
|
|
|
backupDlgLayout->addMultiCellLayout( layout1, 4, 4, 0, 3 );
|
|
|
|
|
|
|
|
lblFactor = new TQLabel( this, "lblFactor" );
|
|
|
|
lblFactor->setCursor( TQCursor( 3 ) );
|
|
|
|
|
|
|
|
backupDlgLayout->addWidget( lblFactor, 2, 3 );
|
|
|
|
|
|
|
|
frame3 = new TQFrame( this, "frame3" );
|
|
|
|
frame3->setCursor( TQCursor( 3 ) );
|
|
|
|
frame3->setFrameShape( TQFrame::StyledPanel );
|
|
|
|
frame3->setFrameShadow( TQFrame::Raised );
|
|
|
|
frame3->setMargin( 1 );
|
|
|
|
frame3Layout = new TQGridLayout( frame3, 1, 1, 2, 6, "frame3Layout");
|
|
|
|
|
|
|
|
bPlay = new KPushButton( frame3, "bPlay" );
|
|
|
|
bPlay->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, bPlay->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
bPlay->setMinimumSize( TQSize( 25, 25 ) );
|
|
|
|
bPlay->setMaximumSize( TQSize( 25, 25 ) );
|
|
|
|
bPlay->setCursor( TQCursor( 0 ) );
|
|
|
|
bPlay->setToggleButton( TRUE );
|
|
|
|
bPlay->setOn( TRUE );
|
|
|
|
bPlay->setFlat( FALSE );
|
|
|
|
|
|
|
|
frame3Layout->addWidget( bPlay, 1, 1 );
|
|
|
|
spacer4 = new TQSpacerItem( 476, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
|
|
|
frame3Layout->addItem( spacer4, 1, 0 );
|
|
|
|
|
|
|
|
image = new TQLabel( frame3, "image" );
|
|
|
|
image->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, image->sizePolicy().hasHeightForWidth() ) );
|
|
|
|
image->setPaletteBackgroundColor( TQColor( 0, 0, 0 ) );
|
|
|
|
image->setCursor( TQCursor( 3 ) );
|
|
|
|
image->setScaledContents( TRUE );
|
|
|
|
|
|
|
|
frame3Layout->addMultiCellWidget( image, 0, 0, 0, 1 );
|
|
|
|
|
|
|
|
backupDlgLayout->addMultiCellWidget( frame3, 1, 1, 0, 3 );
|
|
|
|
spacer3 = new TQSpacerItem( 380, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
|
|
|
|
backupDlgLayout->addItem( spacer3, 2, 2 );
|
|
|
|
languageChange();
|
|
|
|
resize( TQSize(385, 425).expandedTo(minimumSizeHint()) );
|
|
|
|
clearWState( WState_Polished );
|
|
|
|
|
|
|
|
// signals and slots connections
|
|
|
|
connect( bAbort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAbortClick() ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Destroys the object and frees any allocated resources
|
|
|
|
*/
|
|
|
|
backupDlg::~backupDlg()
|
|
|
|
{
|
|
|
|
// no need to delete child widgets, TQt 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( TQString() );
|
|
|
|
}
|
|
|
|
|
|
|
|
void backupDlg::bAbortClick()
|
|
|
|
{
|
|
|
|
tqWarning( "backupDlg::bAbortClick(): Not implemented yet" );
|
|
|
|
}
|
|
|
|
|
|
|
|
void backupDlg::bPlayToggled(bool)
|
|
|
|
{
|
|
|
|
tqWarning( "backupDlg::bPlayToggled(bool): Not implemented yet" );
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "backupdlg.moc"
|