summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-12-14 13:42:35 +0100
committerMontel Laurent <[email protected]>2017-12-14 13:42:35 +0100
commit22d28ad89152029db52832f1f379746b8f7f2dbc (patch)
tree35c60059e97972af50b3b8af2b3e2f48af5825b7
parent2840f885a216f561de13c5ececb5e600fe74ed31 (diff)
Add widget in viewer
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp8
-rw-r--r--messageviewer/src/viewer/viewer_p.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index 078f256..bd0ad65 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -145,6 +145,7 @@
#include <viewerplugins/viewerplugininterface.h>
#include <WebEngineViewer/ZoomActionMenu>
#include <kpimtextedit/texttospeechwidget.h>
+#include <widgets/mailtrackingwarningwidget.h>
#include <grantleetheme/grantleethememanager.h>
#include <grantleetheme/grantleetheme.h>
@@ -1264,6 +1265,7 @@ void ViewerPrivate::resetStateForNewMessage()
mScamDetectionWarning->setVisible(false);
mOpenAttachmentFolderWidget->setVisible(false);
mSubmittedFormWarning->setVisible(false);
+ mMailTrackingWarning->setVisible(false);
if (mPrinting) {
if (MessageViewer::MessageViewerSettings::self()->respectExpandCollapseSettings()) {
@@ -1474,6 +1476,10 @@ void ViewerPrivate::createWidgets()
mSubmittedFormWarning->setObjectName(QStringLiteral("submittedformwarning"));
readerBoxVBoxLayout->addWidget(mSubmittedFormWarning);
+ mMailTrackingWarning = new MailTrackingWarningWidget(readerBox);
+ mMailTrackingWarning->setObjectName(QStringLiteral("mailtrackingwarning"));
+ readerBoxVBoxLayout->addWidget(mMailTrackingWarning);
+
mScamDetectionWarning = new ScamDetectionWarningWidget(readerBox);
mScamDetectionWarning->setObjectName(QStringLiteral("scandetectionwarning"));
readerBoxVBoxLayout->addWidget(mScamDetectionWarning);
@@ -3193,7 +3199,7 @@ void ViewerPrivate::slotAddToWhiteList()
void ViewerPrivate::slotMailTrackingFound()
{
- //TODO
+ mMailTrackingWarning->animatedShow();
}
void ViewerPrivate::slotFormSubmittedForbidden()
diff --git a/messageviewer/src/viewer/viewer_p.h b/messageviewer/src/viewer/viewer_p.h
index 6467f16..dc7e9f3 100644
--- a/messageviewer/src/viewer/viewer_p.h
+++ b/messageviewer/src/viewer/viewer_p.h
@@ -93,6 +93,7 @@ class ViewerPluginToolManager;
class ViewerPluginInterface;
class SubmittedFormWarningWidget;
class MailSourceWebEngineViewer;
+class MailTrackingWarningWidget;
/**
\brief Private class for the Viewer, the main widget in the messageviewer library.
@@ -679,6 +680,7 @@ public:
MessageViewer::ScamDetectionWarningWidget *mScamDetectionWarning = nullptr;
MessageViewer::OpenAttachmentFolderWidget *mOpenAttachmentFolderWidget = nullptr;
MessageViewer::SubmittedFormWarningWidget *mSubmittedFormWarning = nullptr;
+ MessageViewer::MailTrackingWarningWidget *mMailTrackingWarning = nullptr;
KPIMTextEdit::TextToSpeechWidget *mTextToSpeechWidget = nullptr;
Viewer::DisplayFormatMessage mDisplayFormatMessageOverwrite;
KPIMTextEdit::SlideContainer *mSliderContainer = nullptr;
@@ -691,6 +693,7 @@ public:
QPrinter *mCurrentPrinter = nullptr;
QList<QPointer<MessageViewer::MailSourceWebEngineViewer> > mListMailSourceViewer;
WebEngineViewer::LocalDataBaseManager *mPhishingDatabase = nullptr;
+
};
}