Commit 0230081d authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

port to KPToolDialog

parent 889b4b9f
......@@ -75,7 +75,7 @@ namespace KIPISmugPlugin
SmugWindow::SmugWindow(Interface* const interface, const QString& tmpFolder,
bool import, QWidget* const /*parent*/)
: KDialog(0)
: KPToolDialog(0)
{
m_tmpPath.clear();
m_tmpDir = tmpFolder;
......@@ -126,27 +126,19 @@ SmugWindow::SmugWindow(Interface* const interface, const QString& tmpFolder,
// ------------------------------------------------------------------------
m_about = new KPAboutData(ki18n("Smug Import/Export"), 0,
KAboutData::License_GPL,
ki18n("A Kipi plugin to import/export image collections "
"from/to the SmugMug web service."),
ki18n("(c) 2005-2008, Vardhman Jain\n"
"(c) 2008-2012, Gilles Caulier\n"
"(c) 2008-2009, Luka Renko"));
KPAboutData* about = new KPAboutData(ki18n("Smug Import/Export"), 0,
KAboutData::License_GPL,
ki18n("A Kipi plugin to import/export image collections "
"from/to the SmugMug web service."),
ki18n("(c) 2005-2008, Vardhman Jain\n"
"(c) 2008-2012, Gilles Caulier\n"
"(c) 2008-2009, Luka Renko"));
m_about->addAuthor(ki18n("Luka Renko"), ki18n("Author and maintainer"),
"lure at kubuntu dot org");
about->addAuthor(ki18n("Luka Renko"), ki18n("Author and maintainer"),
"lure at kubuntu dot org");
disconnect(this, SIGNAL(helpClicked()),
this, SLOT(slotHelp()) );
KHelpMenu* helpMenu = new KHelpMenu(this, m_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());
about->handbookEntry = QString("smug");
setAboutData(about);
// ------------------------------------------------------------------------
......@@ -191,6 +183,7 @@ SmugWindow::SmugWindow(Interface* const interface, const QString& tmpFolder,
connect(m_talker, SIGNAL(signalListPhotosDone(int,QString,QList<SmugPhoto>)),
this, SLOT(slotListPhotosDone(int,QString,QList<SmugPhoto>)));
connect(m_talker, SIGNAL(signalListAlbumTmplDone(int,QString,QList<SmugAlbumTmpl>)),
this, SLOT(slotListAlbumTmplDone(int,QString,QList<SmugAlbumTmpl>)));
......@@ -236,15 +229,9 @@ SmugWindow::SmugWindow(Interface* const interface, const QString& tmpFolder,
SmugWindow::~SmugWindow()
{
delete m_talker;
delete m_about;
}
void SmugWindow::slotHelp()
{
KToolInvocation::invokeHelp("smug", "kipi-plugins");
}
void SmugWindow::closeEvent(QCloseEvent *e)
void SmugWindow::closeEvent(QCloseEvent* e)
{
if (!e) return;
......
......@@ -30,16 +30,13 @@
#include <QList>
// KDE includes
#include <kdialog.h>
// LibKIPI includes
#include <libkipi/interface.h>
// local includes
// Local includes
#include "kptooldialog.h"
#include "smugitem.h"
class QCloseEvent;
......@@ -48,16 +45,6 @@ class KUrl;
class KProgressDialog;
class KPasswordDialog;
namespace KIPI
{
class Interface;
}
namespace KIPIPlugins
{
class KPAboutData;
}
using namespace KIPI;
using namespace KIPIPlugins;
......@@ -68,7 +55,7 @@ class SmugTalker;
class SmugWidget;
class SmugNewAlbum;
class SmugWindow : public KDialog
class SmugWindow : public KPToolDialog
{
Q_OBJECT
......@@ -105,7 +92,6 @@ private Q_SLOTS:
void slotUserChangeRequest(bool anonymous);
void slotReloadAlbumsRequest();
void slotNewAlbumRequest();
void slotHelp();
void slotStartTransfer();
void slotStopAndCloseProgressBar();
void slotImageListChanged();
......@@ -151,8 +137,6 @@ private:
SmugNewAlbum* m_albumDlg;
Interface* m_interface;
KPAboutData* m_about;
};
} // namespace KIPISmugPlugin
......
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