Commit fc4fafad authored by Tomas Mecir's avatar Tomas Mecir

more qt5/kf5 migration

parent c334e201
......@@ -12,8 +12,8 @@ include(FeatureSummary)
include(KDEFrameworkCompilerSettings)
include(ECMInstallIcons)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Script)
find_package(KF5 REQUIRED COMPONENTS Config CoreAddons I18n KIO KDELibs4Support XmlGui Parts Service)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Script Multimedia)
find_package(KF5 REQUIRED COMPONENTS Config CoreAddons WidgetsAddons I18n KIO KDELibs4Support KCMUtils XmlGui Parts Service)
find_package(MXP)
if (MXP_FOUND)
......
......@@ -117,6 +117,7 @@ void cTranscript::addLineToTranscript (cTextChunk *chunk)
case TRANSCRIPT_ANSI: s = chunk->toAnsi (ap); break;
case TRANSCRIPT_HTML: s = chunk->toHTML (); break;
};
s += "\n"; // we use <pre> in HTML, so this applies equally to all three
QByteArray b = s.toLocal8Bit ();
const char *ch = b.constData();
if (ch)
......@@ -144,6 +145,7 @@ void cTranscript::addLineToAdvTranscript (cTextChunk *chunk)
case TRANSCRIPT_ANSI: s = chunk->toAnsi (ap); break;
case TRANSCRIPT_HTML: s = chunk->toHTML (); break;
};
s += "\n"; // we use <pre> in HTML, so this applies equally to all three
QByteArray b = s.toLocal8Bit ();
const char *ch = b.constData();
if (ch)
......
......@@ -235,16 +235,13 @@ void cWindowList::adjustFonts(QFont font)
}
}
void cWindowList::applySettings (bool allowblinking, bool wordwrapping,
int wrappos, int indentvalue, int forceredraw)
void cWindowList::applySettings (bool allowblinking, int indentvalue, int forceredraw)
{
map<QString, dlgOutputWindow *>::iterator it;
for (it = windows.begin(); it != windows.end(); ++it)
{
cConsole *console = it->second->console();
console->setEnableBlinking (allowblinking);
console->setWordWrapping (wordwrapping);
console->setWrapPos (wrappos);
console->setIndentation (indentvalue);
console->setRepaintCount (forceredraw);
}
......
......@@ -29,5 +29,5 @@ set(dialogs_LIB_SRCS
add_library(dialogs STATIC ${dialogs_LIB_SRCS})
target_link_libraries(dialogs )
target_link_libraries(dialogs KF5::I18n Qt5::Widgets KF5::WidgetsAddons)
......@@ -135,5 +135,3 @@ void cDirList::update ()
listbox->setCurrentRow (item);
}
#include "cdirlist.moc"
......@@ -57,9 +57,8 @@ dlgAppSettings::dlgAppSettings (QWidget *parent) : KPageDialog (parent)
i18n("Bright cyan"), i18n("White") };
//initial dialog size
setInitialSize (QSize (600, 400));
setCaption (i18n ("Application settings"));
setButtons (KDialog::Ok | KDialog::Cancel | KDialog::Apply);
setWindowTitle (i18n ("Application settings"));
setStandardButtons (QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply);
setFaceType (KPageDialog::List);
//prepare dialog pages
......@@ -222,16 +221,8 @@ dlgAppSettings::dlgAppSettings (QWidget *parent) : KPageDialog (parent)
//blinking
chkblinking = new QCheckBox (i18n ("Enable b&linking"), output1);
chkblinking->setWhatsThis( i18n ("Enables support for blinking. "
"This is disabled by default, because most players don't like it."));
chkblinking->setWhatsThis( i18n ("Enables support for blinking. "));
//word wrapping
chkwrap = new QCheckBox (i18n ("Enable &word wrapping"), output1);
chkwrap->setWhatsThis( i18n ("If a line that is longer than current console "
"width is to be displayed, it wraps to the next line. With this option "
"enabled, whole words will move to the next line, instead of cutting "
"words in the middle."));
//indentation
edindent = new KIntNumInput (output2);
edindent->setLabel (i18n ("&Indentation"),
......@@ -570,6 +561,11 @@ dlgAppSettings::~dlgAppSettings()
cDialogList::self()->removeDialog ("app-prefs");
}
QSize dlgConnect::sizeHint() const
{
return QSize (600, 400);
}
void dlgAppSettings::showSettingsDialog ()
{
//so first we have to create the dialog...
......@@ -620,16 +616,6 @@ void dlgAppSettings::setMessages (bool value)
chkmessages->setChecked (value);
}
void dlgAppSettings::setWordWrapping (bool value)
{
chkwrap->setChecked (value);
}
bool dlgAppSettings::wordWrapping ()
{
return chkwrap->isChecked ();
}
void dlgAppSettings::setIndentation (int value)
{
edindent->setValue (value);
......@@ -640,16 +626,6 @@ int dlgAppSettings::indentation ()
return edindent->value ();
}
void dlgAppSettings::setWrapPos (int value)
{
edwrappos->setValue (value);
}
int dlgAppSettings::wrapPos ()
{
return edwrappos->value ();
}
void dlgAppSettings::setHistory (int value)
{
edhistory->setValue (value);
......@@ -1079,9 +1055,7 @@ void dlgAppSettings::getSettingsFromDialog ()
gs->setBool ("allow-blink", enableBlinking ());
gs->setBool ("command-echo", cmdEcho ());
gs->setBool ("show-messages", messages ());
gs->setBool ("word-wrap", wordWrapping ());
gs->setInt ("indent", indentation ());
gs->setInt ("wrap-pos", wrapPos ());
gs->setInt ("history-size", history ());
gs->setInt ("force-redraw", forceRedraw ());
......@@ -1160,9 +1134,7 @@ void dlgAppSettings::putSettingsToDialog ()
setEnableBlinking (gs->getBool ("allow-blink"));
setCmdEcho (gs->getBool ("command-echo"));
setMessages (gs->getBool ("show-messages"));
setWordWrapping (gs->getBool ("word-wrap"));
setIndentation (gs->getInt ("indent"));
setWrapPos (gs->getInt ("wrap-pos"));
setHistory (gs->getInt ("history-size"));
setForceRedraw (gs->getInt ("force-redraw"));
......@@ -1209,5 +1181,3 @@ void dlgAppSettings::putSettingsToDialog ()
//--- NOTHING NEEDED ---
}
#include "dlgappsettings.moc"
......@@ -77,12 +77,8 @@ public:
void setMessages (bool value);
bool enableBlinking ();
void setEnableBlinking (bool value);
void setWordWrapping (bool value);
bool wordWrapping ();
void setIndentation (int value);
int indentation ();
void setWrapPos (int value);
int wrapPos ();
void setHistory (int value);
int history ();
int forceRedraw ();
......
......@@ -24,6 +24,7 @@
#include "cprofilesettings.h"
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QTreeView>
#include <QVBoxLayout>
......@@ -33,21 +34,15 @@
#include <kmessagebox.h>
#include <kpushbutton.h>
dlgConnect::dlgConnect(QWidget *parent) : KDialog (parent)
dlgConnect::dlgConnect(QWidget *parent) : QDialog (parent)
{
//initial dialog size
setInitialSize (QSize (500, 400));
setCaption (i18n ("Connect"));
setButtons (KDialog::Ok | KDialog::Cancel);
setWindowTitle (i18n ("Connect"));
//create main dialog's widget
QWidget *page = new QWidget (this);
QGridLayout *layout = new QGridLayout (page);
setMainWidget (page);
QGridLayout *layout = new QGridLayout (this);
//put some widgets there
lw = new QTreeView (page);
lw = new QTreeView (this);
lw->setModel (cProfileManager::self()->model());
lw->setUniformRowHeights (true);
lw->setRootIsDecorated (false);
......@@ -56,7 +51,7 @@ dlgConnect::dlgConnect(QWidget *parent) : KDialog (parent)
i18n ("This list shows currently defined profiles.<p><b>Profiles</b> "
"allow you to speed up connecting to your MUD, as well as to use "
"more advanced features like <i>aliases</i> or <i>triggers</i>."));
QWidget *vb = new QWidget (page);
QWidget *vb = new QWidget (this);
QVBoxLayout *vblayout = new QVBoxLayout (vb);
vblayout->setSpacing (5);
KPushButton *addButton = new KPushButton (i18n ("&New profile"), vb);
......@@ -68,17 +63,27 @@ dlgConnect::dlgConnect(QWidget *parent) : KDialog (parent)
vblayout->addWidget (deleteButton);
vblayout->addWidget (duplicateButton);
chkSendNothing = new QCheckBox (i18n ("Do not &send login sequence"), page);
chkSendNothing = new QCheckBox (i18n ("Do not &send login sequence"), this);
chkSendNothing->setWhatsThis( i18n ("Login sequence won't be sent for "
"this connect. Useful when you're creating a new character and you "
"want to use QuickConnect for some reason."));
chkSendNothing->setChecked (false);
chkOffline = new QCheckBox (i18n ("&Offline editing"), page);
chkOffline = new QCheckBox (i18n ("&Offline editing"), this);
chkOffline->setWhatsThis( i18n ("This allows offline editing of "
"profiles."));
chkOffline->setChecked(false);
QDialogButtonBox *buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *button = buttons->button (QDialogButtonBox::Ok);
button->setText (i18n ("&Connect"));
button->setToolTip (i18n ("Establishes connection with specified parameters."));
button = buttons->button (QDialogButtonBox::Cancel);
button->setText (i18n ("C&lose"));
button->setToolTip (i18n ("Closes this dialog box without connecting."));
connect (buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect (buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->setRowStretch (0, 0);
layout->setRowStretch (1, 5);
layout->setSpacing (5);
......@@ -87,14 +92,8 @@ dlgConnect::dlgConnect(QWidget *parent) : KDialog (parent)
layout->addWidget (vb, 0, 1);
layout->addWidget (chkSendNothing, 2, 0);
layout->addWidget (chkOffline, 3, 0);
layout->addWidget (buttons, 4, 0, 2, 1);
//update button text
setButtonText (KDialog::Ok, i18n ("&Connect"));
setButtonToolTip (KDialog::Ok, i18n ("Establishes connection with specified parameters."));
setButtonText (KDialog::Cancel, i18n ("C&lose"));
setButtonToolTip (KDialog::Cancel, i18n ("Closes this dialog box without connecting."));
showButtonSeparator (true);
//connect signals
connect (addButton, SIGNAL(clicked()), this, SLOT(addPressed()));
connect (modifyButton, SIGNAL(clicked()), this, SLOT(modifyPressed()));
......@@ -111,6 +110,11 @@ dlgConnect::~dlgConnect()
{
}
QSize dlgConnect::sizeHint() const
{
return QSize (500, 400);
}
QString dlgConnect::selectedProfile ()
{
QItemSelection sel = lw->selectionModel()->selection();
......@@ -259,4 +263,3 @@ void dlgConnect::doModify ()
updateProfileFromDialog (profile);
}
#include "dlgconnect.moc"
......@@ -19,7 +19,7 @@
#ifndef DLGCONNECT_H
#define DLGCONNECT_H
#include <kdialog.h>
#include <QDialog>
#include <QItemSelection>
#include <QModelIndex>
......@@ -34,12 +34,13 @@ Connect dialog. Shown and handled by cConnection.
*@author Tomas Mecir
*/
class dlgConnect : public KDialog {
class dlgConnect : public QDialog {
Q_OBJECT
public:
dlgConnect (QWidget *parent=0);
~dlgConnect ();
virtual QSize sizeHint() const override;
QString selectedProfile ();
bool sendNothing ();
bool isOffLine ();
......
......@@ -30,27 +30,23 @@
#include <klineedit.h>
#include <klocale.h>
dlgDumpBuffer::dlgDumpBuffer (QWidget *parent) : KDialog (parent)
dlgDumpBuffer::dlgDumpBuffer (QWidget *parent) : QDialog (parent)
{
//initial dialog size
setInitialSize (QSize (300, 100));
setCaption (i18n ("Dump output buffer"));
setWindowTitle (i18n ("Dump output buffer"));
setButtons (KDialog::Ok | KDialog::Cancel);
//create main dialog's widget
QWidget *page = new QWidget (this);
QVBoxLayout *layout = new QVBoxLayout (page);
setMainWidget (page);
QVBoxLayout *layout = new QVBoxLayout (this);
//where to start?
chkcurpos = new QCheckBox (i18n ("&Start at current position"), page);
chkcurpos = new QCheckBox (i18n ("&Start at current position"), this);
chkcurpos->setWhatsThis( i18n ("When this is enabled, only the "
"part of history buffer from currently displayed part up to the end of "
"buffer will be dumped. Otherwise entire buffer will be dumped (default)."));
//the file name
QFrame *fileframe = new QFrame (page);
QFrame *fileframe = new QFrame (this);
QHBoxLayout *filelayout = new QHBoxLayout (fileframe);
QLabel *lblname = new QLabel (i18n ("&File:"), fileframe);
fname = new KLineEdit (fileframe);
......@@ -63,7 +59,7 @@ dlgDumpBuffer::dlgDumpBuffer (QWidget *parent) : KDialog (parent)
filelayout->addWidget (filebutton);
//type
QFrame *typeframe = new QFrame (page);
QFrame *typeframe = new QFrame (this);
QHBoxLayout *typelayout = new QHBoxLayout (typeframe);
QLabel *lbltype = new QLabel (i18n ("&Dump format:"), typeframe);
ttype = new QComboBox (typeframe);
......@@ -99,6 +95,11 @@ dlgDumpBuffer::~dlgDumpBuffer ()
}
QSize dlgDumpBuffer::sizeHint() const
{
return QSize (300, 100);
}
void dlgDumpBuffer::browseFiles ()
{
fname->setText (KFileDialog::getSaveFileName ());
......@@ -156,4 +157,3 @@ void dlgDumpBuffer::setType (int t)
ttype->setCurrentIndex (t - 1);
}
#include "dlgdumpbuffer.moc"
......@@ -19,7 +19,7 @@
#define DLGDUMPBUFFER_H
#include <qwidget.h>
#include <kdialog.h>
#include <QDialog>
class QCheckBox;
class QComboBox;
......@@ -30,11 +30,12 @@ Dump Buffer dialog.
*@author Tomas Mecir
*/
class dlgDumpBuffer : public KDialog {
class dlgDumpBuffer : public QDialog {
Q_OBJECT
public:
dlgDumpBuffer (QWidget *parent=0);
~dlgDumpBuffer ();
virtual QSize sizeHint() const override;
bool curPos ();
QString fileName ();
void setFileName (const QString &fName);
......
......@@ -35,44 +35,39 @@
#include <kmessagebox.h>
#include <ktextedit.h>
dlgEditProfile::dlgEditProfile(QWidget *parent) : KDialog (parent)
dlgEditProfile::dlgEditProfile(QWidget *parent) : QDialog (parent)
{
//initial dialog size
setInitialSize (QSize (350, 350));
setCaption (i18n ("Edit profile"));
setWindowTitle (i18n ("Edit profile"));
setButtons (KDialog::Ok | KDialog::Cancel);
//create main dialog's widget
QWidget *page = new QWidget (this);
QGridLayout *layout = new QGridLayout (page);
setMainWidget (page);
QGridLayout *layout = new QGridLayout (this);
// create the button that opens the MUD listing
QPushButton *btlist = new QPushButton (i18n ("&Select from MUD list"), page);
QPushButton *btlist = new QPushButton (i18n ("&Select from MUD list"), this);
connect (btlist, SIGNAL (clicked()), this, SLOT (openMudList()));
// put some edit boxes there
QLabel *l1 = new QLabel (i18n ("Profile &name:"), page);
ed1 = new KLineEdit (page);
QLabel *l1 = new QLabel (i18n ("Profile &name:"), this);
ed1 = new KLineEdit (this);
ed1->setWhatsThis( i18n ("Enter profile name here. You can enter any "
"name, but it must be <b>unique</b>."));
QLabel *l2 = new QLabel (i18n ("&Server:"), page);
ed2 = new KLineEdit (page);
QLabel *l2 = new QLabel (i18n ("&Server:"), this);
ed2 = new KLineEdit (this);
ed2->setWhatsThis( i18n ("Enter address of the server where your MUD is running."));
QLabel *l3 = new QLabel (i18n ("&Port:"), page);
ed3 = new KRestrictedLine (page);
QLabel *l3 = new QLabel (i18n ("&Port:"), this);
ed3 = new KRestrictedLine (this);
ed3->setValidChars ("0123456789");
ed3->setWhatsThis( i18n ("Enter port on which your MUD running (usually some 4-digit number)."));
QLabel *l4 = new QLabel (i18n ("&Login name:"), page);
ed4 = new KLineEdit (page);
QLabel *l4 = new QLabel (i18n ("&Login name:"), this);
ed4 = new KLineEdit (this);
ed4->setWhatsThis( i18n ("Enter your login name on the MUD here.<p><i>This setting is optional.</i>"));
QLabel *l5 = new QLabel (i18n ("Pass&word:"), page);
ed5 = new KLineEdit (page);
QLabel *l5 = new QLabel (i18n ("Pass&word:"), this);
ed5 = new KLineEdit (this);
ed5->setEchoMode (KLineEdit::Password);
ed5->setWhatsThis( i18n ("Enter your password on the MUD here.<p><i>This setting is optional.</i>"));
QLabel *l6 = new QLabel (i18n ("&Connect sequence"), page);
connstr = new KTextEdit (page);
QLabel *l6 = new QLabel (i18n ("&Connect sequence"), this);
connstr = new KTextEdit (this);
connstr->setAcceptRichText (false);
connstr->setWordWrapMode (QTextOption::NoWrap);
connstr->setWhatsThis( i18n ("Commands to be sent to the MUD after "
......@@ -114,6 +109,11 @@ dlgEditProfile::~dlgEditProfile()
//nothing here
}
QSize dlgEditProfile::sizeHint() const
{
return QSize (350, 350);
}
QString dlgEditProfile::name ()
{
return ed1->text ();
......@@ -207,5 +207,3 @@ void dlgEditProfile::slotOk ()
}
}
#include "dlgeditprofile.moc"
......@@ -19,7 +19,7 @@
#ifndef DLGEDITPROFILE_H
#define DLGEDITPROFILE_H
#include <kdialog.h>
#include <QDialog>
class KLineEdit;
class KTextEdit;
......@@ -30,12 +30,13 @@ Dialog used to edit basic profile settings (server, port, ...)
*@author Tomas Mecir
*/
class dlgEditProfile : public KDialog {
class dlgEditProfile : public QDialog {
Q_OBJECT
public:
dlgEditProfile (QWidget *parent=0);
~dlgEditProfile();
virtual QSize sizeHint() const override;
/** values in LineEdits */
QString name ();
QString server ();
......
......@@ -24,19 +24,17 @@
#include <klocale.h>
#include <kvbox.h>
dlgGrabKey::dlgGrabKey (QWidget *parent) : KDialog (parent)
dlgGrabKey::dlgGrabKey (QWidget *parent) : QDialog (parent)
{
KMuddy::self()->setGrabDialog (this);
//initial dialog size
setInitialSize (QSize (200, 80));
setCaption (i18n ("Keygrabber"));
setCWindowTitle (i18n ("Keygrabber"));
setButtons (KDialog::Cancel);
setDefaultButton (KDialog::Cancel);
//create main dialog's widget
KVBox *vbox = new KVBox (this);
setMainWidget (vbox);
new QLabel (i18n ("Press the desired shortcut..."), vbox);
}
......@@ -45,6 +43,11 @@ dlgGrabKey::~dlgGrabKey ()
KMuddy::self()->setGrabDialog (0);
}
QSize dlgGrabKey::sizeHint() const
{
return QSize (200, 80);
}
void dlgGrabKey::gotKey (int key, Qt::KeyboardModifiers state)
{
_key = key;
......@@ -52,5 +55,3 @@ void dlgGrabKey::gotKey (int key, Qt::KeyboardModifiers state)
accept ();
}
#include "dlggrabkey.moc"
......@@ -18,7 +18,7 @@
#ifndef DLGGRABKEY_H
#define DLGGRABKEY_H
#include <kdialog.h>
#include <QDialog>
/**
This dialog is used to grab keys. It works in conjuction with event filter
......@@ -33,11 +33,12 @@ KDE people say...). I don't use QAction here, so macro keys are not affected.
*@author Tomas Mecir
*/
class dlgGrabKey : public KDialog {
class dlgGrabKey : public QDialog {
Q_OBJECT
public:
dlgGrabKey (QWidget *parent=0);
~dlgGrabKey ();
virtual QSize sizeHint() const override;
/** key is here - sent by KMuddy::eventFilter */
void gotKey (int key, Qt::KeyboardModifiers state);
......
......@@ -17,49 +17,50 @@
#include "dlgimportexportprofile.h"
#include <kfiledialog.h>
#include <klineedit.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kpushbutton.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
dlgImportExportProfile::dlgImportExportProfile (bool isImport,
QWidget *parent) : KDialog (parent)
QWidget *parent) : QDialog (parent)
{
import = isImport;
//initial dialog size
setInitialSize (QSize (300, 150));
setCaption (isImport ? i18n ("Import profile") : i18n ("Export profile"));
setButtons (KDialog::Ok | KDialog::Cancel);
//create main dialog's widget
QWidget *page = new QWidget (this);
QGridLayout *layout = new QGridLayout (page);
setWindowTitle (isImport ? i18n ("Import profile") : i18n ("Export profile"));
setMainWidget (page);
QGridLayout *layout = new QGridLayout (this);
QLabel *l1 = new QLabel (i18n ("&Profile name"), page);
QLabel *l1 = new QLabel (i18n ("&Profile name"), this);
if (isImport)
{
edprofile = new KLineEdit (page);
edprofile = new QLineEdit (this);
l1->setBuddy (edprofile);
}
else
{
cbprofile = new QComboBox (page);
cbprofile = new QComboBox (this);
//cProfiles p;
//cbprofile->addItems (p.getprofiles());
l1->setBuddy (cbprofile);
}
QLabel *l2 = new QLabel (isImport ? i18n ("&Import from") :
i18n ("&Export to"), page);
edfname = new KLineEdit (page);
i18n ("&Export to"), this);
edfname = new QLineEdit (this);
l2->setBuddy (edfname);
KPushButton *button = new KPushButton (i18n ("Browse..."), page);
QPushButton *button = new QPushButton (i18n ("Browse..."), this);
QDialogButtonBox *buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
connect (buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect (buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->setSpacing (10);
layout->addWidget (l1, 0, 0);
layout->addWidget (l2, 1, 0);
......@@ -69,6 +70,7 @@ dlgImportExportProfile::dlgImportExportProfile (bool isImport,
layout->addWidget (cbprofile, 0, 1);
layout->addWidget (edfname, 1, 1);
layout->addWidget (button, 1, 2);
layout->addWidget (buttons, 0, 3, 0, 2);
layout->setRowStretch (2, 10);
connect (button, SIGNAL (clicked()), this, SLOT (browse ()));
......@@ -79,6 +81,11 @@ dlgImportExportProfile::~dlgImportExportProfile ()
}
QSize dlgImportExportProfile::sizeHint() const
{
return QSize (300, 150);
}
void dlgImportExportProfile::doThings ()
{
KMessageBox::sorry (this, i18n ("I am sorry, but import and export is currently disabled. The functionality should be re-enabled before the final release."));
......@@ -121,19 +128,15 @@ void dlgImportExportProfile::browse ()
{
if (import)
{
QString n = KFileDialog::getOpenFileName (QString(),
QString(), this, i18n ("Choose file with profile"));
QString n = QFileDialog::getOpenFileName (this, i18n ("Choose file with profile"));
if (!(n.isEmpty()))
edfname->setText (n);
}
else
{
QString n = KFileDialog::getSaveFileName (QString(),
QString(), this, i18n ("Enter target file"));
QString n = QFileDialog::getSaveFileName (this, i18n ("Enter target file"));
if (!(n.isEmpty()))
edfname->setText (n);
}
}