summaryrefslogtreecommitdiffstats
path: root/libk9copy/backupdlg.cpp
blob: a124c9fcd589110a27dbb29476d39b103df72ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#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"