12 #ifndef UI_SMTPSETTINGS_DESKTOP_H
13 #define UI_SMTPSETTINGS_DESKTOP_H
15 #include <QtCore/QVariant>
16 #include <QtGui/QAction>
17 #include <QtGui/QApplication>
18 #include <QtGui/QButtonGroup>
19 #include <QtGui/QCheckBox>
20 #include <QtGui/QFormLayout>
21 #include <QtGui/QGridLayout>
22 #include <QtGui/QGroupBox>
23 #include <QtGui/QHBoxLayout>
24 #include <QtGui/QHeaderView>
25 #include <QtGui/QLabel>
26 #include <QtGui/QProgressBar>
27 #include <QtGui/QRadioButton>
28 #include <QtGui/QSpacerItem>
29 #include <QtGui/QStackedWidget>
30 #include <QtGui/QVBoxLayout>
31 #include <QtGui/QWidget>
32 #include "kbuttongroup.h"
33 #include "kcombobox.h"
34 #include "klineedit.h"
35 #include "knuminput.h"
36 #include "kpushbutton.h"
37 #include "ktabwidget.h"
44 QVBoxLayout *verticalLayout;
45 KTabWidget *tabWidget;
47 QVBoxLayout *verticalLayout_2;
49 QGridLayout *gridLayout;
52 QLabel *usernameLabel;
53 KLineEdit *kcfg_userName;
54 QLabel *passwordLabel;
56 QCheckBox *kcfg_storePassword;
57 QCheckBox *kcfg_requiresAuthentication;
58 QSpacerItem *verticalSpacer;
60 QVBoxLayout *verticalLayout_7;
61 KButtonGroup *kcfg_encryption;
62 QVBoxLayout *verticalLayout_5;
63 QStackedWidget *checkCapabilitiesStack;
65 QVBoxLayout *verticalLayout_3;
66 KPushButton *checkCapabilities;
68 QVBoxLayout *verticalLayout_4;
69 QProgressBar *checkCapabilitiesProgress;
70 QLabel *noAuthPossible;
71 QFormLayout *formLayout_2;
73 QHBoxLayout *encryptHLayout;
78 KIntNumInput *kcfg_port;
81 QGroupBox *groupBox_2;
82 QFormLayout *formLayout;
83 QCheckBox *kcfg_specifyHostname;
84 QLabel *hostnameLabel;
85 KLineEdit *kcfg_localHostname;
86 QCheckBox *kcfg_specifySenderOverwriteAddress;
88 KLineEdit *kcfg_senderOverwriteAddress;
89 QLabel *precommandLabel;
90 KLineEdit *kcfg_precommand;
91 QSpacerItem *verticalSpacer_2;
93 void setupUi(QWidget *SMTPSettings)
95 if (SMTPSettings->objectName().isEmpty())
96 SMTPSettings->setObjectName(QString::fromUtf8(
"SMTPSettings"));
97 SMTPSettings->resize(392, 446);
98 verticalLayout =
new QVBoxLayout(SMTPSettings);
99 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
100 tabWidget =
new KTabWidget(SMTPSettings);
101 tabWidget->setObjectName(QString::fromUtf8(
"tabWidget"));
102 smptTab =
new QWidget();
103 smptTab->setObjectName(QString::fromUtf8(
"smptTab"));
104 verticalLayout_2 =
new QVBoxLayout(smptTab);
105 verticalLayout_2->setObjectName(QString::fromUtf8(
"verticalLayout_2"));
106 groupBox =
new QGroupBox(smptTab);
107 groupBox->setObjectName(QString::fromUtf8(
"groupBox"));
108 gridLayout =
new QGridLayout(groupBox);
109 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
110 hostLabel =
new QLabel(groupBox);
111 hostLabel->setObjectName(QString::fromUtf8(
"hostLabel"));
112 hostLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
114 gridLayout->addWidget(hostLabel, 0, 0, 1, 1);
116 kcfg_host =
new KLineEdit(groupBox);
117 kcfg_host->setObjectName(QString::fromUtf8(
"kcfg_host"));
119 gridLayout->addWidget(kcfg_host, 0, 1, 1, 1);
121 usernameLabel =
new QLabel(groupBox);
122 usernameLabel->setObjectName(QString::fromUtf8(
"usernameLabel"));
123 usernameLabel->setEnabled(
false);
124 usernameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
126 gridLayout->addWidget(usernameLabel, 2, 0, 1, 1);
128 kcfg_userName =
new KLineEdit(groupBox);
129 kcfg_userName->setObjectName(QString::fromUtf8(
"kcfg_userName"));
130 kcfg_userName->setEnabled(
false);
132 gridLayout->addWidget(kcfg_userName, 2, 1, 1, 1);
134 passwordLabel =
new QLabel(groupBox);
135 passwordLabel->setObjectName(QString::fromUtf8(
"passwordLabel"));
136 passwordLabel->setEnabled(
false);
137 passwordLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
139 gridLayout->addWidget(passwordLabel, 3, 0, 1, 1);
141 password =
new KLineEdit(groupBox);
142 password->setObjectName(QString::fromUtf8(
"password"));
143 password->setEnabled(
false);
144 password->setEchoMode(QLineEdit::Password);
146 gridLayout->addWidget(password, 3, 1, 1, 1);
148 kcfg_storePassword =
new QCheckBox(groupBox);
149 kcfg_storePassword->setObjectName(QString::fromUtf8(
"kcfg_storePassword"));
150 kcfg_storePassword->setEnabled(
false);
152 gridLayout->addWidget(kcfg_storePassword, 4, 1, 1, 1);
154 kcfg_requiresAuthentication =
new QCheckBox(groupBox);
155 kcfg_requiresAuthentication->setObjectName(QString::fromUtf8(
"kcfg_requiresAuthentication"));
157 gridLayout->addWidget(kcfg_requiresAuthentication, 1, 1, 1, 1);
160 verticalLayout_2->addWidget(groupBox);
162 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
164 verticalLayout_2->addItem(verticalSpacer);
166 tabWidget->addTab(smptTab, QString());
167 advancedTab =
new QWidget();
168 advancedTab->setObjectName(QString::fromUtf8(
"advancedTab"));
169 verticalLayout_7 =
new QVBoxLayout(advancedTab);
170 verticalLayout_7->setObjectName(QString::fromUtf8(
"verticalLayout_7"));
171 kcfg_encryption =
new KButtonGroup(advancedTab);
172 kcfg_encryption->setObjectName(QString::fromUtf8(
"kcfg_encryption"));
173 kcfg_encryption->setEnabled(
true);
174 verticalLayout_5 =
new QVBoxLayout(kcfg_encryption);
175 verticalLayout_5->setObjectName(QString::fromUtf8(
"verticalLayout_5"));
176 checkCapabilitiesStack =
new QStackedWidget(kcfg_encryption);
177 checkCapabilitiesStack->setObjectName(QString::fromUtf8(
"checkCapabilitiesStack"));
178 page =
new QWidget();
179 page->setObjectName(QString::fromUtf8(
"page"));
180 verticalLayout_3 =
new QVBoxLayout(page);
181 verticalLayout_3->setObjectName(QString::fromUtf8(
"verticalLayout_3"));
182 checkCapabilities =
new KPushButton(page);
183 checkCapabilities->setObjectName(QString::fromUtf8(
"checkCapabilities"));
185 verticalLayout_3->addWidget(checkCapabilities);
187 checkCapabilitiesStack->addWidget(page);
188 page_2 =
new QWidget();
189 page_2->setObjectName(QString::fromUtf8(
"page_2"));
190 verticalLayout_4 =
new QVBoxLayout(page_2);
191 verticalLayout_4->setObjectName(QString::fromUtf8(
"verticalLayout_4"));
192 checkCapabilitiesProgress =
new QProgressBar(page_2);
193 checkCapabilitiesProgress->setObjectName(QString::fromUtf8(
"checkCapabilitiesProgress"));
194 checkCapabilitiesProgress->setValue(0);
196 verticalLayout_4->addWidget(checkCapabilitiesProgress);
198 checkCapabilitiesStack->addWidget(page_2);
200 verticalLayout_5->addWidget(checkCapabilitiesStack);
202 noAuthPossible =
new QLabel(kcfg_encryption);
203 noAuthPossible->setObjectName(QString::fromUtf8(
"noAuthPossible"));
204 noAuthPossible->setVisible(
false);
205 noAuthPossible->setFrameShape(QFrame::Box);
206 noAuthPossible->setFrameShadow(QFrame::Plain);
207 noAuthPossible->setLineWidth(0);
208 noAuthPossible->setAlignment(Qt::AlignCenter);
210 verticalLayout_5->addWidget(noAuthPossible);
212 formLayout_2 =
new QFormLayout();
213 formLayout_2->setObjectName(QString::fromUtf8(
"formLayout_2"));
214 formLayout_2->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
215 label =
new QLabel(kcfg_encryption);
216 label->setObjectName(QString::fromUtf8(
"label"));
218 formLayout_2->setWidget(0, QFormLayout::LabelRole, label);
220 encryptHLayout =
new QHBoxLayout();
221 encryptHLayout->setObjectName(QString::fromUtf8(
"encryptHLayout"));
222 none =
new QRadioButton(kcfg_encryption);
223 none->setObjectName(QString::fromUtf8(
"none"));
225 encryptHLayout->addWidget(none);
227 ssl =
new QRadioButton(kcfg_encryption);
228 ssl->setObjectName(QString::fromUtf8(
"ssl"));
230 encryptHLayout->addWidget(ssl);
232 tls =
new QRadioButton(kcfg_encryption);
233 tls->setObjectName(QString::fromUtf8(
"tls"));
235 encryptHLayout->addWidget(tls);
238 formLayout_2->setLayout(0, QFormLayout::FieldRole, encryptHLayout);
240 portLabel =
new QLabel(kcfg_encryption);
241 portLabel->setObjectName(QString::fromUtf8(
"portLabel"));
242 portLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
244 formLayout_2->setWidget(1, QFormLayout::LabelRole, portLabel);
246 kcfg_port =
new KIntNumInput(kcfg_encryption);
247 kcfg_port->setObjectName(QString::fromUtf8(
"kcfg_port"));
248 kcfg_port->setValue(25);
249 kcfg_port->setMinimum(1);
251 formLayout_2->setWidget(1, QFormLayout::FieldRole, kcfg_port);
253 authLabel =
new QLabel(kcfg_encryption);
254 authLabel->setObjectName(QString::fromUtf8(
"authLabel"));
256 formLayout_2->setWidget(2, QFormLayout::LabelRole, authLabel);
258 authCombo =
new KComboBox(kcfg_encryption);
259 authCombo->setObjectName(QString::fromUtf8(
"authCombo"));
261 formLayout_2->setWidget(2, QFormLayout::FieldRole, authCombo);
264 verticalLayout_5->addLayout(formLayout_2);
267 verticalLayout_7->addWidget(kcfg_encryption);
269 groupBox_2 =
new QGroupBox(advancedTab);
270 groupBox_2->setObjectName(QString::fromUtf8(
"groupBox_2"));
271 formLayout =
new QFormLayout(groupBox_2);
272 formLayout->setObjectName(QString::fromUtf8(
"formLayout"));
273 kcfg_specifyHostname =
new QCheckBox(groupBox_2);
274 kcfg_specifyHostname->setObjectName(QString::fromUtf8(
"kcfg_specifyHostname"));
276 formLayout->setWidget(0, QFormLayout::SpanningRole, kcfg_specifyHostname);
278 hostnameLabel =
new QLabel(groupBox_2);
279 hostnameLabel->setObjectName(QString::fromUtf8(
"hostnameLabel"));
280 hostnameLabel->setEnabled(
false);
281 hostnameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
283 formLayout->setWidget(1, QFormLayout::LabelRole, hostnameLabel);
285 kcfg_localHostname =
new KLineEdit(groupBox_2);
286 kcfg_localHostname->setObjectName(QString::fromUtf8(
"kcfg_localHostname"));
287 kcfg_localHostname->setEnabled(
false);
289 formLayout->setWidget(1, QFormLayout::FieldRole, kcfg_localHostname);
291 kcfg_specifySenderOverwriteAddress =
new QCheckBox(groupBox_2);
292 kcfg_specifySenderOverwriteAddress->setObjectName(QString::fromUtf8(
"kcfg_specifySenderOverwriteAddress"));
294 formLayout->setWidget(2, QFormLayout::SpanningRole, kcfg_specifySenderOverwriteAddress);
296 label_2 =
new QLabel(groupBox_2);
297 label_2->setObjectName(QString::fromUtf8(
"label_2"));
298 label_2->setEnabled(
false);
300 formLayout->setWidget(3, QFormLayout::LabelRole, label_2);
302 kcfg_senderOverwriteAddress =
new KLineEdit(groupBox_2);
303 kcfg_senderOverwriteAddress->setObjectName(QString::fromUtf8(
"kcfg_senderOverwriteAddress"));
304 kcfg_senderOverwriteAddress->setEnabled(
false);
306 formLayout->setWidget(3, QFormLayout::FieldRole, kcfg_senderOverwriteAddress);
308 precommandLabel =
new QLabel(groupBox_2);
309 precommandLabel->setObjectName(QString::fromUtf8(
"precommandLabel"));
310 precommandLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
312 formLayout->setWidget(4, QFormLayout::LabelRole, precommandLabel);
314 kcfg_precommand =
new KLineEdit(groupBox_2);
315 kcfg_precommand->setObjectName(QString::fromUtf8(
"kcfg_precommand"));
316 precommandLabel->raise();
318 formLayout->setWidget(4, QFormLayout::FieldRole, kcfg_precommand);
321 verticalLayout_7->addWidget(groupBox_2);
323 verticalSpacer_2 =
new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
325 verticalLayout_7->addItem(verticalSpacer_2);
327 tabWidget->addTab(advancedTab, QString());
329 verticalLayout->addWidget(tabWidget);
331 #ifndef UI_QT_NO_SHORTCUT
332 hostLabel->setBuddy(kcfg_host);
333 usernameLabel->setBuddy(kcfg_userName);
334 passwordLabel->setBuddy(password);
335 portLabel->setBuddy(kcfg_port);
336 hostnameLabel->setBuddy(kcfg_localHostname);
337 #endif // QT_NO_SHORTCUT
338 QWidget::setTabOrder(tabWidget, kcfg_host);
339 QWidget::setTabOrder(kcfg_host, kcfg_requiresAuthentication);
340 QWidget::setTabOrder(kcfg_requiresAuthentication, kcfg_userName);
341 QWidget::setTabOrder(kcfg_userName, password);
342 QWidget::setTabOrder(password, kcfg_storePassword);
343 QWidget::setTabOrder(kcfg_storePassword, checkCapabilities);
344 QWidget::setTabOrder(checkCapabilities, none);
345 QWidget::setTabOrder(none, ssl);
346 QWidget::setTabOrder(ssl, tls);
347 QWidget::setTabOrder(tls, authCombo);
348 QWidget::setTabOrder(authCombo, kcfg_specifyHostname);
349 QWidget::setTabOrder(kcfg_specifyHostname, kcfg_localHostname);
350 QWidget::setTabOrder(kcfg_localHostname, kcfg_specifySenderOverwriteAddress);
351 QWidget::setTabOrder(kcfg_specifySenderOverwriteAddress, kcfg_senderOverwriteAddress);
352 QWidget::setTabOrder(kcfg_senderOverwriteAddress, kcfg_precommand);
354 retranslateUi(SMTPSettings);
355 QObject::connect(kcfg_specifyHostname, SIGNAL(toggled(
bool)), hostnameLabel, SLOT(setEnabled(
bool)));
356 QObject::connect(kcfg_specifyHostname, SIGNAL(toggled(
bool)), kcfg_localHostname, SLOT(setEnabled(
bool)));
357 QObject::connect(kcfg_requiresAuthentication, SIGNAL(toggled(
bool)), kcfg_userName, SLOT(setEnabled(
bool)));
358 QObject::connect(kcfg_requiresAuthentication, SIGNAL(toggled(
bool)), usernameLabel, SLOT(setEnabled(
bool)));
359 QObject::connect(kcfg_requiresAuthentication, SIGNAL(toggled(
bool)), passwordLabel, SLOT(setEnabled(
bool)));
360 QObject::connect(kcfg_requiresAuthentication, SIGNAL(toggled(
bool)), password, SLOT(setEnabled(
bool)));
361 QObject::connect(kcfg_requiresAuthentication, SIGNAL(toggled(
bool)), kcfg_storePassword, SLOT(setEnabled(
bool)));
362 QObject::connect(kcfg_specifySenderOverwriteAddress, SIGNAL(toggled(
bool)), label_2, SLOT(setEnabled(
bool)));
363 QObject::connect(kcfg_specifySenderOverwriteAddress, SIGNAL(toggled(
bool)), kcfg_senderOverwriteAddress, SLOT(setEnabled(
bool)));
365 tabWidget->setCurrentIndex(0);
366 checkCapabilitiesStack->setCurrentIndex(0);
369 QMetaObject::connectSlotsByName(SMTPSettings);
372 void retranslateUi(QWidget *SMTPSettings)
374 groupBox->setTitle(tr2i18n(
"Account Information", 0));
375 hostLabel->setText(tr2i18n(
"Outgoing mail &server:", 0));
376 usernameLabel->setText(tr2i18n(
"&Login:", 0));
377 passwordLabel->setText(tr2i18n(
"P&assword:", 0));
378 #ifndef UI_QT_NO_WHATSTHIS
379 password->setWhatsThis(tr2i18n(
"The password to send to the server for authorization.", 0));
380 #endif // QT_NO_WHATSTHIS
381 kcfg_storePassword->setText(tr2i18n(
"&Store SMTP password", 0));
382 kcfg_requiresAuthentication->setText(tr2i18n(
"Server &requires authentication", 0));
383 tabWidget->setTabText(tabWidget->indexOf(smptTab), tr2i18n(
"General",
"general smtp settings"));
384 kcfg_encryption->setTitle(tr2i18n(
"Connection Settings", 0));
385 checkCapabilities->setText(tr2i18n(
"Auto Detect", 0));
386 noAuthPossible->setText(tr2i18n(
"This server does not support authentication", 0));
387 label->setText(tr2i18n(
"Encryption:", 0));
388 none->setText(tr2i18n(
"&None", 0));
389 ssl->setText(tr2i18n(
"&SSL", 0));
390 tls->setText(tr2i18n(
"&TLS", 0));
391 portLabel->setText(tr2i18n(
"&Port:", 0));
392 authLabel->setText(tr2i18n(
"Authentication:", 0));
393 groupBox_2->setTitle(tr2i18n(
"SMTP Settings", 0));
394 kcfg_specifyHostname->setText(tr2i18n(
"Sen&d custom hostname to server", 0));
395 hostnameLabel->setText(tr2i18n(
"Hos&tname:", 0));
396 kcfg_specifySenderOverwriteAddress->setText(tr2i18n(
"Use custom sender address", 0));
397 label_2->setText(tr2i18n(
"Sender Address:", 0));
398 precommandLabel->setText(tr2i18n(
"Precommand:", 0));
399 tabWidget->setTabText(tabWidget->indexOf(advancedTab), tr2i18n(
"Advanced",
"advanced smtp settings"));
400 Q_UNUSED(SMTPSettings);
406 class SMTPSettings:
public Ui_SMTPSettings {};
411 #endif // SMTPSETTINGS_DESKTOP_H