summaryrefslogtreecommitdiffstats
path: root/src/Q_bookmarkdialog.cpp
blob: c3f016dae911c1cdb41da982772fae10043deb63 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#include <kdialog.h>
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/mkulke/Development/kasablanca/src/Q_bookmarkdialog.ui'
**
** Created: Mo Jan 31 15:02:05 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_bookmarkdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqsplitter.h>
#include <ntqheader.h>
#include <tdelistview.h>
#include <ntqtabwidget.h>
#include <klineedit.h>
#include <ntqlabel.h>
#include <kcombobox.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KasablancaBookmarkDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KasablancaBookmarkDialog::KasablancaBookmarkDialog( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KasablancaBookmarkDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    KasablancaBookmarkDialogLayout = new TQGridLayout( this, 1, 1, 2, 6, "KasablancaBookmarkDialogLayout"); 

    splitter1 = new TQSplitter( this, "splitter1" );
    splitter1->setOrientation( TQSplitter::Horizontal );

    BookmarkListView = new TDEListView( splitter1, "BookmarkListView" );
    BookmarkListView->addColumn( tr2i18n( "Name" ) );
    BookmarkListView->header()->setClickEnabled( FALSE, BookmarkListView->header()->count() - 1 );
    BookmarkListView->setMinimumSize( TQSize( 0, 0 ) );
    BookmarkListView->setAcceptDrops( TRUE );
    BookmarkListView->setDragEnabled( TRUE );

    SettingsTab = new TQTabWidget( splitter1, "SettingsTab" );
    SettingsTab->setEnabled( TRUE );
    SettingsTab->setMinimumSize( TQSize( 360, 232 ) );

    tab = new TQWidget( SettingsTab, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 2, 6, "tabLayout"); 

    PassEdit = new KLineEdit( tab, "PassEdit" );
    PassEdit->setEnabled( FALSE );
    PassEdit->setEchoMode( KLineEdit::Password );

    tabLayout->addMultiCellWidget( PassEdit, 3, 3, 1, 2 );

    UserEdit = new KLineEdit( tab, "UserEdit" );
    UserEdit->setEnabled( FALSE );

    tabLayout->addMultiCellWidget( UserEdit, 2, 2, 1, 2 );

    InfoEdit = new KLineEdit( tab, "InfoEdit" );
    InfoEdit->setEnabled( FALSE );

    tabLayout->addMultiCellWidget( InfoEdit, 1, 1, 1, 2 );

    NameEdit = new KLineEdit( tab, "NameEdit" );
    NameEdit->setEnabled( FALSE );
    NameEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, NameEdit->sizePolicy().hasHeightForWidth() ) );

    tabLayout->addMultiCellWidget( NameEdit, 0, 0, 1, 2 );

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

    tabLayout->addWidget( textLabel1_3, 2, 0 );

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

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

    textLabel1_2_2_2 = new TQLabel( tab, "textLabel1_2_2_2" );

    tabLayout->addWidget( textLabel1_2_2_2, 4, 0 );

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

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

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

    tabLayout->addWidget( textLabel1_2_2, 3, 0 );

    textLabel1_2_2_3 = new TQLabel( tab, "textLabel1_2_2_3" );

    tabLayout->addWidget( textLabel1_2_2_3, 5, 0 );
    spacer8 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer8, 6, 2 );

    ModeComboBox = new KComboBox( FALSE, tab, "ModeComboBox" );
    ModeComboBox->setEnabled( FALSE );

    tabLayout->addWidget( ModeComboBox, 5, 1 );

    EncryptionComboBox = new KComboBox( FALSE, tab, "EncryptionComboBox" );
    EncryptionComboBox->setEnabled( FALSE );

    tabLayout->addWidget( EncryptionComboBox, 4, 1 );
    spacer10 = new TQSpacerItem( 111, 31, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout->addMultiCell( spacer10, 4, 5, 2, 2 );
    SettingsTab->insertTab( tab, TQString("") );

    tab_2 = new TQWidget( SettingsTab, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 2, 6, "tabLayout_2"); 

    textLabel3 = new TQLabel( tab_2, "textLabel3" );

    tabLayout_2->addWidget( textLabel3, 0, 0 );

    DefaultDirectoryEdit = new TQLineEdit( tab_2, "DefaultDirectoryEdit" );
    DefaultDirectoryEdit->setEnabled( FALSE );

    tabLayout_2->addMultiCellWidget( DefaultDirectoryEdit, 0, 0, 1, 3 );

    textLabel2 = new TQLabel( tab_2, "textLabel2" );

    tabLayout_2->addWidget( textLabel2, 1, 0 );

    AlternativeFxpCheckBox = new TQCheckBox( tab_2, "AlternativeFxpCheckBox" );
    AlternativeFxpCheckBox->setEnabled( FALSE );

    tabLayout_2->addWidget( AlternativeFxpCheckBox, 1, 3 );

    CorrectPasvCheckBox = new TQCheckBox( tab_2, "CorrectPasvCheckBox" );
    CorrectPasvCheckBox->setEnabled( FALSE );

    tabLayout_2->addWidget( CorrectPasvCheckBox, 2, 3 );

    textLabel1_2_2_2_2 = new TQLabel( tab_2, "textLabel1_2_2_2_2" );

    tabLayout_2->addMultiCellWidget( textLabel1_2_2_2_2, 2, 2, 0, 1 );
    spacer16 = new TQSpacerItem( 60, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout_2->addMultiCell( spacer16, 1, 2, 2, 2 );
    spacer7 = new TQSpacerItem( 20, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer7, 3, 1 );
    SettingsTab->insertTab( tab_2, TQString("") );

    KasablancaBookmarkDialogLayout->addWidget( splitter1, 0, 0 );
    languageChange();
    resize( TQSize(541, 240).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( NameEdit, InfoEdit );
    setTabOrder( InfoEdit, UserEdit );
    setTabOrder( UserEdit, PassEdit );
    setTabOrder( PassEdit, EncryptionComboBox );
    setTabOrder( EncryptionComboBox, ModeComboBox );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KasablancaBookmarkDialog::languageChange()
{
    setCaption( tr2i18n( "Bookmarks" ) );
    BookmarkListView->header()->setLabel( 0, tr2i18n( "Name" ) );
    TQWhatsThis::add( PassEdit, tr2i18n( "The user's password. Anonymous ftp servers ussually don't use passwords or accept passwords in the form of \"user@emailaddress.com\"." ) );
    TQWhatsThis::add( UserEdit, tr2i18n( "The ftp Login Username. On open ftp servers you usually login using \"anonymous\"." ) );
    InfoEdit->setInputMask( TQString::null );
    TQWhatsThis::add( InfoEdit, tr2i18n( "This information points to the the ftp server. HOST can either be a standard ip adress like 192.168.2.1 or a domain name. PORT is the port number on which the ftp server listens. In most cases this is 21. Both are seperated by a \":\" character. A legit input would be \"ftp.kde.org:21\"." ) );
    TQWhatsThis::add( NameEdit, tr2i18n( "The ftp's name is entered here." ) );
    textLabel1_3->setText( tr2i18n( "Username:" ) );
    textLabel1->setText( tr2i18n( "Name:" ) );
    textLabel1_2_2_2->setText( tr2i18n( "Encryption:" ) );
    TQWhatsThis::add( textLabel1_2_2_2, TQString::null );
    textLabel1_2->setText( tr2i18n( "Host:Port:" ) );
    textLabel1_2_2->setText( tr2i18n( "Password:" ) );
    textLabel1_2_2_3->setText( tr2i18n( "Mode:" ) );
    ModeComboBox->clear();
    ModeComboBox->insertItem( tr2i18n( "Active Mode" ) );
    ModeComboBox->insertItem( tr2i18n( "Passive Mode" ) );
    TQWhatsThis::add( ModeComboBox, tr2i18n( "The mode you are using for data transfer. This is quite important in case you're behind a firewall or a router. In these cases you depend on the passive mode, which makes the client connects to the ftp server for data transfer. Passive mode is the standard method today, while active mode is the old way to do data transfers, the client listens for the server to connect in active mode." ) );
    EncryptionComboBox->clear();
    EncryptionComboBox->insertItem( tr2i18n( "Unencrypted" ) );
    EncryptionComboBox->insertItem( tr2i18n( "Level 1" ) );
    EncryptionComboBox->insertItem( tr2i18n( "Level 2" ) );
    EncryptionComboBox->insertItem( tr2i18n( "Level 3" ) );
    TQWhatsThis::add( EncryptionComboBox, tr2i18n( "There are 4 encryption levels available. Unencrypted leaves all traffic clear and without encryption. Most ftp servers allow only this mode. Level 1 encryption means that the traffic on the control connection is encrypted while data transfer remains clear. Level 2 is basically the same with the exception of directory information which is transfered on the data channel, but is encrypted too. Eventually Level 3 encrypts everything all communication and all data traffic." ) );
    SettingsTab->changeTab( tab, tr2i18n( "General" ) );
    textLabel3->setText( tr2i18n( "Default directory:" ) );
    textLabel2->setText( tr2i18n( "Alternative fxp:" ) );
    AlternativeFxpCheckBox->setText( tr2i18n( "Enabled" ) );
    CorrectPasvCheckBox->setText( tr2i18n( "Enabled" ) );
    textLabel1_2_2_2_2->setText( tr2i18n( "Correct pasv responses:" ) );
    SettingsTab->changeTab( tab_2, tr2i18n( "Advanced" ) );
}

#include "Q_bookmarkdialog.moc"