summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-10-19 20:59:43 +0200
committerMontel Laurent <[email protected]>2017-10-19 20:59:43 +0200
commit13365a78ac3bfe5cdf05793c45b18854804ddddf (patch)
tree72b53ce3fc7ecb91d3f22d99a445d67d5f181dfc
parenta4c39c65ff9602c131136fbf38e0fcc704e740ea (diff)
Start to create warning widget when we don't apply existing identity
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/editor/warningwidgets/incorrectidentityfolderwarning.cpp42
-rw-r--r--src/editor/warningwidgets/incorrectidentityfolderwarning.h35
3 files changed, 81 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 27d0fae..f3912ef 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -101,9 +101,11 @@ set(kmailprivate_editor_LIB_SRCS
)
set(kmailprivate_warningwidgets_LIB_SRCS
- warningwidgets/externaleditorwarning.cpp
- warningwidgets/attachmentmissingwarning.cpp
+ editor/warningwidgets/externaleditorwarning.cpp
+ editor/warningwidgets/attachmentmissingwarning.cpp
+ editor/warningwidgets/incorrectidentityfolderwarning.cpp
)
+
set(kmailprivate_editor_potentialphishingemail_SRCS
editor/potentialphishingemail/potentialphishingemailwarning.cpp
editor/potentialphishingemail/potentialphishingemailjob.cpp
diff --git a/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp b/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp
new file mode 100644
index 0000000..123cfe6
--- /dev/null
+++ b/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2017 Montel Laurent <[email protected]>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "incorrectidentityfolderwarning.h"
+#include <KLocalizedString>
+
+IncorrectIdentityFolderWarning::IncorrectIdentityFolderWarning(QWidget *parent)
+ : KMessageWidget(parent)
+{
+ setVisible(false);
+ setCloseButtonVisible(false);
+ setMessageType(Information);
+ setText(i18n("Incorrect Identity."));
+ setWordWrap(true);
+ connect(this, &IncorrectIdentityFolderWarning::hideAnimationFinished, this, &IncorrectIdentityFolderWarning::slotAnimationFinished);
+}
+
+IncorrectIdentityFolderWarning::~IncorrectIdentityFolderWarning()
+{
+
+}
+
+void IncorrectIdentityFolderWarning::slotAnimationFinished()
+{
+ //TODO
+}
diff --git a/src/editor/warningwidgets/incorrectidentityfolderwarning.h b/src/editor/warningwidgets/incorrectidentityfolderwarning.h
new file mode 100644
index 0000000..a1a9b43
--- /dev/null
+++ b/src/editor/warningwidgets/incorrectidentityfolderwarning.h
@@ -0,0 +1,35 @@
+/*
+ Copyright (C) 2017 Montel Laurent <[email protected]>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef INCORRECTIDENTITYFOLDERWARNING_H
+#define INCORRECTIDENTITYFOLDERWARNING_H
+
+#include <KMessageWidget>
+
+class IncorrectIdentityFolderWarning : public KMessageWidget
+{
+ Q_OBJECT
+public:
+ explicit IncorrectIdentityFolderWarning(QWidget *parent = nullptr);
+ ~IncorrectIdentityFolderWarning();
+private:
+ void slotAnimationFinished();
+};
+
+#endif // INCORRECTIDENTITYFOLDERWARNING_H