diff options
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/gpg/GpgConstants.cpp | 20 | ||||
-rw-r--r-- | src/gpg/model/GpgKey.h | 2 | ||||
-rw-r--r-- | src/ui/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 22 | ||||
-rw-r--r-- | src/ui/settings/SettingsSendMail.cpp | 287 | ||||
-rw-r--r-- | src/ui/settings/SettingsSendMail.h | 18 | ||||
-rw-r--r-- | src/ui/smtp/SendMailDialog.cpp | 6 | ||||
-rw-r--r-- | ui/SendMailSettings.ui | 374 |
10 files changed, 576 insertions, 160 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d91ab27..bf0ab173 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,6 @@ IF (MINGW) endif () if (APPLE) - message(STATUS "Configuration For OS Platform MacOS") set(OS_PLATFORM 1) @@ -262,6 +261,7 @@ elseif (STABLE_APPLICATION_BUILD) set(UI_CORE 1) set(APPLICATION_BUILD 1) set(BASIC_ENV_CONFIG 1) + set(SMTP_SUPPORT 1) # MULTI_LANG_SUPPORT now work only on Linux and macOS set(MULTI_LANG_SUPPORT 1) elseif (TEST_BUILD) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9a0f7eb8..346b1524 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -204,7 +204,7 @@ if (APPLICATION_BUILD) set(GPGFRONTEND_BEFORE_UI_LIBS ${GPGFRONTEND_BEFORE_UI_LIBS} server) endif () if (SMTP_SUPPORT) - set(GPGFRONTEND_AFTER_UI_LIBS ${GPGFRONTEND_AFTER_UI_LIBS} server) + set(GPGFRONTEND_BEFORE_UI_LIBS ${GPGFRONTEND_BEFORE_UI_LIBS} smtp) endif () set(GPGFRONTEND_LIBS ${GPGFRONTEND_AFTER_UI_LIBS} gpgfrontend-ui gpg_core ${GPGFRONTEND_BEFORE_UI_LIBS} easy_logging_pp) diff --git a/src/gpg/GpgConstants.cpp b/src/gpg/GpgConstants.cpp index d38cafe3..fd3c56b4 100644 --- a/src/gpg/GpgConstants.cpp +++ b/src/gpg/GpgConstants.cpp @@ -47,9 +47,9 @@ const char* GpgFrontend::GpgConstants::GPG_FRONTEND_SHORT_CRYPTO_HEAD = gpgme_error_t GpgFrontend::check_gpg_error(gpgme_error_t err) { if (gpg_err_code(err) != GPG_ERR_NO_ERROR) { - LOG(ERROR) << "[Error " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " Description: " << gpgme_strerror(err); + LOG(ERROR) << "[" << _("Error") << " " << gpg_err_code(err) << "] " + << _("Source: ") << gpgme_strsource(err) << " " + << _("Description: ") << gpgme_strerror(err); } return err; } @@ -58,9 +58,9 @@ gpg_err_code_t GpgFrontend::check_gpg_error_2_err_code(gpgme_error_t err, gpgme_error_t predict) { auto err_code = gpg_err_code(err); if (err_code != predict) { - LOG(ERROR) << "[Error " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " Description: " << gpgme_strerror(err); + LOG(ERROR) << "[" << _("Error") << " " << gpg_err_code(err) << "] " + << _("Source: ") << gpgme_strsource(err) << " " + << _("Description: ") << gpgme_strerror(err); } return err_code; } @@ -69,9 +69,9 @@ gpg_err_code_t GpgFrontend::check_gpg_error_2_err_code(gpgme_error_t err, gpgme_error_t GpgFrontend::check_gpg_error(gpgme_error_t err, const std::string& comment) { if (gpg_err_code(err) != GPG_ERR_NO_ERROR) { - LOG(ERROR) << "[Error " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " Description: " << gpgme_strerror(err) << " " << comment; + LOG(ERROR) << "[" << _("Error") << " " << gpg_err_code(err) << "] " + << _("Source: ") << gpgme_strsource(err) << " " + << _("Description: ") << gpgme_strerror(err); } return err; } @@ -216,6 +216,6 @@ GpgFrontend::GpgVerifyResult GpgFrontend::_new_result( } void GpgFrontend::_result_ref_deletor::operator()(void* _result) { - DLOG(INFO) << "Called" << _result; + DLOG(INFO) << _("Called") << _result; if (_result != nullptr) gpgme_result_unref(_result); } diff --git a/src/gpg/model/GpgKey.h b/src/gpg/model/GpgKey.h index 5ddfa94b..4acfa45f 100644 --- a/src/gpg/model/GpgKey.h +++ b/src/gpg/model/GpgKey.h @@ -153,7 +153,7 @@ class GpgKey { private: struct _key_ref_deletor { void operator()(gpgme_key_t _key) { - DLOG(INFO) << "Called" << _key; + DLOG(INFO) << _("Called") << _key; if (_key != nullptr) gpgme_key_unref(_key); } }; diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 7c6bf732..529921e0 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -9,7 +9,6 @@ aux_source_directory(./function UI_SOURCE) aux_source_directory(./details UI_SOURCE) if (SMTP_SUPPORT) - message(STATUS "Build SMTP Support") aux_source_directory(./smtp UI_SOURCE) endif () @@ -18,6 +17,6 @@ set(GPGFRONTEND_UI_LIB_NAME gpgfrontend-ui) target_link_libraries(${GPGFRONTEND_UI_LIB_NAME} Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core) target_include_directories(gpgfrontend-ui PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/${GPGFRONTEND_UI_LIB_NAME}_autogen/include) + ${CMAKE_CURRENT_BINARY_DIR}/${GPGFRONTEND_UI_LIB_NAME}_autogen/include) target_compile_features(gpgfrontend-ui PUBLIC cxx_std_17)
\ No newline at end of file diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp index 6f51bfcf..8ef66cfa 100644 --- a/src/ui/main_window/MainWindowSlotFunction.cpp +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -40,6 +40,7 @@ #include "gpg/function/GpgKeyImportExportor.h" #include "ui/UserInterfaceUtils.h" #include "ui/help/AboutDialog.h" +#include "ui/settings/GlobalSettingStation.h" #include "ui/widgets/SignersPicker.h" namespace GpgFrontend::UI { @@ -114,7 +115,16 @@ void MainWindow::slotEncrypt() { if (resultAnalyse.getStatus() >= 0) { infoBoard->resetOptionActionsMenu(); infoBoard->addOptionalAction("Send Mail", [this]() { - if (settings.value("sendMail/enable", false).toBool()) + bool smtp_enabled = false; + try { + smtp_enabled = + GlobalSettingStation::GetInstance().GetUISettings().lookup( + "smtp.enable"); + } catch (...) { + LOG(INFO) << "Reading smtp settings error"; + } + + if (smtp_enabled) new SendMailDialog(edit->curTextPage()->toPlainText(), this); else { QMessageBox::warning(nullptr, _("Function Disabled"), @@ -357,7 +367,15 @@ void MainWindow::slotEncryptSign() { #ifdef SMTP_SUPPORT infoBoard->resetOptionActionsMenu(); infoBoard->addOptionalAction("Send Mail", [this]() { - if (settings.value("sendMail/enable", false).toBool()) + bool smtp_enabled = false; + try { + smtp_enabled = + GlobalSettingStation::GetInstance().GetUISettings().lookup( + "smtp.enable"); + } catch (...) { + LOG(INFO) << "Reading smtp settings error"; + } + if (smtp_enabled) new SendMailDialog(edit->curTextPage()->toPlainText(), this); else { QMessageBox::warning(nullptr, _("Function Disabled"), diff --git a/src/ui/settings/SettingsSendMail.cpp b/src/ui/settings/SettingsSendMail.cpp index 2518991d..bbcf74bc 100644 --- a/src/ui/settings/SettingsSendMail.cpp +++ b/src/ui/settings/SettingsSendMail.cpp @@ -28,126 +28,174 @@ #include "smtp/SmtpMime" #endif +#include "ui/settings/GlobalSettingStation.h" +#include "ui_SendMailSettings.h" + namespace GpgFrontend::UI { SendMailTab::SendMailTab(QWidget* parent) - : QWidget(parent), - appPath(qApp->applicationDirPath()), - settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", - QSettings::IniFormat) { - enableCheckBox = new QCheckBox(_("Enable")); - enableCheckBox->setTristate(false); - - smtpAddress = new QLineEdit(); - username = new QLineEdit(); - password = new QLineEdit(); - password->setEchoMode(QLineEdit::Password); - - portSpin = new QSpinBox(); - portSpin->setMinimum(1); - portSpin->setMaximum(65535); - connectionTypeComboBox = new QComboBox(); - connectionTypeComboBox->addItem("None"); - connectionTypeComboBox->addItem("SSL"); - connectionTypeComboBox->addItem("TLS"); - connectionTypeComboBox->addItem("STARTTLS"); - - defaultSender = new QLineEdit(); - ; - checkConnectionButton = new QPushButton(_("Check Connection")); - - auto generalGroupBox = new QGroupBox(_("General")); - auto connectGroupBox = new QGroupBox(_("Connection")); - auto preferenceGroupBox = new QGroupBox(_("Preference")); - - auto generalLayout = new QGridLayout(); - generalLayout->addWidget(enableCheckBox); - - auto connectLayout = new QGridLayout(); - connectLayout->addWidget(new QLabel(_("SMTP Address")), 1, 0); - connectLayout->addWidget(smtpAddress, 1, 1, 1, 4); - connectLayout->addWidget(new QLabel(_("Username")), 2, 0); - connectLayout->addWidget(username, 2, 1, 1, 4); - connectLayout->addWidget(new QLabel(_("Password")), 3, 0); - connectLayout->addWidget(password, 3, 1, 1, 4); - connectLayout->addWidget(new QLabel(_("Port")), 4, 0); - connectLayout->addWidget(portSpin, 4, 1, 1, 1); - connectLayout->addWidget(new QLabel(_("Connection Security")), 5, 0); - connectLayout->addWidget(connectionTypeComboBox, 5, 1, 1, 1); - connectLayout->addWidget(checkConnectionButton, 6, 0); - - auto preferenceLayout = new QGridLayout(); - - preferenceLayout->addWidget(new QLabel(_("Default Sender")), 0, 0); - preferenceLayout->addWidget(defaultSender, 0, 1, 1, 4); - - generalGroupBox->setLayout(generalLayout); - connectGroupBox->setLayout(connectLayout); - preferenceGroupBox->setLayout(preferenceLayout); - - auto vBox = new QVBoxLayout(); - vBox->addWidget(generalGroupBox); - vBox->addWidget(connectGroupBox); - vBox->addWidget(preferenceGroupBox); - vBox->addStretch(0); - - connect(enableCheckBox, SIGNAL(stateChanged(int)), this, - SLOT(slotCheckBoxSetEnableDisable(int))); - - this->setLayout(vBox); + : QWidget(parent), ui(std::make_shared<Ui_SendMailSettings>()) { + ui->setupUi(this); + + connect(ui->enableCheckBox, &QCheckBox::stateChanged, this, [=](int state) { + ui->smtpServerAddressEdit->setDisabled(state != Qt::Checked); + ui->portSpin->setDisabled(state != Qt::Checked); + ui->connextionSecurityComboBox->setDisabled(state != Qt::Checked); + + ui->identityCheckBox->setDisabled(state != Qt::Checked); + ui->usernameEdit->setDisabled(state != Qt::Checked); + ui->passwordEdit->setDisabled(state != Qt::Checked); + + ui->defaultSenderEmailEdit->setDisabled(state != Qt::Checked); + ui->checkConnectionButton->setDisabled(state != Qt::Checked); + ui->senTestMailButton->setDisabled(state != Qt::Checked); + }); + + connect(ui->checkConnectionButton, &QPushButton::clicked, this, + &SendMailTab::slotCheckConnection); + + connect(ui->identityCheckBox, &QCheckBox::stateChanged, this, [=](int state) { + ui->usernameEdit->setDisabled(state != Qt::Checked); + ui->passwordEdit->setDisabled(state != Qt::Checked); + }); + setSettings(); } -/********************************** - * Read the settings from config - * and set the buttons and checkboxes - * appropriately - **********************************/ void SendMailTab::setSettings() { - if (settings.value("sendMail/enable", false).toBool()) - enableCheckBox->setCheckState(Qt::Checked); - else { - enableCheckBox->setCheckState(Qt::Unchecked); - smtpAddress->setDisabled(true); - username->setDisabled(true); - password->setDisabled(true); - portSpin->setDisabled(true); - connectionTypeComboBox->setDisabled(true); - defaultSender->setDisabled(true); - checkConnectionButton->setDisabled(true); - } - - smtpAddress->setText( - settings.value("sendMail/smtpAddress", QString()).toString()); - username->setText(settings.value("sendMail/username", QString()).toString()); - password->setText(settings.value("sendMail/password", QString()).toString()); - portSpin->setValue(settings.value("sendMail/port", 25).toInt()); - connectionTypeComboBox->setCurrentText( - settings.value("sendMail/connectionType", "None").toString()); - defaultSender->setText( - settings.value("sendMail/defaultSender", QString()).toString()); + auto& settings = GlobalSettingStation::GetInstance().GetUISettings(); + + ui->enableCheckBox->setCheckState(Qt::Unchecked); + try { + bool smtp_enable = settings.lookup("smtp.enable"); + if (smtp_enable) ui->enableCheckBox->setCheckState(Qt::Checked); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("save_key_checked"); + } + + ui->identityCheckBox->setCheckState(Qt::Unchecked); + try { + bool identity_enable = settings.lookup("smtp.identity_enable"); + if (identity_enable) ui->identityCheckBox->setCheckState(Qt::Checked); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("identity_enable"); + } + + try { + std::string mail_address = settings.lookup("smtp.mail_address"); + ui->smtpServerAddressEdit->setText(mail_address.c_str()); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("mail_address"); + } + + try { + std::string std_username = settings.lookup("smtp.username"); + ui->usernameEdit->setText(std_username.c_str()); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("username"); + } + + try { + std::string std_password = settings.lookup("smtp.password"); + ui->passwordEdit->setText(std_password.c_str()); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("password"); + } + + try { + int port = settings.lookup("smtp.port"); + ui->portSpin->setValue(port); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("port"); + } + + ui->connextionSecurityComboBox->setCurrentText("None"); + try { + std::string connection_type = settings.lookup("smtp.connection_type"); + ui->connextionSecurityComboBox->setCurrentText(connection_type.c_str()); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("connection_type"); + } + + try { + std::string default_sender = settings.lookup("smtp.default_sender"); + ui->defaultSenderEmailEdit->setText(default_sender.c_str()); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") << _("default_sender"); + } } -/*********************************** - * get the values of the buttons and - * write them to settings-file - *************************************/ void SendMailTab::applySettings() { - settings.setValue("sendMail/smtpAddress", smtpAddress->text()); - settings.setValue("sendMail/username", username->text()); - settings.setValue("sendMail/password", password->text()); - settings.setValue("sendMail/port", portSpin->value()); - settings.setValue("sendMail/connectionType", - connectionTypeComboBox->currentText()); - settings.setValue("sendMail/defaultSender", defaultSender->text()); - - settings.setValue("sendMail/enable", enableCheckBox->isChecked()); + auto& settings = + GpgFrontend::UI::GlobalSettingStation::GetInstance().GetUISettings(); + + if (!settings.exists("smtp") || + settings.lookup("smtp").getType() != libconfig::Setting::TypeGroup) + settings.add("smtp", libconfig::Setting::TypeGroup); + + auto& smtp = settings["smtp"]; + + if (!smtp.exists("mail_address")) + smtp.add("mail_address", libconfig::Setting::TypeString) = + ui->smtpServerAddressEdit->text().toStdString(); + else { + smtp["mail_address"] = ui->smtpServerAddressEdit->text().toStdString(); + } + + if (!smtp.exists("username")) + smtp.add("username", libconfig::Setting::TypeString) = + ui->usernameEdit->text().toStdString(); + else { + smtp["username"] = ui->usernameEdit->text().toStdString(); + } + + if (!smtp.exists("password")) + smtp.add("password", libconfig::Setting::TypeString) = + ui->passwordEdit->text().toStdString(); + else { + smtp["password"] = ui->passwordEdit->text().toStdString(); + } + + if (!smtp.exists("port")) + smtp.add("port", libconfig::Setting::TypeInt) = ui->portSpin->value(); + else { + smtp["port"] = ui->portSpin->value(); + } + + if (!smtp.exists("connection_type")) + smtp.add("connection_type", libconfig::Setting::TypeString) = + ui->connextionSecurityComboBox->currentText().toStdString(); + else { + smtp["connection_type"] = + ui->connextionSecurityComboBox->currentText().toStdString(); + } + + if (!smtp.exists("default_sender")) + smtp.add("default_sender", libconfig::Setting::TypeString) = + ui->defaultSenderEmailEdit->text().toStdString(); + else { + smtp["default_sender"] = ui->defaultSenderEmailEdit->text().toStdString(); + } + + if (!smtp.exists("identity_enable")) + smtp.add("identity_enable", libconfig::Setting::TypeBoolean) = + ui->identityCheckBox->isChecked(); + else { + smtp["identity_enable"] = ui->identityCheckBox->isChecked(); + } + + if (!smtp.exists("enable")) + smtp.add("enable", libconfig::Setting::TypeBoolean) = + ui->enableCheckBox->isChecked(); + else { + smtp["enable"] = ui->enableCheckBox->isChecked(); + } } #ifdef SMTP_SUPPORT void SendMailTab::slotCheckConnection() { SmtpClient::ConnectionType connectionType; - const auto selectedConnType = connectionTypeComboBox->currentText(); + const auto selectedConnType = ui->connextionSecurityComboBox->currentText(); if (selectedConnType == "SSL") { connectionType = SmtpClient::ConnectionType::SslConnection; } else if (selectedConnType == "TLS" || selectedConnType == "STARTTLS") { @@ -156,10 +204,13 @@ void SendMailTab::slotCheckConnection() { connectionType = SmtpClient::ConnectionType::TcpConnection; } - SmtpClient smtp(smtpAddress->text(), portSpin->value(), connectionType); + SmtpClient smtp(ui->smtpServerAddressEdit->text(), ui->portSpin->value(), + connectionType); - smtp.setUser(username->text()); - smtp.setPassword(password->text()); + if (ui->identityCheckBox->isChecked()) { + smtp.setUser(ui->usernameEdit->text()); + smtp.setPassword(ui->passwordEdit->text()); + } bool if_success = true; @@ -178,24 +229,6 @@ void SendMailTab::slotCheckConnection() { } #endif -void SendMailTab::slotCheckBoxSetEnableDisable(int state) { - if (state == Qt::Checked) { - smtpAddress->setEnabled(true); - username->setEnabled(true); - password->setEnabled(true); - portSpin->setEnabled(true); - connectionTypeComboBox->setEnabled(true); - defaultSender->setEnabled(true); - checkConnectionButton->setEnabled(true); - } else { - smtpAddress->setDisabled(true); - username->setDisabled(true); - password->setDisabled(true); - portSpin->setDisabled(true); - connectionTypeComboBox->setDisabled(true); - defaultSender->setDisabled(true); - checkConnectionButton->setDisabled(true); - } -} +void SendMailTab::slotCheckBoxSetEnableDisable(int state) {} } // namespace GpgFrontend::UI diff --git a/src/ui/settings/SettingsSendMail.h b/src/ui/settings/SettingsSendMail.h index ec8f83c9..be1a9b7c 100644 --- a/src/ui/settings/SettingsSendMail.h +++ b/src/ui/settings/SettingsSendMail.h @@ -7,6 +7,8 @@ #include "ui/GpgFrontendUI.h" +class Ui_SendMailSettings; + namespace GpgFrontend::UI { class SendMailTab : public QWidget { Q_OBJECT @@ -22,20 +24,10 @@ class SendMailTab : public QWidget { void slotCheckBoxSetEnableDisable(int state); - private: - QString appPath; - QSettings settings; - - QCheckBox* enableCheckBox; + void slotCheckConnection(); - QLineEdit* smtpAddress; - QLineEdit* username; - QLineEdit* password; - QSpinBox* portSpin; - QComboBox* connectionTypeComboBox; - QLineEdit* defaultSender; - - QPushButton* checkConnectionButton; + private: + std::shared_ptr<Ui_SendMailSettings> ui; signals: diff --git a/src/ui/smtp/SendMailDialog.cpp b/src/ui/smtp/SendMailDialog.cpp index 7c8933a0..40939242 100644 --- a/src/ui/smtp/SendMailDialog.cpp +++ b/src/ui/smtp/SendMailDialog.cpp @@ -26,7 +26,7 @@ #include <utility> -#ifdef STMP_ENABLED +#ifdef SMTP_SUPPORT #include "smtp/SmtpMime" #endif @@ -72,7 +72,7 @@ SendMailDialog::SendMailDialog(QString text, QWidget* parent) layout->addWidget(confirmButton, 3, 1); layout->addWidget(errorLabel, 4, 0, 1, 2); -#ifdef STMP_ENABLED +#ifdef SMTP_SUPPORT connect(confirmButton, SIGNAL(clicked(bool)), this, SLOT(slotConfirm())); #endif @@ -87,7 +87,7 @@ bool SendMailDialog::check_email_address(const QString& str) { return re_email.match(str).hasMatch(); } -#ifdef STMP_ENABLED +#ifdef SMTP_SUPPORT void SendMailDialog::slotConfirm() { QString errString; diff --git a/ui/SendMailSettings.ui b/ui/SendMailSettings.ui new file mode 100644 index 00000000..693b12bc --- /dev/null +++ b/ui/SendMailSettings.ui @@ -0,0 +1,374 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SendMailSettings</class> + <widget class="QWidget" name="SendMailSettings"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>553</width> + <height>708</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QGroupBox" name="generalGroupBox"> + <property name="title"> + <string>General</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QCheckBox" name="enableCheckBox"> + <property name="text"> + <string>Enable Send Mail Ability</string> + </property> + <property name="tristate"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="horizontalWidget" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>SMTP Server Address</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="smtpServerAddressEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="horizontalWidget_2" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>SMTP Server Port</string> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="portSpin"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>65535</number> + </property> + <property name="value"> + <number>25</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="horizontalWidget" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="connectionSecurityLabel"> + <property name="text"> + <string>SMTP Connection Security</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="connextionSecurityComboBox"> + <property name="currentText"> + <string>None</string> + </property> + <item> + <property name="text"> + <string>None</string> + </property> + </item> + <item> + <property name="text"> + <string>SSL</string> + </property> + </item> + <item> + <property name="text"> + <string>TLS</string> + </property> + </item> + <item> + <property name="text"> + <string>STARTTLS</string> + </property> + </item> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="identityGroupBox"> + <property name="title"> + <string>Identity</string> + </property> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="2" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QCheckBox" name="identityCheckBox"> + <property name="text"> + <string>Need Auth</string> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="horizontalWidget_3" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="usernameLabel"> + <property name="text"> + <string>Username</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="usernameEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="horizontalWidget_4" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="passwordLabel"> + <property name="text"> + <string>Password</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="passwordEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="echoMode"> + <enum>QLineEdit::Password</enum> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="perferenceGroupBox"> + <property name="title"> + <string>Preference</string> + </property> + <layout class="QGridLayout" name="gridLayout_4"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QWidget" name="horizontalWidget_5" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="passwordLabel_3"> + <property name="text"> + <string>Deafult Sender Email Address</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="defaultSenderEmailEdit"/> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QGroupBox" name="operationsGroupBox"> + <property name="title"> + <string>Operations</string> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QPushButton" name="checkConnectionButton"> + <property name="text"> + <string>Check Connection</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="senTestMailButton"> + <property name="text"> + <string>Send Test Email</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> |