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

« back to all changes in this revision

Viewing changes to imageplugins/infrared/imageplugin_infrared.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-22
7
 
 * Description : a digiKam image editor plugin for simulate
8
 
 *               infrared film.
9
 
 *
10
 
 * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
 
 *
12
 
 * This program is free software; you can redistribute it
13
 
 * and/or modify it under the terms of the GNU General
14
 
 * Public License as published by the Free Software Foundation;
15
 
 * either version 2, or (at your option)
16
 
 * any later version.
17
 
 *
18
 
 * This program is distributed in the hope that it will be useful,
19
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 
 * GNU General Public License for more details.
22
 
 *
23
 
 * ============================================================ */
24
 
 
25
 
#include "imageplugin_infrared.moc"
26
 
 
27
 
// KDE includes
28
 
 
29
 
#include <klocale.h>
30
 
#include <kgenericfactory.h>
31
 
#include <klibloader.h>
32
 
#include <kaction.h>
33
 
#include <kactioncollection.h>
34
 
#include <kcursor.h>
35
 
#include <kapplication.h>
36
 
#include <kdebug.h>
37
 
 
38
 
// Local includes
39
 
 
40
 
#include "infraredtool.h"
41
 
 
42
 
using namespace DigikamInfraredImagesPlugin;
43
 
 
44
 
K_PLUGIN_FACTORY(InfraredFactory, registerPlugin<ImagePlugin_Infrared>();)
45
 
K_EXPORT_PLUGIN (InfraredFactory("digikamimageplugin_infrared"))
46
 
 
47
 
ImagePlugin_Infrared::ImagePlugin_Infrared(QObject* parent, const QVariantList&)
48
 
                    : Digikam::ImagePlugin(parent, "ImagePlugin_Infrared")
49
 
{
50
 
    m_infraredAction = new KAction(KIcon("infrared"), i18n("Infrared Film..."), this);
51
 
    actionCollection()->addAction("imageplugin_infrared", m_infraredAction );
52
 
 
53
 
    connect(m_infraredAction, SIGNAL(triggered(bool)),
54
 
            this, SLOT(slotInfrared()));
55
 
 
56
 
    setXMLFile( "digikamimageplugin_infrared_ui.rc" );
57
 
 
58
 
    kDebug() << "ImagePlugin_Infrared plugin loaded";
59
 
}
60
 
 
61
 
ImagePlugin_Infrared::~ImagePlugin_Infrared()
62
 
{
63
 
}
64
 
 
65
 
void ImagePlugin_Infrared::setEnabledActions(bool enable)
66
 
{
67
 
    m_infraredAction->setEnabled(enable);
68
 
}
69
 
 
70
 
void ImagePlugin_Infrared::slotInfrared()
71
 
{
72
 
    InfraredTool* tool = new InfraredTool(this);
73
 
    loadTool(tool);
74
 
}