7#include "mdnwarningwidget.h"
8#include <KLocalizedString>
11using namespace MessageViewer;
12MDNWarningWidget::MDNWarningWidget(
QWidget *parent)
14 , mIgnoreAction(new
QAction(
i18nc(
"@action",
"Ignore"), this))
15 , mSendAction(new
QAction(
i18nc(
"@action",
"Send"), this))
16 , mSendDenyAction(new
QAction(
i18nc(
"@action",
"Send Deny"), this))
19 setMessageType(Information);
21 setCloseButtonVisible(
false);
24 addAction(mIgnoreAction);
26 addAction(mSendAction);
28 addAction(mSendDenyAction);
29 mSendDenyAction->setVisible(
false);
35MDNWarningWidget::~MDNWarningWidget() =
default;
37void MDNWarningWidget::setCanDeny(
bool deny)
42void MDNWarningWidget::setInformation(
const QString &str)
48void MDNWarningWidget::slotSend()
51 Q_EMIT sendResponse(MessageViewer::MDNWarningWidget::ResponseType::Send, mSendingMode);
54void MDNWarningWidget::slotIgnore()
57 Q_EMIT sendResponse(MessageViewer::MDNWarningWidget::ResponseType::Ignore, mSendingMode);
60void MDNWarningWidget::slotSendDeny()
63 Q_EMIT sendResponse(MessageViewer::MDNWarningWidget::ResponseType::SendDeny, mSendingMode);
66KMime::MDN::SendingMode MDNWarningWidget::sendingMode()
const
71void MDNWarningWidget::setSendingMode(KMime::MDN::SendingMode newSendingMode)
73 mSendingMode = newSendingMode;
76#include "moc_mdnwarningwidget.cpp"
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void triggered(bool checked)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)