File indexing completed on 2024-05-19 05:24:00

0001 /*
0002    SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QWidget>
0010 
0011 namespace Ui
0012 {
0013 class MBoxImportWidget;
0014 }
0015 
0016 namespace Akonadi
0017 {
0018 class Collection;
0019 }
0020 
0021 namespace MailImporter
0022 {
0023 class ImportMailsWidget;
0024 }
0025 
0026 class MBoxImportWidget : public QWidget
0027 {
0028     Q_OBJECT
0029 public:
0030     explicit MBoxImportWidget(QWidget *parent = nullptr);
0031     ~MBoxImportWidget() override;
0032     MailImporter::ImportMailsWidget *mailWidget();
0033     [[nodiscard]] Akonadi::Collection selectedCollection() const;
0034     void setImportButtonEnabled(bool enabled);
0035 
0036 private Q_SLOTS:
0037     void collectionChanged(const Akonadi::Collection &collection);
0038 
0039 Q_SIGNALS:
0040     void importMailsClicked();
0041 
0042 private:
0043     Ui::MBoxImportWidget *const ui;
0044 };