9#include "filterinfogui.h"
11using namespace MailImporter;
13class Q_DECL_HIDDEN
FilterInfo::FilterInfoPrivate
22 delete m_filterInfoGui;
23 m_filterInfoGui =
nullptr;
26 bool m_removeDupMsg =
false;
28 static bool s_terminateASAP;
31bool FilterInfo::FilterInfoPrivate::s_terminateASAP =
false;
33FilterInfo::FilterInfo()
34 : d(new FilterInfoPrivate)
36 FilterInfoPrivate::s_terminateASAP =
false;
39FilterInfo::~FilterInfo() =
default;
41void FilterInfo::setFilterInfoGui(
FilterInfoGui *filterinfogui)
43 delete d->m_filterInfoGui;
44 d->m_filterInfoGui = filterinfogui;
49 if (d->m_filterInfoGui) {
50 d->m_filterInfoGui->setStatusMessage(
status);
54void FilterInfo::setFrom(
const QString &from)
56 if (d->m_filterInfoGui) {
57 d->m_filterInfoGui->setFrom(from);
61void FilterInfo::setTo(
const QString &to)
63 if (d->m_filterInfoGui) {
64 d->m_filterInfoGui->setTo(to);
68void FilterInfo::setCurrent(
const QString ¤t)
70 if (d->m_filterInfoGui) {
71 d->m_filterInfoGui->setCurrent(current);
75void FilterInfo::setCurrent(
int percent)
77 if (d->m_filterInfoGui) {
78 d->m_filterInfoGui->setCurrent(percent);
82void FilterInfo::setOverall(
int percent)
84 if (d->m_filterInfoGui) {
85 d->m_filterInfoGui->setOverall(percent);
89void FilterInfo::addInfoLogEntry(
const QString &log)
91 if (d->m_filterInfoGui) {
92 d->m_filterInfoGui->addInfoLogEntry(log);
96void FilterInfo::addErrorLogEntry(
const QString &log)
98 if (d->m_filterInfoGui) {
99 d->m_filterInfoGui->addErrorLogEntry(log);
103void FilterInfo::clear()
105 if (d->m_filterInfoGui) {
106 d->m_filterInfoGui->clear();
110void FilterInfo::alert(
const QString &message)
112 if (d->m_filterInfoGui) {
113 d->m_filterInfoGui->alert(message);
117void FilterInfo::terminateASAP()
119 FilterInfoPrivate::s_terminateASAP =
true;
122bool FilterInfo::shouldTerminate()
const
124 return FilterInfoPrivate::s_terminateASAP;
127void FilterInfo::setRemoveDupMessage(
bool removeDupMessage)
129 d->m_removeDupMsg = removeDupMessage;
132bool FilterInfo::removeDupMessage()
const
134 return d->m_removeDupMsg;
137QWidget *FilterInfo::parentWidget()
const
139 if (d->m_filterInfoGui) {
140 return d->m_filterInfoGui->parent();
Q_SCRIPTABLE CaptureState status()