1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a digiKam image editor plugin for simulate
10
* Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
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)
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.
23
* ============================================================ */
25
#include "imageplugin_infrared.moc"
30
#include <kgenericfactory.h>
31
#include <klibloader.h>
33
#include <kactioncollection.h>
35
#include <kapplication.h>
40
#include "infraredtool.h"
42
using namespace DigikamInfraredImagesPlugin;
44
K_PLUGIN_FACTORY(InfraredFactory, registerPlugin<ImagePlugin_Infrared>();)
45
K_EXPORT_PLUGIN (InfraredFactory("digikamimageplugin_infrared"))
47
ImagePlugin_Infrared::ImagePlugin_Infrared(QObject* parent, const QVariantList&)
48
: Digikam::ImagePlugin(parent, "ImagePlugin_Infrared")
50
m_infraredAction = new KAction(KIcon("infrared"), i18n("Infrared Film..."), this);
51
actionCollection()->addAction("imageplugin_infrared", m_infraredAction );
53
connect(m_infraredAction, SIGNAL(triggered(bool)),
54
this, SLOT(slotInfrared()));
56
setXMLFile( "digikamimageplugin_infrared_ui.rc" );
58
kDebug() << "ImagePlugin_Infrared plugin loaded";
61
ImagePlugin_Infrared::~ImagePlugin_Infrared()
65
void ImagePlugin_Infrared::setEnabledActions(bool enable)
67
m_infraredAction->setEnabled(enable);
70
void ImagePlugin_Infrared::slotInfrared()
72
InfraredTool* tool = new InfraredTool(this);