diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/ui/QuitDialog.h | 33 | ||||
-rw-r--r-- | include/ui/SendMailDialog.h | 58 | ||||
-rwxr-xr-x | include/ui/SettingsDialog.h | 25 |
3 files changed, 95 insertions, 21 deletions
diff --git a/include/ui/QuitDialog.h b/include/ui/QuitDialog.h index 8d69cfd2..19af7534 100755 --- a/include/ui/QuitDialog.h +++ b/include/ui/QuitDialog.h @@ -1,22 +1,25 @@ -/* - * keymgmt.h +/** + * This file is part of GPGFrontend. * - * Copyright 2008 gpg4usb-team <[email protected]> + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * This file is part of gpg4usb. + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Gpg4usb is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. * - * Gpg4usb is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. * - * You should have received a copy of the GNU General Public License - * along with gpg4usb. If not, see <http://www.gnu.org/licenses/> */ #ifndef __QUITDIALOG_H__ @@ -30,7 +33,7 @@ Q_OBJECT public: QuitDialog(QWidget *parent, const QHash<int, QString>& unsavedDocs); - bool isDiscarded() const; + [[nodiscard]] bool isDiscarded() const; QList<int> getTabIdsToSave(); diff --git a/include/ui/SendMailDialog.h b/include/ui/SendMailDialog.h new file mode 100644 index 00000000..bf388b33 --- /dev/null +++ b/include/ui/SendMailDialog.h @@ -0,0 +1,58 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#ifndef GPGFRONTEND_SENDMAILDIALOG_H +#define GPGFRONTEND_SENDMAILDIALOG_H + +#include "GpgFrontend.h" + +class SendMailDialog : public QDialog { +Q_OBJECT +public: + explicit SendMailDialog(QWidget *parent = nullptr); + +private slots: + + void slotConfirm(); + +private: + + QString appPath; + QSettings settings; + + QLineEdit *senderEdit; + QLineEdit *recipientEdit; + QLineEdit *subjectEdit; + QPushButton *confirmButton; + + QString smtpAddress = settings.value("sendMail/smtpAddress", QString()).toString(); + QString username = settings.value("sendMail/username", QString()).toString(); + QString password = settings.value("sendMail/password", QString()).toString(); + QString defaultSender = settings.value("sendMail/defaultSender", QString()).toString(); + QString connectionTypeSettings = settings.value("sendMail/connectionType", QString()).toString(); + int port = settings.value("sendMail/port", QString()).toInt(); +}; + + +#endif //GPGFRONTEND_SENDMAILDIALOG_H diff --git a/include/ui/SettingsDialog.h b/include/ui/SettingsDialog.h index 39bd917f..133a8ec7 100755 --- a/include/ui/SettingsDialog.h +++ b/include/ui/SettingsDialog.h @@ -66,24 +66,37 @@ signals: }; -class MimeTab : public QWidget { +class SendMailTab : public QWidget { Q_OBJECT public: - explicit MimeTab(QWidget *parent = nullptr); + explicit SendMailTab(QWidget *parent = nullptr); void setSettings(); void applySettings(); +private slots: + + void slotCheckConnection(); + + void slotCheckBoxSetEnableDisable(int state); + private: QString appPath; QSettings settings; - QCheckBox *mimeParseCheckBox; - QCheckBox *mimeQPCheckBox; - QCheckBox *mimeOpenAttachmentCheckBox; + QCheckBox *enableCheckBox; + + QLineEdit *smtpAddress; + QLineEdit *username; + QLineEdit *password; + QSpinBox *portSpin; + QComboBox *connectionTypeComboBox; + QLineEdit *defaultSender; + + QPushButton *checkConnectionButton; signals: @@ -209,7 +222,7 @@ public: explicit SettingsDialog(GpgME::GpgContext *ctx, QWidget *parent = nullptr); GeneralTab *generalTab; - MimeTab *mimeTab; + SendMailTab *sendMailTab; AppearanceTab *appearanceTab; KeyserverTab *keyserverTab; AdvancedTab *advancedTab; |