File indexing completed on 2024-12-22 05:00:50
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "archivemailinfo.h" 0010 #include <QWidget> 0011 class QUrl; 0012 class QCheckBox; 0013 class KUrlRequester; 0014 class QSpinBox; 0015 class QPushButton; 0016 0017 class FormatComboBox; 0018 class UnitComboBox; 0019 class ArchiveMailRangeWidget; 0020 namespace MailCommon 0021 { 0022 class FolderRequester; 0023 } 0024 class AddArchiveMailWidget : public QWidget 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit AddArchiveMailWidget(ArchiveMailInfo *info, QWidget *parent = nullptr); 0029 ~AddArchiveMailWidget() override; 0030 0031 void load(ArchiveMailInfo *info); 0032 [[nodiscard]] ArchiveMailInfo *info(); 0033 Q_SIGNALS: 0034 void enableOkButton(bool state); 0035 0036 private: 0037 void slotUpdateOkButton(); 0038 void slotFolderChanged(const Akonadi::Collection &collection); 0039 0040 MailCommon::FolderRequester *const mFolderRequester; 0041 FormatComboBox *const mFormatComboBox; 0042 UnitComboBox *const mUnits; 0043 QCheckBox *const mRecursiveCheckBox; 0044 KUrlRequester *const mPath; 0045 QSpinBox *const mDays; 0046 QSpinBox *const mMaximumArchive; 0047 ArchiveMailRangeWidget *const mArchiveMailRangeWidget; 0048 0049 ArchiveMailInfo *mInfo = nullptr; 0050 };