~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to imageplugins/distortionfx/imageplugin_distortionfx.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 *
3
 
 * This file is a part of digiKam project
4
 
 * http://www.digikam.org
5
 
 *
6
 
 * Date        : 2005-02-11
7
 
 * Description : a plugin to apply Distortion FX to an image.
8
 
 *
9
 
 * Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
 
 *
11
 
 * Original Distortion algorithms copyrighted 2004-2005 by
12
 
 * Pieter Z. Voloshyn <pieter dot voloshyn at gmail dot com>.
13
 
 *
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)
18
 
 * any later version.
19
 
 *
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.
24
 
 *
25
 
 * ============================================================ */
26
 
 
27
 
 
28
 
#include "imageplugin_distortionfx.moc"
29
 
 
30
 
// KDE includes
31
 
 
32
 
#include <klocale.h>
33
 
#include <kgenericfactory.h>
34
 
#include <klibloader.h>
35
 
#include <kaction.h>
36
 
#include <kactioncollection.h>
37
 
#include <kcursor.h>
38
 
#include <kapplication.h>
39
 
#include <kdebug.h>
40
 
 
41
 
// Local includes
42
 
 
43
 
#include "distortionfxtool.h"
44
 
 
45
 
using namespace DigikamDistortionFXImagesPlugin;
46
 
 
47
 
K_PLUGIN_FACTORY( DistortionFXFactory, registerPlugin<ImagePlugin_DistortionFX>(); )
48
 
K_EXPORT_PLUGIN ( DistortionFXFactory("digikamimageplugin_distortionfx") )
49
 
 
50
 
ImagePlugin_DistortionFX::ImagePlugin_DistortionFX(QObject *parent, const QVariantList &)
51
 
                        : Digikam::ImagePlugin(parent, "ImagePlugin_DistortionFX")
52
 
{
53
 
    m_distortionfxAction  = new KAction(KIcon("distortionfx"), i18n("Distortion Effects..."), this);
54
 
    actionCollection()->addAction("imageplugin_distortionfx", m_distortionfxAction );
55
 
 
56
 
    connect(m_distortionfxAction, SIGNAL(triggered(bool) ),
57
 
            this, SLOT(slotDistortionFX()));
58
 
 
59
 
    setXMLFile( "digikamimageplugin_distortionfx_ui.rc" );
60
 
 
61
 
    kDebug() << "ImagePlugin_DistortionFX plugin loaded";
62
 
}
63
 
 
64
 
ImagePlugin_DistortionFX::~ImagePlugin_DistortionFX()
65
 
{
66
 
}
67
 
 
68
 
void ImagePlugin_DistortionFX::setEnabledActions(bool enable)
69
 
{
70
 
    m_distortionfxAction->setEnabled(enable);
71
 
}
72
 
 
73
 
void ImagePlugin_DistortionFX::slotDistortionFX()
74
 
{
75
 
    DistortionFXTool *tool = new DistortionFXTool(this);
76
 
    loadTool(tool);
77
 
}