filterinfo.h 1.2 KB
Newer Older
1
2
/*
  SPDX-FileCopyrightText: 2000 Hans Dijkema <kmailcvt@hum.org>
Laurent Montel's avatar
Laurent Montel committed
3
  SPDX-FileCopyrightText: 2012-2021 Laurent Montel <montel@kde.org>
4

5
6
  SPDX-License-Identifier: GPL-2.0-or-later
*/
7

8
9
#ifndef FILTERINFO_H
#define FILTERINFO_H
10
11

#include "mailimporter_export.h"
Laurent Montel's avatar
Laurent Montel committed
12
#include <QString>
Laurent Montel's avatar
Laurent Montel committed
13
class QWidget;
Laurent Montel's avatar
Laurent Montel committed
14
15
namespace MailImporter
{
16
class FilterInfoGui;
17
18
19
/**
 * @brief The FilterInfo class
 */
20
21
22
class MAILIMPORTER_EXPORT FilterInfo
{
public:
Laurent Montel's avatar
Laurent Montel committed
23
    FilterInfo();
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    ~FilterInfo();

    void setFilterInfoGui(FilterInfoGui *filterinfogui);

    void setStatusMessage(const QString &status);
    void setFrom(const QString &from);
    void setTo(const QString &to);
    void setCurrent(const QString &current);
    void setCurrent(int percent = 0);
    void setOverall(int percent = 0);
    void addInfoLogEntry(const QString &log);
    void addErrorLogEntry(const QString &log);
    void clear();
    void alert(const QString &message);

    static void terminateASAP();
Laurent Montel's avatar
Laurent Montel committed
40
    Q_REQUIRED_RESULT bool shouldTerminate() const;
Laurent Montel's avatar
Laurent Montel committed
41

Laurent Montel's avatar
Laurent Montel committed
42
    QWidget *parentWidget() const;
43
    void setRemoveDupMessage(bool removeDupMessage);
Laurent Montel's avatar
Laurent Montel committed
44
    Q_REQUIRED_RESULT bool removeDupMessage() const;
45
46
47
48
49
50
51
52

private:
    class Private;
    Private *const d;
};
}

#endif /* FILTERINFO_H */