File indexing completed on 2024-12-22 05:01:03
0001 /* 0002 SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include <QDialog> 0010 0011 class QCheckBox; 0012 class KUrlRequester; 0013 class QComboBox; 0014 class QPushButton; 0015 namespace Akonadi 0016 { 0017 class Collection; 0018 } 0019 0020 namespace MailCommon 0021 { 0022 class FolderRequester; 0023 } 0024 0025 namespace KMail 0026 { 0027 class ArchiveFolderDialog : public QDialog 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 explicit ArchiveFolderDialog(QWidget *parent = nullptr); 0033 void setFolder(const Akonadi::Collection &defaultCollection); 0034 0035 private: 0036 void slotFixFileExtension(); 0037 void slotFolderChanged(const Akonadi::Collection &); 0038 void slotRecursiveCheckboxClicked(); 0039 void slotAccepted(); 0040 void slotUrlChanged(const QString &); 0041 0042 [[nodiscard]] bool allowToDeleteFolders(const Akonadi::Collection &folder) const; 0043 [[nodiscard]] QString standardArchivePath(const QString &folderName); 0044 0045 QWidget *const mParentWidget; 0046 QCheckBox *mDeleteCheckBox = nullptr; 0047 QCheckBox *mRecursiveCheckBox = nullptr; 0048 MailCommon::FolderRequester *mFolderRequester = nullptr; 0049 QComboBox *mFormatComboBox = nullptr; 0050 KUrlRequester *mUrlRequester = nullptr; 0051 QPushButton *mOkButton = nullptr; 0052 }; 0053 }