summaryrefslogtreecommitdiffstats
path: root/libk9copy/backupdlg.cpp
blob: 1cc01d2313c3c139f60e1ede38ed4aac7ebe477e (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 <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 'tqparent', 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* tqparent, const char* name, bool modal, WFlags fl )
    : TQDialog( tqparent, name, modal, fl )
{
    if ( !name )
	setName( "backupDlg" );
    tqsetSizePolicy( 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->tqsetSizePolicy( 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 );

    tqlayout3 = new TQVBoxLayout( 0, 0, 6, "tqlayout3"); 

    lblStep = new TQLabel( this, "lblStep" );
    lblStep->tqsetSizePolicy( 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 ) );
    tqlayout3->addWidget( lblStep );

    pbStep = new TQProgressBar( this, "pbStep" );
    pbStep->setCursor( TQCursor( 3 ) );
    tqlayout3->addWidget( pbStep );

    pbTotal = new TQProgressBar( this, "pbTotal" );
    pbTotal->setCursor( TQCursor( 3 ) );
    pbTotal->setMargin( 0 );
    pbTotal->setTotalSteps( 4400 );
    pbTotal->setPercentageVisible( TRUE );
    tqlayout3->addWidget( pbTotal );

    backupDlgLayout->addMultiCellLayout( tqlayout3, 3, 3, 0, 3 );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->tqsetSizePolicy( 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->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, lblTime->sizePolicy().hasHeightForWidth() ) );
    lblTime->setCursor( TQCursor( 3 ) );

    backupDlgLayout->addWidget( lblTime, 2, 1 );

    tqlayout1 = new TQHBoxLayout( 0, 0, 6, "tqlayout1"); 
    spacer1 = new TQSpacerItem( 131, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tqlayout1->addItem( spacer1 );

    bAbort = new KPushButton( this, "bAbort" );
    bAbort->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bAbort->sizePolicy().hasHeightForWidth() ) );
    bAbort->setCursor( TQCursor( 0 ) );
    bAbort->setProperty( "stdItem", 26 );
    tqlayout1->addWidget( bAbort );

    backupDlgLayout->addMultiCellLayout( tqlayout1, 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->tqsetSizePolicy( 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->tqsetSizePolicy( 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(tqminimumSizeHint()) );
    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()
{
    qWarning( "backupDlg::bAbortClick(): Not implemented yet" );
}

void backupDlg::bPlayToggled(bool)
{
    qWarning( "backupDlg::bPlayToggled(bool): Not implemented yet" );
}

#include "backupdlg.moc"