Commit 289a64e7 authored by Laurent Montel's avatar Laurent Montel
Browse files

continue to implement dialog

parent 269d6edc
Pipeline #221087 passed with stage
in 14 minutes and 3 seconds
......@@ -5,12 +5,27 @@
*/
#include "translatorconfiguredialog.h"
#include "translatorconfigurewidget.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
TranslatorConfigureDialog::TranslatorConfigureDialog(QWidget *parent)
: QDialog(parent)
, mTranslatorConfigureWidget(new TranslatorConfigureWidget(this))
{
}
setWindowTitle(i18nc("@title:window", "Configure Translator"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
TranslatorConfigureDialog::~TranslatorConfigureDialog()
{
mTranslatorConfigureWidget->setObjectName(QStringLiteral("mTranslatorConfigureWidget"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
connect(buttonBox, &QDialogButtonBox::accepted, this, &TranslatorConfigureDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &TranslatorConfigureDialog::reject);
}
TranslatorConfigureDialog::~TranslatorConfigureDialog() = default;
......@@ -6,10 +6,13 @@
#pragma once
#include <QDialog>
class TranslatorConfigureWidget;
class TranslatorConfigureDialog : public QDialog
{
public:
explicit TranslatorConfigureDialog(QWidget *parent = nullptr);
~TranslatorConfigureDialog() override;
private:
TranslatorConfigureWidget *const mTranslatorConfigureWidget;
};
......@@ -6,11 +6,16 @@
#include "translatorconfigurewidget.h"
#include <KLocalizedString>
#include <QComboBox>
#include <QLabel>
#include <QVBoxLayout>
TranslatorConfigureWidget::TranslatorConfigureWidget(QWidget *parent)
: QWidget{parent}
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
}
TranslatorConfigureWidget::~TranslatorConfigureWidget()
......
Supports Markdown
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