Commit 460f6750 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

port WindowDefinitionDialog away from kdialog

parent 96174caa
......@@ -22,7 +22,9 @@
#include "qwindowdefs.h"
#include <QWidget>
#include <KDialog>
#include <QDialog>
#include <QDialogButtonBox>
#include <QVBoxLayout>
namespace Ui {
......@@ -77,19 +79,31 @@ private:
};
class WindowDefinitionDialog : public KDialog
class WindowDefinitionDialog : public QDialog
{
Q_OBJECT
public:
WindowDefinitionDialog( KHotKeys::Windowdef_simple *windowdef, QWidget *parent=nullptr)
: KDialog(parent)
: QDialog(parent)
,def(nullptr)
{
setLayout(new QVBoxLayout);
def = new WindowDefinitionWidget(windowdef, this);
setMainWidget(def);
def->copyFromObject();
layout()->addWidget(def);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
layout()->addWidget(buttonBox);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accepted);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::rejected);
}
......@@ -102,7 +116,7 @@ public:
void accept() Q_DECL_OVERRIDE
{
def->copyToObject();
KDialog::accept();
QDialog::accept();
}
private:
......
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