Commit 21e2be19 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare to implement remotecontentdialog

parent aa839ae9
Pipeline #47334 passed with stage
in 46 minutes and 14 seconds
......@@ -259,6 +259,8 @@ set(libmessageviewer_remotecontent
remote-content/remotecontentmenu.cpp
remote-content/remotecontentconfiguredialog.cpp
remote-content/remotecontentconfigurewidget.cpp
remote-content/remotecontentdialog.cpp
remote-content/remotecontentwidget.cpp
)
set(libmessageviewer_SRCS
......
......@@ -11,3 +11,5 @@ add_messageviewer_remote_contents_unittest(remotecontentinfotest.cpp)
add_messageviewer_remote_contents_unittest(remotecontentconfiguredialogtest.cpp)
add_messageviewer_remote_contents_unittest(remotecontentconfigurewidgettest.cpp)
add_messageviewer_remote_contents_unittest(remotecontentmanagertest.cpp)
add_messageviewer_remote_contents_unittest(remotecontentwidgettest.cpp)
add_messageviewer_remote_contents_unittest(remotecontentdialogtest.cpp)
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "remotecontentdialogtest.h"
#include "remote-content/remotecontentdialog.h"
#include <QTest>
QTEST_MAIN(RemoteContentDialogTest)
RemoteContentDialogTest::RemoteContentDialogTest(QObject *parent)
: QObject(parent)
{
}
void RemoteContentDialogTest::shouldHaveDefaultValues()
{
MessageViewer::RemoteContentDialog d;
//TODO
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef REMOTECONTENTDIALOGTEST_H
#define REMOTECONTENTDIALOGTEST_H
#include <QObject>
class RemoteContentDialogTest : public QObject
{
Q_OBJECT
public:
explicit RemoteContentDialogTest(QObject *parent = nullptr);
~RemoteContentDialogTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
#endif // REMOTECONTENTDIALOGTEST_H
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "remotecontentwidgettest.h"
#include "remote-content/remotecontentwidget.h"
#include <QTest>
QTEST_MAIN(RemoteContentWidgetTest)
RemoteContentWidgetTest::RemoteContentWidgetTest(QObject *parent)
: QObject(parent)
{
}
void RemoteContentWidgetTest::shouldHaveDefaultValues()
{
MessageViewer::RemoteContentWidget w;
//TODO
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef REMOTECONTENTWIDGETTEST_H
#define REMOTECONTENTWIDGETTEST_H
#include <QObject>
class RemoteContentWidgetTest : public QObject
{
Q_OBJECT
public:
explicit RemoteContentWidgetTest(QObject *parent = nullptr);
~RemoteContentWidgetTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
#endif // REMOTECONTENTWIDGETTEST_H
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "remotecontentdialog.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
using namespace MessageViewer;
RemoteContentDialog::RemoteContentDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18nc("@title:window", "Details"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
connect(buttonBox, &QDialogButtonBox::accepted, this, &RemoteContentDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &RemoteContentDialog::reject);
mainLayout->addWidget(buttonBox);
}
RemoteContentDialog::~RemoteContentDialog()
{
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef REMOTECONTENTDIALOG_H
#define REMOTECONTENTDIALOG_H
#include <QDialog>
#include "messageviewer_private_export.h"
namespace MessageViewer {
class MESSAGEVIEWER_TESTS_EXPORT RemoteContentDialog : public QDialog
{
Q_OBJECT
public:
explicit RemoteContentDialog(QWidget *parent = nullptr);
~RemoteContentDialog() override;
};
}
#endif // REMOTECONTENTDIALOG_H
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "remotecontentwidget.h"
#include <QVBoxLayout>
using namespace MessageViewer;
RemoteContentWidget::RemoteContentWidget(QWidget *parent)
: QWidget(parent)
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
}
RemoteContentWidget::~RemoteContentWidget()
{
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef REMOTECONTENTWIDGET_H
#define REMOTECONTENTWIDGET_H
#include <QWidget>
#include "messageviewer_private_export.h"
namespace MessageViewer {
class MESSAGEVIEWER_TESTS_EXPORT RemoteContentWidget : public QWidget
{
Q_OBJECT
public:
explicit RemoteContentWidget(QWidget *parent = nullptr);
~RemoteContentWidget() override;
};
}
#endif // REMOTECONTENTWIDGET_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