Commit 0f08cf6b authored by Richard Lärkäng's avatar Richard Lärkäng

KDialogBase -> KDialog

svn path=/trunk/KDE/kdemultimedia/juk/; revision=553701
parent 907fde1a
......@@ -13,7 +13,7 @@
* *
***************************************************************************/
#include <kdialogbase.h>
#include <kdialog.h>
#include <kglobal.h>
#include <kstdguiitem.h>
#include <klocale.h>
......@@ -70,11 +70,16 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete)
//////////////////////////////////////////////////////////////////////////////
DeleteDialog::DeleteDialog(QWidget *parent, const char *name) :
KDialogBase(Swallow, Qt::WStyle_DialogBorder, parent, name,
true /* modal */, i18n("About to delete selected files"),
Ok | Cancel, Cancel /* Default */, true /* separator */),
KDialog(parent, Qt::WStyle_DialogBorder),
m_trashGuiItem(i18n("&Send to Trash"), "trashcan_full")
{
setObjectName(name);
setModal(true);
setCaption(i18n("About to delete selected files"));
setButtons(Ok | Cancel);
setDefaultButton(Cancel);
enableButtonSeparator(true);
m_widget = new DeleteWidget(this, "delete_dialog_widget");
setMainWidget(m_widget);
......@@ -108,7 +113,7 @@ void DeleteDialog::accept()
messageGroup.writeEntry("deleteInsteadOfTrash", shouldDelete());
messageGroup.sync();
KDialogBase::accept();
KDialog::accept();
}
void DeleteDialog::slotShouldDelete(bool shouldDelete)
......
......@@ -40,7 +40,7 @@ protected slots:
virtual void slotShouldDelete(bool shouldDelete);
};
class DeleteDialog : public KDialogBase
class DeleteDialog : public KDialog
{
Q_OBJECT
......
......@@ -27,15 +27,17 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
DirectoryList::DirectoryList(const QStringList &directories,
DirectoryList::DirectoryList(const QStringList &directories,
bool importPlaylists,
QWidget *parent) :
KDialog(parent, i18n("Folder List"), KDialog::Ok | KDialog::Cancel),
KDialog(parent),
m_dirList(directories),
m_importPlaylists(importPlaylists)
{
setCaption(i18n("Folder List"));
setModal( true );
enableButtonSeparator( true );
setButtons(KDialog::Ok | KDialog::Cancel);
m_base = new DirectoryListBase(this);
......
......@@ -60,14 +60,20 @@
#include "playlist.h"
#include "coverinfo.h"
class ConfirmationDialog : public KDialogBase
class ConfirmationDialog : public KDialog
{
public:
ConfirmationDialog(const QMap<QString, QString> &files,
QWidget *parent = 0, const char *name = 0)
: KDialogBase(parent, name, true, i18n("Warning"), Ok | Cancel)
: KDialog(parent)
{
KVBox *vbox = makeVBoxMainWidget();
setObjectName(name);
setModal(true);
setCaption(i18n("Warning"));
setButtons(Ok | Cancel);
KVBox *vbox = new KVBox(this);
setMainWidget(vbox);
KVBox *hbox = new KVBox(vbox);
QLabel *l = new QLabel(hbox);
......
......@@ -20,10 +20,14 @@
#include "filerenamerconfigdlg.h"
FileRenamerConfigDlg::FileRenamerConfigDlg(QWidget *parent) :
KDialogBase(parent, "file renamer dialog", true,
i18n("File Renamer Options"), Ok | Cancel),
KDialog(parent),
m_renamerWidget(new FileRenamerWidget(this))
{
setObjectName("file renamer dialog");
setModal(true);
setCaption(i18n("File Renamer Options"));
setButtons(Ok | Cancel);
m_renamerWidget->setMinimumSize(400, 300);
setMainWidget(m_renamerWidget);
......@@ -35,7 +39,7 @@ void FileRenamerConfigDlg::accept()
m_renamerWidget->saveConfig();
KDialogBase::accept();
KDialog::accept();
}
#include "filerenamerconfigdlg.moc"
......
......@@ -20,7 +20,7 @@
class FileRenamerWidget;
class FileRenamerConfigDlg : public KDialogBase
class FileRenamerConfigDlg : public KDialog
{
Q_OBJECT
public:
......
......@@ -126,10 +126,14 @@ void FileRenamerTagOptions::slotEmptyActionChanged()
TagOptionsDialog::TagOptionsDialog(QWidget *parent,
const TagRenamerOptions &options,
unsigned categoryNumber) :
KDialogBase(parent, 0, true, i18n("File Renamer"), Ok | Cancel),
KDialog(parent, 0),
m_options(options),
m_categoryNumber(categoryNumber)
{
setModal(true);
setCaption(i18n("File Renamer"));
setButtons(Ok|Cancel);
loadConfig();
m_widget = new FileRenamerTagOptions(this, m_options);
......@@ -143,7 +147,7 @@ void TagOptionsDialog::accept()
m_options = m_widget->options();
saveConfig();
KDialogBase::accept();
KDialog::accept();
}
void TagOptionsDialog::loadConfig()
......
......@@ -16,7 +16,7 @@
#ifndef FILERENAMEROPTIONS_H
#define FILERENAMEROPTIONS_H
#include <kdialogbase.h>
#include <kdialog.h>
#include "ui_filerenameroptionsbase.h"
#include "tagrenameroptions.h"
......@@ -48,7 +48,7 @@ private:
*
* @author Michael Pyne <michael.pyne@kdemail.net>
*/
class TagOptionsDialog : public KDialogBase
class TagOptionsDialog : public KDialog
{
Q_OBJECT
......
......@@ -15,7 +15,7 @@
#ifndef GOOGLEFETCHER_H
#define GOOGLEFETCHER_H
#include <kdialogbase.h>
#include <kdialog.h>
#include <qpixmap.h>
#include <qstringlist.h>
......
......@@ -34,15 +34,22 @@ GoogleFetcherDialog::GoogleFetcherDialog(const QString &name,
const GoogleImageList &imageList,
const FileHandle &file,
QWidget *parent) :
KDialogBase(parent, name.latin1(), true, QString::null,
Ok | Cancel | User1 , NoDefault, true),
KDialog(parent),
m_pixmap(QPixmap()),
m_imageList(imageList),
m_takeIt(false),
m_newSearch(false),
m_file(file)
{
disableResize();
setObjectName(name.latin1());
setModal(true);
setCaption(QString::null);
setButtons(Ok | Cancel | User1);
setDefaultButton(NoDefault);
enableButtonSeparator(true);
#warning KDE4 How to port this?
//disableResize();
Q3HBox *mainBox = new Q3HBox(this);
m_iconWidget = new K3IconView(mainBox);
......@@ -112,7 +119,7 @@ void GoogleFetcherDialog::refreshScreen(GoogleImageList &imageList)
int GoogleFetcherDialog::exec()
{
setLayout();
return KDialogBase::exec();
return KDialog::exec();
}
void GoogleFetcherDialog::slotOk()
......
......@@ -25,7 +25,7 @@
class KUrl;
class GoogleFetcherDialog : public KDialogBase
class GoogleFetcherDialog : public KDialog
{
Q_OBJECT
......
......@@ -78,8 +78,11 @@ const KeyDialog::KeyInfo KeyDialog::keyInfo[] = {
const uint KeyDialog::keyInfoCount = sizeof(KeyDialog::keyInfo) / sizeof(KeyDialog::keyInfo[0]);
KeyDialog::KeyDialog(KActionCollection *actionCollection, QWidget *parent)
: KDialog(parent, i18n("Configure Shortcuts"), Default | Ok | Cancel)
: KDialog(parent)
{
setCaption(i18n("Configure Shortcuts"));
setButtons(Default | Ok | Cancel);
// Read key group from configuration
KConfigGroup config(KGlobal::config(), "Shortcuts");
......
......@@ -23,9 +23,15 @@
#include <QKeyEvent>
TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Tag Guesser Configuration"),
Ok | Cancel, Ok, true)
: KDialog(parent)
{
setObjectName(name);
setModal(true);
setCaption(i18n("Tag Guesser Configuration"));
setButtons(Ok | Cancel);
setDefaultButton(Ok);
enableButtonSeparator(true);
m_child = new TagGuesserConfigDlgWidget(this, "child");
setMainWidget(m_child);
......@@ -70,7 +76,7 @@ void TagGuesserConfigDlg::accept()
for (Q3ListViewItem *it = m_child->lvSchemes->firstChild(); it; it = it->nextSibling())
schemes += it->text(0);
TagGuesser::setSchemeStrings(schemes);
KDialogBase::accept();
KDialog::accept();
}
void TagGuesserConfigDlg::slotCurrentChanged(Q3ListViewItem *item)
......
......@@ -9,12 +9,12 @@
#ifndef TAGGUESSERCONFIGDLG_H
#define TAGGUESSERCONFIGDLG_H
#include <kdialogbase.h>
#include <kdialog.h>
class Q3ListViewItem;
class TagGuesserConfigDlgWidget;
class TagGuesserConfigDlg : public KDialogBase
class TagGuesserConfigDlg : public KDialog
{
Q_OBJECT
public:
......
......@@ -48,8 +48,14 @@ private:
TrackPickerDialog::TrackPickerDialog(const QString &name,
const KTRMResultList &results,
QWidget *parent) :
KDialogBase(parent, name.latin1(), true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true)
KDialog(parent)
{
setObjectName(name.latin1());
setModal(true);
setCaption(i18n("Internet Tag Guesser"));
setButtons(Ok | Cancel);
enableButtonSeparator(true);
m_base = new TrackPickerDialogBase(this);
setMainWidget(m_base);
......@@ -86,7 +92,7 @@ KTRMResult TrackPickerDialog::result() const
int TrackPickerDialog::exec()
{
int dialogCode = KDialogBase::exec();
int dialogCode = KDialog::exec();
// Only return true if an item was selected.
......
......@@ -20,13 +20,13 @@
#if HAVE_TUNEPIMP
#include <kdialogbase.h>
#include <kdialog.h>
#include "musicbrainzquery.h"
class TrackPickerDialogBase;
class TrackPickerDialog : public KDialogBase
class TrackPickerDialog : public KDialog
{
Q_OBJECT
......
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