Messagelib

mdnwarningwidget.h
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8#include "messageviewer_export.h"
9#include <KMessageWidget>
10#include <KMime/MDN>
11
12namespace MessageViewer
13{
14/**
15 * @brief The MDNWarningWidget class
16 * @author Laurent Montel <montel@kde.org>
17 */
18class MESSAGEVIEWER_EXPORT MDNWarningWidget : public KMessageWidget
19{
20 Q_OBJECT
21public:
22 enum ResponseType {
23 Ignore = 0,
24 Send = 1,
25 SendDeny = 2,
26 };
27 explicit MDNWarningWidget(QWidget *parent = nullptr);
28 ~MDNWarningWidget() override;
29
30 void setCanDeny(bool deny);
31
32 void setInformation(const QString &str);
33
34 [[nodiscard]] KMime::MDN::SendingMode sendingMode() const;
35 void setSendingMode(KMime::MDN::SendingMode newSendingMode);
36
37Q_SIGNALS:
38 void sendResponse(MessageViewer::MDNWarningWidget::ResponseType type, KMime::MDN::SendingMode sendingMode);
39
40private:
41 MESSAGEVIEWER_NO_EXPORT void slotSend();
42 MESSAGEVIEWER_NO_EXPORT void slotIgnore();
43 MESSAGEVIEWER_NO_EXPORT void slotSendDeny();
44 QAction *const mIgnoreAction;
45 QAction *const mSendAction;
46 QAction *const mSendDenyAction;
47 KMime::MDN::SendingMode mSendingMode = KMime::MDN::SentAutomatically;
48};
49}
The MDNWarningWidget class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.