File indexing completed on 2024-12-15 04:55:36

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libsieveeditor_private_export.h"
0010 #include "sieveeditorutil.h"
0011 #include <QMap>
0012 #include <QWidget>
0013 
0014 class QTextEdit;
0015 class AbstractImapSettingsCheckJob;
0016 class LIBSIEVEEDITOR_TESTS_EXPORT ImportImapSettingProgressPage : public QWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit ImportImapSettingProgressPage(QWidget *parent = nullptr);
0021     ~ImportImapSettingProgressPage() override;
0022     void addProgressInfo(const QString &str);
0023     void setSelectedPrograms(const QStringList &programs);
0024     void setListCheckJob(const QMap<QString, AbstractImapSettingsCheckJob *> &listCheckJob);
0025 
0026     void start();
0027 
0028 Q_SIGNALS:
0029     void addSummaryInfo(const QString &info);
0030     void finished();
0031     void noSettingsImported(const QString &name);
0032 
0033 private:
0034     void slotImportSettingsDone(const QString &name, const SieveEditorUtil::SieveServerConfig &settings);
0035     QStringList mSelectedPrograms;
0036     QTextEdit *mProgressTextEdit = nullptr;
0037     QMap<QString, AbstractImapSettingsCheckJob *> mListCheckJob;
0038     bool mSettingsFound = false;
0039 };