File indexing completed on 2024-12-22 05:01:02

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_miscpagemaintab.h"
0012 
0013 namespace MailCommon
0014 {
0015 class FolderRequester;
0016 }
0017 namespace MessageViewer
0018 {
0019 class InvitationSettings;
0020 class PrintingSettings;
0021 }
0022 
0023 class MiscPageFolderTab : public ConfigModuleTab
0024 {
0025     Q_OBJECT
0026 public:
0027     explicit MiscPageFolderTab(QWidget *parent = nullptr);
0028 
0029     void save() override;
0030     [[nodiscard]] QString helpAnchor() const;
0031 
0032 private:
0033     void doLoadFromGlobalSettings() override;
0034     void doLoadOther() override;
0035 
0036 private:
0037     Ui_MiscMainTab mMMTab;
0038     MailCommon::FolderRequester *mOnStartupOpenFolder = nullptr;
0039 };
0040 
0041 class MiscPageInviteTab : public ConfigModuleTab
0042 {
0043     Q_OBJECT
0044 public:
0045     explicit MiscPageInviteTab(QWidget *parent = nullptr);
0046     void save() override;
0047     void doResetToDefaultsOther() override;
0048 
0049 private:
0050     void doLoadFromGlobalSettings() override;
0051 
0052 private:
0053     MessageViewer::InvitationSettings *const mInvitationUi;
0054 };
0055 
0056 class KMAIL_EXPORT MiscPage : public ConfigModuleWithTabs
0057 {
0058     Q_OBJECT
0059 public:
0060     explicit MiscPage(QObject *parent, const KPluginMetaData &data);
0061     [[nodiscard]] QString helpAnchor() const override;
0062 };
0063 
0064 class MiscPagePrintingTab : public ConfigModuleTab
0065 {
0066     Q_OBJECT
0067 public:
0068     explicit MiscPagePrintingTab(QWidget *parent = nullptr);
0069     void save() override;
0070     void doResetToDefaultsOther() override;
0071 
0072 private:
0073     void doLoadFromGlobalSettings() override;
0074 
0075 private:
0076     MessageViewer::PrintingSettings *const mPrintingUi;
0077 };
0078 
0079 #ifdef WITH_KUSERFEEDBACK
0080 namespace KUserFeedback
0081 {
0082 class FeedbackConfigWidget;
0083 }
0084 class KuserFeedBackPageTab : public ConfigModuleTab
0085 {
0086     Q_OBJECT
0087 public:
0088     explicit KuserFeedBackPageTab(QWidget *parent = nullptr);
0089     void save() override;
0090     void doResetToDefaultsOther() override;
0091 
0092 private:
0093     void doLoadFromGlobalSettings() override;
0094     KUserFeedback::FeedbackConfigWidget *const mUserFeedbackWidget;
0095 };
0096 #endif