~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/imageplugins/lensdistortion/imageplugin_lensdistortion.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.3.2 upstream) (37 hardy)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080717202539-1bw3w3nrsso7yj4z
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

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        : 2004-12-27
 
7
 * Description : a plugin to reduce lens distorsions to an image.
 
8
 * 
 
9
 * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 * 
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option)
 
15
 * any later version.
 
16
 * 
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 * 
 
22
 * ============================================================ */
 
23
 
 
24
// KDE includes.
 
25
  
 
26
#include <klocale.h>
 
27
#include <kgenericfactory.h>
 
28
#include <klibloader.h>
 
29
#include <kaction.h>
 
30
#include <kcursor.h>
 
31
 
 
32
// Local includes.
 
33
 
 
34
#include "ddebug.h"
 
35
#include "imageeffect_lensdistortion.h"
 
36
#include "imageplugin_lensdistortion.h"
 
37
#include "imageplugin_lensdistortion.moc"
 
38
 
 
39
K_EXPORT_COMPONENT_FACTORY(digikamimageplugin_lensdistortion,
 
40
                           KGenericFactory<ImagePlugin_LensDistortion>("digikamimageplugin_lensdistortion"));
 
41
 
 
42
ImagePlugin_LensDistortion::ImagePlugin_LensDistortion(QObject *parent, const char*, const QStringList &)
 
43
                          : Digikam::ImagePlugin(parent, "ImagePlugin_LensDistortion")
 
44
{
 
45
    m_lensdistortionAction = new KAction(i18n("Lens Distortion..."), "lensdistortion", 0, 
 
46
                                 this, SLOT(slotLensDistortion()),
 
47
                                 actionCollection(), "imageplugin_lensdistortion");
 
48
    
 
49
    setXMLFile("digikamimageplugin_lensdistortion_ui.rc");            
 
50
        
 
51
    DDebug() << "ImagePlugin_LensDistortion plugin loaded" << endl;
 
52
}
 
53
 
 
54
ImagePlugin_LensDistortion::~ImagePlugin_LensDistortion()
 
55
{
 
56
}
 
57
 
 
58
void ImagePlugin_LensDistortion::setEnabledActions(bool enable)
 
59
{
 
60
    m_lensdistortionAction->setEnabled(enable);
 
61
}
 
62
 
 
63
void ImagePlugin_LensDistortion::slotLensDistortion()
 
64
{
 
65
    DigikamLensDistortionImagesPlugin::ImageEffect_LensDistortion dlg(parentWidget());
 
66
    dlg.exec();
 
67
}