Commit 3b541027 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

port to KPWizardDialog

parent 69d68698
......@@ -33,9 +33,7 @@
#include <kmenu.h>
#include <klocale.h>
#include <khelpmenu.h>
#include <kpushbutton.h>
#include <ktoolinvocation.h>
#include <kmessagebox.h>
// LibKIPI includes
......@@ -83,7 +81,7 @@ struct ImportWizardDlg::ImportWizardDlgPriv
};
ImportWizardDlg::ImportWizardDlg(Manager* const mngr, QWidget* const parent)
: KAssistantDialog(parent), d(new ImportWizardDlgPriv)
: KPWizardDialog(parent), d(new ImportWizardDlgPriv)
{
setModal(false);
setWindowTitle(i18n("Panorama Creator Wizard"));
......@@ -96,28 +94,18 @@ ImportWizardDlg::ImportWizardDlg(Manager* const mngr, QWidget* const parent)
d->previewPage = new PreviewPage(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());
// ---------------------------------------------------------------
connect(d->introPage, SIGNAL(signalIntroPageIsValid(bool)),
this, SLOT(slotIntroPageIsValid(bool)));
......@@ -332,9 +320,4 @@ void ImportWizardDlg::slotLastPageIsValid(bool isValid)
setValid(d->lastPage->page(), isValid);
}
void ImportWizardDlg::slotHelp()
{
KToolInvocation::invokeHelp("panorama", "kipi-plugins");
}
} // namespace KIPIPanoramaPlugin
......@@ -33,11 +33,11 @@
// KDE includes
#include <kurl.h>
#include <kassistantdialog.h>
// Local includes
#include "actions.h"
#include "kptooldialog.h"
class KPageWidgetItem;
......@@ -47,6 +47,7 @@ namespace KIPI
}
using namespace KIPI;
using namespace KIPIPlugins;
namespace KIPIPanoramaPlugin
{
......@@ -54,7 +55,7 @@ namespace KIPIPanoramaPlugin
class Manager;
class PanoramaAboutData;
class ImportWizardDlg : public KAssistantDialog
class ImportWizardDlg : public KPWizardDialog
{
Q_OBJECT
......@@ -81,7 +82,6 @@ private Q_SLOTS:
void slotStitchingFinished(bool);
void slotCopyFinished(bool);
void slotLastPageIsValid(bool);
void slotHelp();
private:
......
......@@ -39,7 +39,7 @@ public:
: KPAboutData(ki18n("Panorama Stitching"), 0,
KAboutData::License_GPL,
ki18n("A tool to automatically stitch images into panorama"),
ki18n("(c) 2011, Benjamin Girault"))
ki18n("(c) 2011-2012, Benjamin Girault"))
{
addAuthor(ki18n("Benjamin Girault"),
ki18n("Author"),
......@@ -48,9 +48,13 @@ public:
addAuthor(ki18n("Gilles Caulier"),
ki18n("Developer"),
"caulier dot gilles at gmail dot com");
handbookEntry = QString("panorama");
}
~PanoramaAboutData(){}
~PanoramaAboutData()
{
}
};
} // namespace KIPIPanoramaPlugin
......
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