File indexing completed on 2024-12-22 05:01:03
0001 /* 0002 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only 0005 */ 0006 0007 #pragma once 0008 0009 #include "configuredialog_p.h" 0010 #include "kmail_export.h" 0011 #include "ui_securitypageencryptiontab.h" 0012 #include "ui_securitypagegeneraltab.h" 0013 #include "ui_securitypagemdntab.h" 0014 #include "ui_smimeconfiguration.h" 0015 0016 #include <KCMultiDialog> 0017 0018 namespace QGpgME 0019 { 0020 class CryptoConfig; 0021 } 0022 0023 class SecurityPageGeneralTab : public ConfigModuleTab 0024 { 0025 Q_OBJECT 0026 public: 0027 explicit SecurityPageGeneralTab(QWidget *parent = nullptr); 0028 [[nodiscard]] QString helpAnchor() const; 0029 0030 void save() override; 0031 0032 private: 0033 void doLoadOther() override; 0034 0035 private: 0036 void slotOpenExternalReferenceExceptions(); 0037 void slotLinkClicked(const QString &link); 0038 Ui_SecurityPageGeneralTab mSGTab; 0039 }; 0040 0041 class SecurityPageMDNTab : public ConfigModuleTab 0042 { 0043 Q_OBJECT 0044 public: 0045 explicit SecurityPageMDNTab(QWidget *parent = nullptr); 0046 [[nodiscard]] QString helpAnchor() const; 0047 0048 void save() override; 0049 0050 private: 0051 void doLoadOther() override; 0052 0053 private: 0054 void slotLinkClicked(const QString &link); 0055 QButtonGroup *mMDNGroup = nullptr; 0056 QButtonGroup *mOrigQuoteGroup = nullptr; 0057 Ui_SecurityPageMDNTab mUi; 0058 }; 0059 0060 class SecurityPageEncryptionTab : public ConfigModuleTab 0061 { 0062 Q_OBJECT 0063 public: 0064 explicit SecurityPageEncryptionTab(QWidget *parent = nullptr); 0065 ~SecurityPageEncryptionTab() override; 0066 0067 [[nodiscard]] QString helpAnchor() const; 0068 0069 void save() override; 0070 0071 private: 0072 void slotReenableAllWarningsClicked(); 0073 void slotConfigureGnupg(); 0074 void doLoadFromGlobalSettings() override; 0075 void doLoadOther() override; 0076 0077 private: 0078 Ui::SecurityPageEncryptionTab *const mWidget; 0079 }; 0080 0081 class SecurityPageSMimeTab : public ConfigModuleTab 0082 { 0083 Q_OBJECT 0084 public: 0085 explicit SecurityPageSMimeTab(QWidget *parent = nullptr); 0086 ~SecurityPageSMimeTab() override; 0087 0088 [[nodiscard]] QString helpAnchor() const; 0089 0090 void save() override; 0091 0092 private: 0093 void slotUpdateHTTPActions(); 0094 void doLoadOther() override; 0095 0096 private: 0097 Ui::SMimeConfiguration *const mWidget; 0098 QGpgME::CryptoConfig *mConfig = nullptr; 0099 }; 0100 0101 class GpgSettingsDialog : public KCMultiDialog 0102 { 0103 Q_OBJECT 0104 public: 0105 explicit GpgSettingsDialog(QWidget *parent = nullptr); 0106 ~GpgSettingsDialog() override; 0107 0108 private: 0109 void readConfig(); 0110 void saveConfig(); 0111 }; 0112 0113 class KMAIL_EXPORT SecurityPage : public ConfigModuleWithTabs 0114 { 0115 Q_OBJECT 0116 public: 0117 explicit SecurityPage(QObject *parent, const KPluginMetaData &data); 0118 [[nodiscard]] QString helpAnchor() const override; 0119 };