Commit 0e6b7437 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show dialogbox

parent a4b2e897
Pipeline #46308 canceled with stage
......@@ -5,6 +5,7 @@
*/
#include "remotecontentconfigurewidgettest.h"
#include "remote-content/remotecontentconfigurewidget.h"
#include <QListWidget>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN(RemoteContentConfigureWidgetTest)
......@@ -20,4 +21,8 @@ void RemoteContentConfigureWidgetTest::shouldHaveDefaultValues()
auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), {});
auto mListWidget = w.findChild<QListWidget *>(QStringLiteral("mListWidget"));
QVERIFY(mListWidget);
}
......@@ -7,6 +7,7 @@
#include "remotecontentconfigurewidget.h"
#include <KLocalizedString>
#include <QListWidget>
#include <QVBoxLayout>
using namespace MessageViewer;
RemoteContentConfigureWidget::RemoteContentConfigureWidget(QWidget *parent)
......@@ -15,9 +16,23 @@ RemoteContentConfigureWidget::RemoteContentConfigureWidget(QWidget *parent)
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
mListWidget = new QListWidget(this);
mListWidget->setObjectName(QStringLiteral("mListWidget"));
mainLayout->addWidget(mListWidget);
}
RemoteContentConfigureWidget::~RemoteContentConfigureWidget()
{
}
void RemoteContentConfigureWidget::saveSettings()
{
}
void RemoteContentConfigureWidget::readSettings()
{
}
......@@ -10,6 +10,7 @@
#include <QWidget>
#include "messageviewer_private_export.h"
class QListWidget;
namespace MessageViewer {
class MESSAGEVIEWER_TESTS_EXPORT RemoteContentConfigureWidget : public QWidget
{
......@@ -17,6 +18,10 @@ class MESSAGEVIEWER_TESTS_EXPORT RemoteContentConfigureWidget : public QWidget
public:
explicit RemoteContentConfigureWidget(QWidget *parent = nullptr);
~RemoteContentConfigureWidget() override;
void saveSettings();
void readSettings();
private:
QListWidget *mListWidget = nullptr;
};
}
......
......@@ -5,7 +5,9 @@
*/
#include "remotecontentmenu.h"
#include "remotecontentconfiguredialog.h"
#include <KLocalizedString>
#include <QPointer>
using namespace MessageViewer;
RemoteContentMenu::RemoteContentMenu(QWidget *parent)
......@@ -27,5 +29,9 @@ void RemoteContentMenu::initialize()
void RemoteContentMenu::slotConfigure()
{
//TODO
QPointer<MessageViewer::RemoteContentConfigureDialog> remoteContentDialog = new MessageViewer::RemoteContentConfigureDialog(this);
if (remoteContentDialog->exec()) {
//TODO ?
}
delete remoteContentDialog;
}
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