summaryrefslogtreecommitdiffstats
path: root/src/Q_fileexistsdialog.cpp
blob: c3cba9b0c2c054be9b7474d9268e095450546d99 (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
#include <kdialog.h>
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/mkulke/Development/kasablanca/src/Q_fileexistsdialog.ui'
**
** Created: Mo Jan 31 15:02:06 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.3   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "Q_fileexistsdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KasablancaFileExistsDialog 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.
 */
KasablancaFileExistsDialog::KasablancaFileExistsDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KasablancaFileExistsDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setModal( TRUE );
    KasablancaFileExistsDialogLayout = new TQGridLayout( this, 1, 1, 2, 6, "KasablancaFileExistsDialogLayout"); 
    KasablancaFileExistsDialogLayout->setResizeMode( TQLayout::Fixed );

    SkipButton = new TQPushButton( this, "SkipButton" );

    KasablancaFileExistsDialogLayout->addWidget( SkipButton, 0, 3 );

    ResumeButton = new TQPushButton( this, "ResumeButton" );
    ResumeButton->setEnabled( TRUE );

    KasablancaFileExistsDialogLayout->addWidget( ResumeButton, 0, 1 );

    RenameButton = new TQPushButton( this, "RenameButton" );
    RenameButton->setEnabled( TRUE );

    KasablancaFileExistsDialogLayout->addWidget( RenameButton, 0, 2 );

    OverwriteButton = new TQPushButton( this, "OverwriteButton" );

    KasablancaFileExistsDialogLayout->addWidget( OverwriteButton, 0, 0 );
    languageChange();
    resize( TQSize(514, 57).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( SkipButton, SIGNAL( clicked() ), this, SLOT( Skip() ) );
    connect( OverwriteButton, SIGNAL( clicked() ), this, SLOT( Overwrite() ) );
    connect( ResumeButton, SIGNAL( clicked() ), this, SLOT( Resume() ) );
    connect( RenameButton, SIGNAL( clicked() ), this, SLOT( Rename() ) );

    // tab order
    setTabOrder( OverwriteButton, ResumeButton );
    setTabOrder( ResumeButton, RenameButton );
    setTabOrder( RenameButton, SkipButton );
}

/*
 *  Destroys the object and frees any allocated resources
 */
KasablancaFileExistsDialog::~KasablancaFileExistsDialog()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KasablancaFileExistsDialog::languageChange()
{
    setCaption( tr2i18n( "File Exists" ) );
    SkipButton->setText( tr2i18n( "Skip" ) );
    ResumeButton->setText( tr2i18n( "Resume" ) );
    RenameButton->setText( tr2i18n( "Rename" ) );
    OverwriteButton->setText( tr2i18n( "Overwrite" ) );
}

void KasablancaFileExistsDialog::Skip()
{
    tqWarning( "KasablancaFileExistsDialog::Skip(): Not implemented yet" );
}

void KasablancaFileExistsDialog::Overwrite()
{
    tqWarning( "KasablancaFileExistsDialog::Overwrite(): Not implemented yet" );
}

void KasablancaFileExistsDialog::Resume()
{
    tqWarning( "KasablancaFileExistsDialog::Resume(): Not implemented yet" );
}

void KasablancaFileExistsDialog::Rename()
{
    tqWarning( "KasablancaFileExistsDialog::Rename(): Not implemented yet" );
}

#include "Q_fileexistsdialog.moc"