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

factoring

parent e4015fa1
......@@ -87,15 +87,7 @@ Plugin_RemoveRedEyes::~Plugin_RemoveRedEyes()
void Plugin_RemoveRedEyes::activate()
{
Interface* interface = dynamic_cast<Interface*> (parent());
if (!interface)
{
kError() << "Kipi interface is null!";
return;
}
RemoveRedEyesWindow* window = new RemoveRedEyesWindow(interface);
RemoveRedEyesWindow* window = new RemoveRedEyesWindow();
window->show();
}
......
......@@ -92,8 +92,7 @@ public:
unprocessedSettingsBox(0),
storageSettingsBox(0),
locator(0),
saveMethod(0),
interface(0)
saveMethod(0)
{}
static const QString configGroupName;
......@@ -138,8 +137,6 @@ public:
Locator* locator;
SaveMethod* saveMethod;
Interface* interface;
};
const QString RemoveRedEyesWindow::RemoveRedEyesWindowPriv::configGroupName("RemoveRedEyes Settings");
const QString RemoveRedEyesWindow::RemoveRedEyesWindowPriv::configStorageModeEntry("Storage Mode");
......@@ -152,7 +149,7 @@ const QString RemoveRedEyesWindow::RemoveRedEyesWindowPriv::configLocatorDefault
// --------------------------------------------------------
RemoveRedEyesWindow::RemoveRedEyesWindow(Interface* const interface)
RemoveRedEyesWindow::RemoveRedEyesWindow()
: KPToolDialog(0), d(new RemoveRedEyesWindowPriv)
{
setWindowTitle(i18n("Automatic Red-Eye Removal"));
......@@ -160,7 +157,6 @@ RemoveRedEyesWindow::RemoveRedEyesWindow(Interface* const interface)
setDefaultButton(Close);
setModal(false);
d->interface = interface;
KPHostSettings hSettings;
d->thread = new WorkerThread(this, hSettings.metadataSettings().updateFileTimeStamp);
d->runtype = WorkerThread::Testrun;
......@@ -313,7 +309,7 @@ RemoveRedEyesWindow::RemoveRedEyesWindow(Interface* const interface)
// ----------------------------------------------------------
ImageCollection images = interface->currentSelection();
ImageCollection images = iface()->currentSelection();
if (images.isValid())
{
......
......@@ -28,11 +28,6 @@
#include "kptooldialog.h"
namespace KIPI
{
class Interface;
}
using namespace KIPI;
using namespace KIPIPlugins;
......@@ -56,7 +51,7 @@ public:
public:
RemoveRedEyesWindow(Interface* const interface);
RemoveRedEyesWindow();
~RemoveRedEyesWindow();
Q_SIGNALS:
......
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