File indexing completed on 2025-03-09 04:54:38

0001 /*
0002   SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #pragma once
0009 
0010 #include "messageviewer_private_export.h"
0011 
0012 #include <KMessageWidget>
0013 
0014 namespace MessageViewer
0015 {
0016 class ScamDetectionWarningWidgetPrivate;
0017 class MESSAGEVIEWER_TESTS_EXPORT ScamDetectionWarningWidget : public KMessageWidget
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit ScamDetectionWarningWidget(QWidget *parent = nullptr);
0022     ~ScamDetectionWarningWidget() override;
0023 
0024     void setUseInTestApps(bool b);
0025 
0026 public Q_SLOTS:
0027     void slotShowWarning();
0028 
0029 Q_SIGNALS:
0030     void showDetails();
0031     void moveMessageToTrash();
0032     void messageIsNotAScam();
0033     void addToWhiteList();
0034 
0035 private:
0036     void slotShowDetails(const QString &content);
0037     void slotAddToWhiteList();
0038     void slotDisableScamDetection();
0039     void slotMessageIsNotAScam();
0040     std::unique_ptr<ScamDetectionWarningWidgetPrivate> const d;
0041 };
0042 }