1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a plugin to apply Distortion FX to an image.
9
* Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
* Original Distortion algorithms copyrighted 2004-2005 by
12
* Pieter Z. Voloshyn <pieter dot voloshyn at gmail dot com>.
14
* This program is free software; you can redistribute it
15
* and/or modify it under the terms of the GNU General
16
* Public License as published by the Free Software Foundation;
17
* either version 2, or (at your option)
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU General Public License for more details.
25
* ============================================================ */
28
#include "imageplugin_distortionfx.moc"
33
#include <kgenericfactory.h>
34
#include <klibloader.h>
36
#include <kactioncollection.h>
38
#include <kapplication.h>
43
#include "distortionfxtool.h"
45
using namespace DigikamDistortionFXImagesPlugin;
47
K_PLUGIN_FACTORY( DistortionFXFactory, registerPlugin<ImagePlugin_DistortionFX>(); )
48
K_EXPORT_PLUGIN ( DistortionFXFactory("digikamimageplugin_distortionfx") )
50
ImagePlugin_DistortionFX::ImagePlugin_DistortionFX(QObject *parent, const QVariantList &)
51
: Digikam::ImagePlugin(parent, "ImagePlugin_DistortionFX")
53
m_distortionfxAction = new KAction(KIcon("distortionfx"), i18n("Distortion Effects..."), this);
54
actionCollection()->addAction("imageplugin_distortionfx", m_distortionfxAction );
56
connect(m_distortionfxAction, SIGNAL(triggered(bool) ),
57
this, SLOT(slotDistortionFX()));
59
setXMLFile( "digikamimageplugin_distortionfx_ui.rc" );
61
kDebug() << "ImagePlugin_DistortionFX plugin loaded";
64
ImagePlugin_DistortionFX::~ImagePlugin_DistortionFX()
68
void ImagePlugin_DistortionFX::setEnabledActions(bool enable)
70
m_distortionfxAction->setEnabled(enable);
73
void ImagePlugin_DistortionFX::slotDistortionFX()
75
DistortionFXTool *tool = new DistortionFXTool(this);