Commit b3cb7bac authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement UI

parent 43a5b45e
......@@ -59,6 +59,8 @@ if (DKIM_CHECKER_BUILD)
dkim-verify/dkimconfiguretabwidget.cpp
dkim-verify/dkimcheckauthenticationstatusjob.cpp
dkim-verify/dkimauthenticationstatusinfo.cpp
dkim-verify/dkimutil.cpp
dkim-verify/dkimconfiguretab.cpp
)
endif()
......
......@@ -18,3 +18,4 @@ add_messageviewer_dkim_verify_unittest(dkimchecksignaturejobtest.cpp)
add_messageviewer_dkim_verify_unittest(dkimconfiguretabwidgettest.cpp)
add_messageviewer_dkim_verify_unittest(dkimcheckauthenticationstatusjobtest.cpp)
add_messageviewer_dkim_verify_unittest(dkimauthenticationstatusinfotest.cpp)
add_messageviewer_dkim_verify_unittest(dkimconfiguretabtest.cpp)
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "dkimconfiguretabtest.h"
#include "dkim-verify/dkimconfiguretab.h"
#include <QHBoxLayout>
#include <QTabWidget>
#include <QTest>
QTEST_MAIN(DKIMConfigureTabTest)
DKIMConfigureTabTest::DKIMConfigureTabTest(QObject *parent)
: QObject(parent)
{
}
void DKIMConfigureTabTest::shouldHaveDefaultValue()
{
MessageViewer::DKIMConfigureTab w;
QHBoxLayout *mainLayout = w.findChild<QHBoxLayout*>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
QTabWidget *mTabWidget = w.findChild<QTabWidget *>(QStringLiteral("tabwidget"));
QVERIFY(mTabWidget);
}
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef DKIMCONFIGURETABTEST_H
#define DKIMCONFIGURETABTEST_H
#include <QObject>
class DKIMConfigureTabTest : public QObject
{
Q_OBJECT
public:
explicit DKIMConfigureTabTest(QObject *parent = nullptr);
~DKIMConfigureTabTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // DKIMCONFIGURETABTEST_H
......@@ -40,7 +40,4 @@ void DKIMConfigureTabWidgetTest::shouldHaveDefaultValue()
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
QTabWidget *mTabWidget = w.findChild<QTabWidget *>(QStringLiteral("tabwidget"));
QVERIFY(mTabWidget);
}
......@@ -29,3 +29,8 @@ DKIMCheckSignatureJob::~DKIMCheckSignatureJob()
{
}
void DKIMCheckSignatureJob::start()
{
//TODO
}
......@@ -29,6 +29,7 @@ class MESSAGEVIEWER_TESTS_EXPORT DKIMCheckSignatureJob : public QObject
public:
explicit DKIMCheckSignatureJob(QObject *parent = nullptr);
~DKIMCheckSignatureJob();
void start();
};
}
......
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "dkimconfiguretab.h"
#include <QHBoxLayout>
#include <QTabWidget>
using namespace MessageViewer;
DKIMConfigureTab::DKIMConfigureTab(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setMargin(0);
mTabWidget = new QTabWidget(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
}
DKIMConfigureTab::~DKIMConfigureTab()
{
}
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef DKIMCONFIGURETAB_H
#define DKIMCONFIGURETAB_H
#include <QWidget>
#include "messageviewer_private_export.h"
class QTabWidget;
namespace MessageViewer {
class MESSAGEVIEWER_TESTS_EXPORT DKIMConfigureTab : public QWidget
{
Q_OBJECT
public:
explicit DKIMConfigureTab(QWidget *parent = nullptr);
~DKIMConfigureTab();
private:
QTabWidget *mTabWidget = nullptr;
};
}
#endif // DKIMCONFIGURETAB_H
......@@ -18,7 +18,6 @@
*/
#include "dkimconfiguretabwidget.h"
#include <QTabWidget>
#include <QVBoxLayout>
using namespace MessageViewer;
......@@ -29,12 +28,14 @@ DKIMConfigureTabWidget::DKIMConfigureTabWidget(QWidget *parent)
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setMargin(0);
mTabWidget = new QTabWidget(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
}
DKIMConfigureTabWidget::~DKIMConfigureTabWidget()
{
}
void DKIMConfigureTabWidget::init()
{
//TODO
}
......@@ -32,7 +32,7 @@ public:
explicit DKIMConfigureTabWidget(QWidget *parent = nullptr);
~DKIMConfigureTabWidget();
private:
QTabWidget *mTabWidget = nullptr;
void init();
};
}
......
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "dkimutil.h"
using namespace MessageViewer;
DKIMUtil::DKIMUtil()
{
}
/*
Copyright (C) 2018 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef DKIMUTIL_H
#define DKIMUTIL_H
namespace MessageViewer {
class DKIMUtil
{
public:
DKIMUtil();
};
}
#endif // DKIMUTIL_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment