Commit 5e8ce7d0 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

port edit gesture dialog away from kdialog

parent 746a5655
......@@ -22,15 +22,15 @@
#include <QLabel>
#include <QLayout>
#include <QDialogButtonBox>
EditGestureDialog::EditGestureDialog(const KHotKeys::StrokePoints &pointData, QWidget *parent)
: KDialog(parent)
: QDialog(parent)
,_recorder(this)
,_pointData(pointData)
{
setCaption(i18n("Edit Gesture"));
setButtons(KDialog::Ok | KDialog::Cancel);
setWindowTitle(i18n("Edit Gesture"));
QString message(i18n(
"Draw the gesture you would like to record below. Press "
......@@ -44,11 +44,15 @@ EditGestureDialog::EditGestureDialog(const KHotKeys::StrokePoints &pointData, QW
layout->addWidget(label);
layout->addWidget(&_recorder);
QWidget *w = new QWidget;
w->setLayout(layout);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
setMainWidget(w);
layout->addWidget(buttonBox);
setLayout(layout);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accepted);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::rejected);
connect(&_recorder, SIGNAL(recorded(KHotKeys::StrokePoints)),
SLOT(recorded(KHotKeys::StrokePoints)));
}
......
......@@ -22,7 +22,7 @@
#include "triggers/gestures.h"
#include <KDialog>
#include <QDialog>
/**
* @author Michael Jansen <kde@michael-jansen.biz>
......@@ -31,7 +31,7 @@
* This dialog is what pops up after clicking the edit button. It contains
* a GestureRecorder to enable the input of a new gesture.
*/
class EditGestureDialog : public KDialog
class EditGestureDialog : public QDialog
{
Q_OBJECT
......
......@@ -40,11 +40,11 @@ void GestureWidget::edit()
EditGestureDialog dia(ui.gesture->pointData());
switch (dia.exec())
{
case KDialog::Accepted:
case QDialog::Accepted:
setPointData(dia.pointData(), true);
break;
case KDialog::Rejected:
case QDialog::Rejected:
break;
default:
......
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