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

Continue to implement dialog

parent 2489f798
Pipeline #122179 passed with stage
in 9 minutes and 36 seconds
......@@ -20,6 +20,7 @@ target_sources(openurlwithconfigure PRIVATE
openurlwithconfiguredialog.cpp
openurlwithconfigurewidget.h
openurlwithconfigurewidget.cpp
openurlwith_private_export.h
)
ecm_qt_declare_logging_category(openurlwithconfigure HEADER libopenurlwithconfigure_debug.h IDENTIFIER LIBOPENURLWITHCONFIGURE_PLUGIN_LOG
......
......@@ -5,10 +5,35 @@
*/
#include "openurlwithconfiguredialog.h"
#include "openurlwithconfigurewidget.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
OpenUrlWithConfigureDialog::OpenUrlWithConfigureDialog(QWidget *parent)
: QDialog(parent)
, mOpenUrlWithWidget(new OpenUrlWithConfigureWidget(this))
{
setWindowTitle(i18nc("@title:window", "Configure Open Url With Plugin"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mOpenUrlWithWidget->setObjectName(QStringLiteral("mOpenUrlWithWidget"));
mainLayout->addWidget(mOpenUrlWithWidget);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
connect(buttonBox, &QDialogButtonBox::accepted, this, &OpenUrlWithConfigureDialog::slotAccepted);
connect(buttonBox, &QDialogButtonBox::rejected, this, &OpenUrlWithConfigureDialog::reject);
// mConfigureWidget->loadSettings();
// readConfig();
}
OpenUrlWithConfigureDialog::~OpenUrlWithConfigureDialog() = default;
void OpenUrlWithConfigureDialog::slotAccepted()
{
accept();
}
......@@ -8,11 +8,15 @@
#include "libopenurlwithconfigure_export.h"
#include <QDialog>
class OpenUrlWithConfigureWidget;
class LIBOPENURLWITHCONFIGURE_EXPORT OpenUrlWithConfigureDialog : public QDialog
{
Q_OBJECT
public:
explicit OpenUrlWithConfigureDialog(QWidget *parent = nullptr);
~OpenUrlWithConfigureDialog() override;
private:
void slotAccepted();
OpenUrlWithConfigureWidget *const mOpenUrlWithWidget;
};
......@@ -6,9 +6,10 @@
#pragma once
#include "openurlwith_private_export.h"
#include <QWidget>
class OpenUrlWithConfigureWidget : public QWidget
class LIBOPENURLWITHCONFIGURE_TESTS_EXPORT OpenUrlWithConfigureWidget : public QWidget
{
Q_OBJECT
public:
......
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