summaryrefslogtreecommitdiffstats
path: root/src/Q_generalpreferencesdialog.cpp
blob: 4e97d05faed37a953c8470b08d5d32319ad97612 (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
175
176
#include <kdialog.h>
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/mkulke/Development/kasablanca/src/Q_generalpreferencesdialog.ui'
**
** Created: Mo Jan 31 15:02:08 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_generalpreferencesdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KasablancaGeneralPreferencesDialog 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.
 */
KasablancaGeneralPreferencesDialog::KasablancaGeneralPreferencesDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "KasablancaGeneralPreferencesDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( FALSE );
    KasablancaGeneralPreferencesDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "KasablancaGeneralPreferencesDialogLayout"); 
    KasablancaGeneralPreferencesDialogLayout->setResizeMode( TQLayout::Minimum );
    spacer2_2 = new TQSpacerItem( 20, 78, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    KasablancaGeneralPreferencesDialogLayout->addItem( spacer2_2, 3, 0 );

    textLabel1_3 = new TQLabel( this, "textLabel1_3" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( textLabel1_3, 4, 0 );

    textLabel1 = new TQLabel( this, "textLabel1" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( textLabel1, 0, 0 );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( textLabel1_2, 1, 0 );

    textLabel1_2_2 = new TQLabel( this, "textLabel1_2_2" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( textLabel1_2_2, 2, 0 );
    spacer2 = new TQSpacerItem( 20, 78, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    KasablancaGeneralPreferencesDialogLayout->addItem( spacer2, 3, 3 );

    kcfg_Skiplist = new TQLineEdit( this, "kcfg_Skiplist" );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( kcfg_Skiplist, 0, 0, 1, 2 );

    kcfg_OnQueueFinished = new TQLineEdit( this, "kcfg_OnQueueFinished" );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( kcfg_OnQueueFinished, 1, 1, 1, 2 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    kcfg_OnFileExistsResume = new TQRadioButton( buttonGroup1, "kcfg_OnFileExistsResume" );

    buttonGroup1Layout->addWidget( kcfg_OnFileExistsResume, 1, 0 );

    kcfg_OnFileExistsSkip = new TQRadioButton( buttonGroup1, "kcfg_OnFileExistsSkip" );

    buttonGroup1Layout->addWidget( kcfg_OnFileExistsSkip, 2, 0 );

    kcfg_OnFileExistsOverwrite = new TQRadioButton( buttonGroup1, "kcfg_OnFileExistsOverwrite" );

    buttonGroup1Layout->addWidget( kcfg_OnFileExistsOverwrite, 0, 0 );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( buttonGroup1, 2, 3, 1, 2 );

    kcfg_Prioritylist = new TQLineEdit( this, "kcfg_Prioritylist" );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( kcfg_Prioritylist, 4, 4, 1, 2 );

    textLabel1_3_2 = new TQLabel( this, "textLabel1_3_2" );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( textLabel1_3_2, 5, 5, 0, 1 );

    textLabel1_3_2_2 = new TQLabel( this, "textLabel1_3_2_2" );

    KasablancaGeneralPreferencesDialogLayout->addMultiCellWidget( textLabel1_3_2_2, 6, 6, 0, 1 );
    spacer9 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KasablancaGeneralPreferencesDialogLayout->addItem( spacer9, 7, 2 );

    kcfg_SkiplistIsEnabled = new TQCheckBox( this, "kcfg_SkiplistIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_SkiplistIsEnabled, 0, 3 );

    kcfg_OnQueueFinishedIsEnabled = new TQCheckBox( this, "kcfg_OnQueueFinishedIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_OnQueueFinishedIsEnabled, 1, 3 );

    kcfg_OnFileExistsIsEnabled = new TQCheckBox( this, "kcfg_OnFileExistsIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_OnFileExistsIsEnabled, 2, 3 );

    kcfg_PrioritylistIsEnabled = new TQCheckBox( this, "kcfg_PrioritylistIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_PrioritylistIsEnabled, 4, 3 );

    kcfg_DirCachingIsEnabled = new TQCheckBox( this, "kcfg_DirCachingIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_DirCachingIsEnabled, 5, 3 );

    kcfg_DeleteMovesIntoTrashIsEnabled = new TQCheckBox( this, "kcfg_DeleteMovesIntoTrashIsEnabled" );

    KasablancaGeneralPreferencesDialogLayout->addWidget( kcfg_DeleteMovesIntoTrashIsEnabled, 6, 3 );
    spacer10 = new TQSpacerItem( 81, 51, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    KasablancaGeneralPreferencesDialogLayout->addMultiCell( spacer10, 5, 6, 2, 2 );
    languageChange();
    resize( TQSize(455, 303).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KasablancaGeneralPreferencesDialog::languageChange()
{
    setCaption( tr2i18n( "General" ) );
    TQWhatsThis::add( this, tr2i18n( "Directory caching means that once you browsed a folder on a ftp session the content of that folder is cached, and will be loaded from there in case you enter it again. This can speed up browsing especially with large dirs. If you want a fresh representation of the dir content, you can press the refresh button." ) );
    textLabel1_3->setText( tr2i18n( "Priority list:" ) );
    textLabel1->setText( tr2i18n( "Skiplist:" ) );
    textLabel1_2->setText( tr2i18n( "On queue finished:" ) );
    textLabel1_2_2->setText( tr2i18n( "On file exist:" ) );
    TQWhatsThis::add( kcfg_Skiplist, tr2i18n( "Here you can enter a Regular Expression. Transfer items which match this Regular Expression are skipped. For example a value of \"^\\.\" excludes every entry beginning with \".\" from transfer." ) );
    TQWhatsThis::add( kcfg_OnQueueFinished, tr2i18n( "This field can hold an executable and its arguments which will be run, when last item of in queue has finished transferring. For Example, on TDE desktops the entry \"dcop ksmserver ksmserver logout 0 0 0\" would shutdown the computer automatically." ) );
    buttonGroup1->setTitle( TQString::null );
    kcfg_OnFileExistsResume->setText( tr2i18n( "Resume (if possible)" ) );
    TQWhatsThis::add( kcfg_OnFileExistsResume, tr2i18n( "These Radio Buttons indicate how the application should proceed if a file to be transfered already exists on the destination. Usually the user is asked by the application how to proceed if this occurs, in case you aren't present during the transfer you can enable this feature." ) );
    kcfg_OnFileExistsSkip->setText( tr2i18n( "Skip" ) );
    TQWhatsThis::add( kcfg_OnFileExistsSkip, tr2i18n( "These Radio Buttons indicate how the application should proceed if a file to be transfered already exists on the destination. Usually the user is asked by the application how to proceed if this occurs, in case you aren't present during the transfer you can enable this feature." ) );
    kcfg_OnFileExistsOverwrite->setText( tr2i18n( "Overwrite" ) );
    TQWhatsThis::add( kcfg_OnFileExistsOverwrite, tr2i18n( "These Radio Buttons indicate how the application should proceed if a file to be transfered already exists on the destination. Usually the user is asked by the application how to proceed if this occurs, in case you aren't present during the transfer you can enable this feature." ) );
    TQWhatsThis::add( kcfg_Prioritylist, tr2i18n( "This Field contains a regular expression, which queues the items matching this regular expression before the items which don't. For example, \".sfv\" would make the common checksum files with this fileending transfer first." ) );
    textLabel1_3_2->setText( tr2i18n( "Directory caching:" ) );
    textLabel1_3_2_2->setText( tr2i18n( "Delete moves files into trash:" ) );
    kcfg_SkiplistIsEnabled->setText( tr2i18n( "Enabled" ) );
    kcfg_OnQueueFinishedIsEnabled->setText( tr2i18n( "Enabled" ) );
    kcfg_OnFileExistsIsEnabled->setText( tr2i18n( "Enabled" ) );
    kcfg_PrioritylistIsEnabled->setText( tr2i18n( "Enabled" ) );
    kcfg_DirCachingIsEnabled->setText( tr2i18n( "Enabled" ) );
    kcfg_DeleteMovesIntoTrashIsEnabled->setText( tr2i18n( "Enabled" ) );
}

#include "Q_generalpreferencesdialog.moc"