From b54a8cc9bef647b33c354b8422d8bb13d44d0783 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 2 Jun 2016 13:33:52 +0200 Subject: [PATCH] Add configurewidget --- .../confirm-address/CMakeLists.txt | 1 + .../confirmaddressconfigurewidgettest.cpp | 46 +++++++++++++++++++ .../confirmaddressconfigurewidgettest.h | 36 +++++++++++++++ .../confirmaddressconfigurewidget.cpp | 36 +++++++++++++++ .../confirmaddressconfigurewidget.h | 34 ++++++++++++++ 5 files changed, 153 insertions(+) create mode 100644 kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.cpp create mode 100644 kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.h create mode 100644 kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp create mode 100644 kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h diff --git a/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt b/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt index 937866ba..4c131d7e 100644 --- a/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt +++ b/kmail/editorsendcheckplugins/confirm-address/CMakeLists.txt @@ -1,6 +1,7 @@ set(kmail_confirmaddresseditorplugin_SRCS confirmaddressinterface.cpp confirmaddressplugin.cpp + confirmaddressconfigurewidget.cpp ) ecm_qt_declare_logging_category(kmail_confirmaddresseditorplugin_SRCS HEADER confirmaddressplugin_debug.h IDENTIFIER KMAIL_EDITOR_CONFIRMADDRESS_PLUGIN_LOG CATEGORY_NAME log_kmail_confirmaddressplugin) diff --git a/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.cpp b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.cpp new file mode 100644 index 00000000..113541e8 --- /dev/null +++ b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.cpp @@ -0,0 +1,46 @@ +/* + Copyright (C) 2016 Montel Laurent + + 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 "confirmaddressconfigurewidgettest.h" +#include "../confirmaddressconfigurewidget.h" + +#include +#include + +ConfirmAddressConfigureWidgetTest::ConfirmAddressConfigureWidgetTest(QObject *parent) + : QObject(parent) +{ + +} + +ConfirmAddressConfigureWidgetTest::~ConfirmAddressConfigureWidgetTest() +{ + +} + +void ConfirmAddressConfigureWidgetTest::shouldHaveDefaultValue() +{ + ConfirmAddressConfigureWidget w; + + QVBoxLayout *vboxlayout = w.findChild(QStringLiteral("mainlayout")); + QVERIFY(vboxlayout); +} + +QTEST_MAIN(ConfirmAddressConfigureWidgetTest) diff --git a/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.h b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.h new file mode 100644 index 00000000..36f03505 --- /dev/null +++ b/kmail/editorsendcheckplugins/confirm-address/autotests/confirmaddressconfigurewidgettest.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2016 Montel Laurent + + 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 CONFIRMADDRESSCONFIGUREWIDGETTEST_H +#define CONFIRMADDRESSCONFIGUREWIDGETTEST_H + +#include + +class ConfirmAddressConfigureWidgetTest : public QObject +{ + Q_OBJECT +public: + explicit ConfirmAddressConfigureWidgetTest(QObject *parent = Q_NULLPTR); + ~ConfirmAddressConfigureWidgetTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); +}; + +#endif // CONFIRMADDRESSCONFIGUREWIDGETTEST_H diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp new file mode 100644 index 00000000..e6159ade --- /dev/null +++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.cpp @@ -0,0 +1,36 @@ +/* + Copyright (C) 2016 Montel Laurent + + 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 "confirmaddressconfigurewidget.h" +#include +#include + +ConfirmAddressConfigureWidget::ConfirmAddressConfigureWidget(QWidget *parent) + : QWidget(parent) +{ + QVBoxLayout *vboxlayout = new QVBoxLayout; + vboxlayout->setObjectName(QStringLiteral("mainlayout")); + setLayout(vboxlayout); +} + +ConfirmAddressConfigureWidget::~ConfirmAddressConfigureWidget() +{ + +} diff --git a/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h new file mode 100644 index 00000000..357b3681 --- /dev/null +++ b/kmail/editorsendcheckplugins/confirm-address/confirmaddressconfigurewidget.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2016 Montel Laurent + + 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 CONFIRMADDRESSCONFIGUREWIDGET_H +#define CONFIRMADDRESSCONFIGUREWIDGET_H + +#include + +class ConfirmAddressConfigureWidget : public QWidget +{ + Q_OBJECT +public: + explicit ConfirmAddressConfigureWidget(QWidget *parent = Q_NULLPTR); + ~ConfirmAddressConfigureWidget(); +}; + +#endif // CONFIRMADDRESSCONFIGUREWIDGET_H -- GitLab