importimapsettingprogresspage.h 1.91 KB
Newer Older
1
/*
Laurent Montel's avatar
Laurent Montel committed
2
   Copyright (C) 2016-2020 Laurent Montel <montel@kde.org>
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; see the file COPYING.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef IMPORTIMAPSETTINGPROGRESSPAGE_H
#define IMPORTIMAPSETTINGPROGRESSPAGE_H

#include <QWidget>
24
25
#include <QMap>
#include "sieveeditorutil.h"
26
#include "libsieveeditor_private_export.h"
27

28
class QTextEdit;
29
class AbstractImapSettingsCheckJob;
30
class LIBSIEVEEDITOR_TESTS_EXPORT ImportImapSettingProgressPage : public QWidget
31
32
33
{
    Q_OBJECT
public:
Laurent Montel's avatar
Laurent Montel committed
34
    explicit ImportImapSettingProgressPage(QWidget *parent = nullptr);
Laurent Montel's avatar
Laurent Montel committed
35
    ~ImportImapSettingProgressPage() override;
36
    void addProgressInfo(const QString &str);
Laurent Montel's avatar
Laurent Montel committed
37
    void setSelectedPrograms(const QStringList &programs);
38
39
40
41
42
    void setListCheckJob(const QMap<QString, AbstractImapSettingsCheckJob *> &listCheckJob);

    void start();

Q_SIGNALS:
Laurent Montel's avatar
Laurent Montel committed
43
    void addSummaryInfo(const QString &info);
44
    void finished();
45
    void noSettingsImported(const QString &name);
46

47
private:
48
    void slotImportSettingsDone(const QString &name, const SieveEditorUtil::SieveServerConfig &settings);
Laurent Montel's avatar
Laurent Montel committed
49
    QStringList mSelectedPrograms;
Laurent Montel's avatar
Laurent Montel committed
50
    QTextEdit *mProgressTextEdit = nullptr;
51
    QMap<QString, AbstractImapSettingsCheckJob *> mListCheckJob;
Laurent Montel's avatar
Laurent Montel committed
52
    bool mSettingsFound = false;
53
54
55
};

#endif // IMPORTIMAPSETTINGPROGRESSPAGE_H