Commit 891ee774 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

port to KPToolDialog

parent 61c84fcf
......@@ -42,15 +42,15 @@ KPAboutData::KPAboutData(const KLocalizedString& pluginName,
enum LicenseKey licenseType,
const KLocalizedString& pluginDescription,
const KLocalizedString& copyrightStatement)
: KAboutData (QByteArray("kipiplugins"), // Name without minus separator for KDE bug report.
QByteArray(),
pluginName,
kipipluginsVersion().toAscii(),
KLocalizedString(),
licenseType,
copyrightStatement,
pluginDescription,
QByteArray("http://www.digikam.org"))
: KAboutData(QByteArray("kipiplugins"), // Name without minus separator for KDE bug report.
QByteArray(),
pluginName,
kipipluginsVersion().toAscii(),
KLocalizedString(),
licenseType,
copyrightStatement,
pluginDescription,
QByteArray("http://www.digikam.org"))
{
if (KGlobal::hasMainComponent())
{
......@@ -76,4 +76,10 @@ KPAboutData::KPAboutData(const KLocalizedString& pluginName,
setShortDescription(shortDesc);
}
KPAboutData::KPAboutData(const KPAboutData& other)
: KAboutData(other)
{
handbookEntry = other.handbookEntry;
}
} // namespace KIPIPlugins
......@@ -46,6 +46,8 @@ public:
const KLocalizedString& pluginDescription = KLocalizedString(),
const KLocalizedString& copyrightStatement = ki18n("Copyright 2003-2012, kipi-plugins team"));
KPAboutData(const KPAboutData& other);
public:
QString handbookEntry;
......
......@@ -62,8 +62,6 @@ public:
"(c) 2010-2011, Jens Mueller\n"
"(c) 2012, Smit Mehta"))
{
handbookEntry = QString("dngconverter");
addAuthor(ki18n("Gilles Caulier"),
ki18n("Author"),
"caulier dot gilles at gmail dot com");
......@@ -75,6 +73,8 @@ public:
addAuthor(ki18n("Smit Mehta"),
ki18n("Developer"),
"smit dot meh at gmail dot com");
handbookEntry = QString("dngconverter");
}
~DNGConverterAboutData(){}
......
......@@ -124,7 +124,7 @@ public:
EnfuseSettingsWidget* enfuseSettingsBox;
KPSaveSettingsWidget* saveSettingsBox;
KPSaveSettingsWidget* saveSettingsBox;
BracketStackList* bracketStack;
EnfuseStackList* enfuseStack;
......@@ -135,7 +135,7 @@ public:
};
ExpoBlendingDlg::ExpoBlendingDlg(Manager* const mngr, QWidget* const parent)
: KDialog(parent), d(new ExpoBlendingDlgPriv)
: KPToolDialog(parent), d(new ExpoBlendingDlgPriv)
{
d->mngr = mngr;
......@@ -158,6 +158,7 @@ ExpoBlendingDlg::ExpoBlendingDlg(Manager* const mngr, QWidget* const parent)
setButtonToolTip(Close, i18n("Exit this tool"));
setModal(false);
setAboutData(new KPAboutData(*d->mngr->about()));
// ---------------------------------------------------------------
......@@ -209,20 +210,6 @@ ExpoBlendingDlg::ExpoBlendingDlg(Manager* const mngr, QWidget* const parent)
grid->setColumnStretch(0, 10);
grid->setColumnStretch(1, 5);
// ---------------------------------------------------------------
// About data and help button.
disconnect(this, SIGNAL(helpClicked()),
this, SLOT(slotHelp()));
KHelpMenu* helpMenu = new KHelpMenu(this, d->mngr->about(), false);
helpMenu->menu()->removeAction(helpMenu->menu()->actions().first());
QAction *handbook = new QAction(i18n("Handbook"), this);
connect(handbook, SIGNAL(triggered(bool)),
this, SLOT(slotHelp()));
helpMenu->menu()->insertAction(helpMenu->menu()->actions().first(), handbook);
button(Help)->setMenu(helpMenu->menu());
// ---------------------------------------------------------------
connect(this, SIGNAL(closeClicked()),
......@@ -273,11 +260,6 @@ ExpoBlendingDlg::~ExpoBlendingDlg()
delete d;
}
void ExpoBlendingDlg::slotHelp()
{
KToolInvocation::invokeHelp("expoblending", "kipi-plugins");
}
void ExpoBlendingDlg::closeEvent(QCloseEvent* e)
{
if (!e) return;
......
......@@ -31,12 +31,12 @@
// KDE includes
#include <kdialog.h>
#include <kurl.h>
// Local includes
#include "actions.h"
#include "kptooldialog.h"
class QCloseEvent;
......@@ -54,7 +54,7 @@ class Manager;
class ActionData;
class ExpoBlendingAboutData;
class ExpoBlendingDlg : public KDialog
class ExpoBlendingDlg : public KPToolDialog
{
Q_OBJECT
......@@ -81,7 +81,6 @@ private Q_SLOTS:
void slotDefault();
void slotClose();
void slotHelp();
void slotPreview();
void slotProcess();
void slotAbort();
......
......@@ -75,7 +75,7 @@ public:
};
ImportWizardDlg::ImportWizardDlg(Manager* const mngr, QWidget* const parent)
: KAssistantDialog(parent), d(new ImportWizardDlgPriv)
: KPWizardDialog(parent), d(new ImportWizardDlgPriv)
{
setModal(false);
setWindowTitle(i18n("Exposure Blending Import Wizard"));
......@@ -86,28 +86,15 @@ ImportWizardDlg::ImportWizardDlg(Manager* const mngr, QWidget* const parent)
d->preProcessingPage = new PreProcessingPage(d->mngr, this);
d->lastPage = new LastPage(d->mngr, this);
// ---------------------------------------------------------------
// About data and help button.
disconnect(this, SIGNAL(helpClicked()),
this, SLOT(slotHelp()));
KHelpMenu* helpMenu = new KHelpMenu(this, d->mngr->about(), false);
helpMenu->menu()->removeAction(helpMenu->menu()->actions().first());
QAction* handbook = new QAction(i18n("Handbook"), this);
connect(handbook, SIGNAL(triggered(bool)),
this, SLOT(slotHelp()));
helpMenu->menu()->insertAction(helpMenu->menu()->actions().first(), handbook);
button(Help)->setMenu(helpMenu->menu());
setAboutData(new KPAboutData(*d->mngr->about()));
// ---------------------------------------------------------------
QDesktopWidget* desktop = QApplication::desktop();
int screen = desktop->screenNumber();
QRect srect = desktop->availableGeometry(screen);
int screen = desktop->screenNumber();
QRect srect = desktop->availableGeometry(screen);
resize(800 <= srect.width() ? 800 : srect.width(),
750 <= srect.height() ? 750 : srect.height());
// resize(800, 580);
connect(d->introPage, SIGNAL(signalIntroPageIsValid(bool)),
this, SLOT(slotIntroPageIsValid(bool)));
......@@ -126,11 +113,6 @@ ImportWizardDlg::~ImportWizardDlg()
delete d;
}
void ImportWizardDlg::slotHelp()
{
KToolInvocation::invokeHelp("expoblending", "kipi-plugins");
}
Manager* ImportWizardDlg::manager() const
{
return d->mngr;
......
......@@ -32,11 +32,11 @@
// KDE includes
#include <kurl.h>
#include <kassistantdialog.h>
// Local includes
#include "actions.h"
#include "kptooldialog.h"
class KPageWidgetItem;
......@@ -53,7 +53,7 @@ namespace KIPIExpoBlendingPlugin
class Manager;
class ExpoBlendingAboutData;
class ImportWizardDlg : public KAssistantDialog
class ImportWizardDlg : public KPWizardDialog
{
Q_OBJECT
......@@ -74,7 +74,6 @@ private Q_SLOTS:
void slotIntroPageIsValid(bool);
void slotItemsPageIsValid(bool);
void slotPreProcessed(const ItemUrlsMap&);
void slotHelp();
private:
......
......@@ -39,7 +39,7 @@ public:
: KPAboutData(ki18n("Exposure Blending"), 0,
KAboutData::License_GPL,
ki18n("A tool to blend bracketed images"),
ki18n("(c) 2009-2011, Gilles Caulier"))
ki18n("(c) 2009-2012, Gilles Caulier"))
{
addAuthor(ki18n("Gilles Caulier"),
ki18n("Author"),
......@@ -48,6 +48,8 @@ public:
addAuthor(ki18n("Johannes Wienke"),
ki18n("Developer"),
"languitar at semipol dot de");
handbookEntry = QString("expoblending");
}
~ExpoBlendingAboutData(){}
......
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