~ubuntu-branches/ubuntu/gutsy/digikam/gutsy

1.2.10 by Luka Renko
Import upstream version 0.9.2~beta2
1
/* ============================================================
1.2.11 by Chris Cheney
Import upstream version 0.9.2~beta3
2
 *
3
 * This file is a part of digiKam project
4
 * http://www.digikam.org
5
 *
6
 * Date        : 2005-03-27
7
 * Description : a digiKam image plugin for fixing dots produced by
8
 *               hot/stuck/dead pixels from a CCD.
9
 * 
10
 * Copyright (C) 2005-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
 * Copyright (C) 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
12
 * 
1.2.10 by Luka Renko
Import upstream version 0.9.2~beta2
13
 * This program is free software; you can redistribute it
14
 * and/or modify it under the terms of the GNU General
15
 * Public License as published by the Free Software Foundation;
16
 * either version 2, or (at your option)
17
 * any later version.
18
 * 
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 * 
24
 * ============================================================ */
25
26
// KDE includes.
27
  
28
#include <klocale.h>
29
#include <kgenericfactory.h>
30
#include <klibloader.h>
31
#include <kaction.h>
32
#include <kcursor.h>
33
34
// Local includes.
35
36
#include "ddebug.h"
37
#include "imageeffect_hotpixels.h"
38
#include "imageplugin_hotpixels.h"
39
#include "imageplugin_hotpixels.moc"
40
41
K_EXPORT_COMPONENT_FACTORY(digikamimageplugin_hotpixels,
42
                           KGenericFactory<ImagePlugin_HotPixels>("digikamimageplugin_hotpixels"));
43
44
ImagePlugin_HotPixels::ImagePlugin_HotPixels(QObject *parent, const char*, const QStringList &)
45
                     : Digikam::ImagePlugin(parent, "ImagePlugin_HotPixels")
46
{
47
    m_hotpixelsAction = new KAction(i18n("Hot Pixels..."), "hotpixels", 0, 
48
                            this, SLOT(slotHotPixels()),
49
                            actionCollection(), "imageplugin_hotpixels");
50
    
51
    setXMLFile("digikamimageplugin_hotpixels_ui.rc");            
52
        
53
    DDebug() << "ImagePlugin_HotPixels plugin loaded" << endl;
54
}
55
56
ImagePlugin_HotPixels::~ImagePlugin_HotPixels()
57
{
58
}
59
60
void ImagePlugin_HotPixels::setEnabledActions(bool enable)
61
{
62
    m_hotpixelsAction->setEnabled(enable);
63
}
64
65
void ImagePlugin_HotPixels::slotHotPixels()
66
{
67
    DigikamHotPixelsImagesPlugin::ImageEffect_HotPixels dlg(parentWidget());
68
    dlg.exec();
69
}