summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-06-19 18:30:42 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-06-19 18:30:42 (GMT)
commita0ac6de644a09c6cbc533ccfe2e20a57c3e7ecba (patch)
tree78ca2f3dc12351722d836ce669ba0171f558e6c5
parente924f463845c7a2afb06f63f70785b4e0a7eb582 (diff)
Port KeyExport dialog to QDialog.
-rw-r--r--editor/kgpgmd5widget.h2
-rw-r--r--keyexport.cpp15
-rw-r--r--keyexport.h4
-rw-r--r--keyexport.ui26
4 files changed, 31 insertions, 16 deletions
diff --git a/editor/kgpgmd5widget.h b/editor/kgpgmd5widget.h
index 96ed105..0649632 100644
--- a/editor/kgpgmd5widget.h
+++ b/editor/kgpgmd5widget.h
@@ -10,7 +10,7 @@
#ifndef KGPGMD5WIDGET_H
#define KGPGMD5WIDGET_H
-#include <KDialog>
+#include <QDialog>
#include <QUrl>
#include <kgpgcompiler.h>
diff --git a/keyexport.cpp b/keyexport.cpp
index 55d7039..1aff175 100644
--- a/keyexport.cpp
+++ b/keyexport.cpp
@@ -14,17 +14,22 @@
***************************************************************************/
#include "keyexport.h"
+#include <KConfigGroup>
#include <KMessageBox>
+#include <QDialogButtonBox>
+#include <QPushButton>
+#include <QVBoxLayout>
+
KeyExport::KeyExport(QWidget *parent, const QStringList &keyservers)
- : KDialog(parent),
+ : QDialog(parent),
Ui_KeyExport()
{
setupUi(this);
- setMainWidget(widget);
- setWindowTitle(i18n("Public Key Export"));
- setButtons(KDialog::Ok | KDialog::Cancel);
- setDefaultButton(KDialog::Ok);
+
+ buttonBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL | Qt::Key_Return);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
newFilename->setWindowTitle(i18n("Save File"));
newFilename->setMode(KFile::File);
diff --git a/keyexport.h b/keyexport.h
index 45c9dbc..c546518 100644
--- a/keyexport.h
+++ b/keyexport.h
@@ -19,10 +19,10 @@
#include "ui_keyexport.h"
+#include <QDialog>
#include <QStringList>
-#include <KDialog>
-class KeyExport : public KDialog, public Ui_KeyExport
+class KeyExport : public QDialog, public Ui_KeyExport
{
Q_OBJECT
diff --git a/keyexport.ui b/keyexport.ui
index 44195de..bfc7d68 100644
--- a/keyexport.ui
+++ b/keyexport.ui
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KeyExport</class>
- <widget class="QWidget" name="KeyExport">
+ <widget class="QDialog" name="KeyExport">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>626</width>
- <height>411</height>
+ <height>462</height>
</rect>
</property>
<property name="sizePolicy">
@@ -22,6 +22,9 @@
<height>0</height>
</size>
</property>
+ <property name="windowTitle">
+ <string>Public Key Export</string>
+ </property>
<layout class="QVBoxLayout">
<item>
<widget class="QWidget" name="widget" native="true">
@@ -35,14 +38,14 @@
<item>
<widget class="QRadioButton" name="checkMail">
<property name="text">
- <string comment="Export a key via email">Email</string>
+ <string comment="Export a key via email">E&amp;mail</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="checkClipboard">
<property name="text">
- <string>Clipboard</string>
+ <string>C&amp;lipboard</string>
</property>
</widget>
</item>
@@ -55,7 +58,7 @@
<string>You must define at least one keyserver in settings before you can export to one.</string>
</property>
<property name="text">
- <string>Key server:</string>
+ <string>&amp;Key server:</string>
</property>
</widget>
</item>
@@ -95,7 +98,7 @@
<item>
<widget class="QRadioButton" name="checkAttrAll">
<property name="text">
- <string>Export everything</string>
+ <string>E&amp;xport everything</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -105,7 +108,7 @@
<item>
<widget class="QRadioButton" name="checkAttrPhoto">
<property name="text">
- <string>Do not export attributes (photo ids)</string>
+ <string>Do &amp;not export attributes (photo ids)</string>
</property>
</widget>
</item>
@@ -135,6 +138,13 @@
</layout>
</widget>
</item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -148,7 +158,7 @@
</customwidget>
<customwidget>
<class>KUrlRequester</class>
- <extends>QFrame</extends>
+ <extends>QWidget</extends>
<header>kurlrequester.h</header>
</customwidget>
</customwidgets>