Commit d28bf283 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

new method to get KIPI interface instance

parent bc2c612f
......@@ -33,6 +33,11 @@
#include <kpushbutton.h>
#include <ktoolinvocation.h>
// Libkipi includes
#include <libkipi/interface.h>
#include <libkipi/pluginloader.h>
// Local includes
#include "kpaboutdata.h"
......@@ -49,8 +54,17 @@ public:
{
about = 0;
dialog = 0;
}
iface = 0;
PluginLoader* pl = PluginLoader::instance();
if (pl)
{
iface = pl->interface();
}
}
Interface* iface;
KPAboutData* about;
KDialog* dialog;
};
......@@ -67,6 +81,11 @@ KPDialogBase::~KPDialogBase()
delete d;
}
Interface* KPDialogBase::iface() const
{
return d->iface;
}
void KPDialogBase::setAboutData(KPAboutData* const data, KPushButton* help)
{
if (!data || !d->dialog) return;
......
......@@ -35,6 +35,13 @@
class KPushButton;
namespace KIPI
{
class Interface;
}
using namespace KIPI;
namespace KIPIPlugins
{
......@@ -49,6 +56,8 @@ public:
void setAboutData(KPAboutData* const data, KPushButton* help=0);
Interface* iface() const;
private:
class KPDialogBasePrivate;
......
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