[Digikam-devel] [digikam] imageplugins: Remove SuperImpose tool from digiKam image editor. This one been pretty old and used yet Qt3 support class.

Gilles Caulier caulier.gilles at gmail.com
Mon Jan 16 08:29:35 GMT 2012


Git commit d8af0907f293559290fb3329a5c0bfd3b54376f8 by Gilles Caulier.
Committed on 16/01/2012 at 09:20.
Pushed by cgilles into branch 'master'.

Remove SuperImpose tool from digiKam image editor. This one been pretty old and used yet Qt3 support class.
PhotoLayoutEditor tool from kipi-plugins must be used now instead. Template support using SVG file have been
added by Lukas during Coding Sprint 2012 at Genoa. It will be avaialble for next release 2.6.0.
CCMAIL: digikam-devel at kde.org
CCMAIL: lukasz.spas at gmail.com
CCBUGS: 171823
CCBUGS: 103696
CCBUGS: 117343
CCBUGS: 103695

M  +0    -1    imageplugins/TODO
M  +0    -8    imageplugins/decorate/CMakeLists.txt
M  +4    -6    imageplugins/decorate/digikamimageplugin_decorate_ui.rc
M  +1    -16   imageplugins/decorate/imageplugin_decorate.cpp
M  +1    -1    imageplugins/decorate/imageplugin_decorate.h
D  +0    -195  imageplugins/decorate/superimpose/dirselectwidget.cpp
D  +0    -77   imageplugins/decorate/superimpose/dirselectwidget.h
D  +0    -73   imageplugins/decorate/superimpose/superimpose.cpp
D  +0    -72   imageplugins/decorate/superimpose/superimpose.h
D  +0    -317  imageplugins/decorate/superimpose/superimposetool.cpp
D  +0    -71   imageplugins/decorate/superimpose/superimposetool.h
D  +0    -390  imageplugins/decorate/superimpose/superimposewidget.cpp
D  +0    -119  imageplugins/decorate/superimpose/superimposewidget.h

http://commits.kde.org/digikam/d8af0907f293559290fb3329a5c0bfd3b54376f8

diff --git a/imageplugins/TODO b/imageplugins/TODO
index 4fc1a51..e7e20a8 100644
--- a/imageplugins/TODO
+++ b/imageplugins/TODO
@@ -21,7 +21,6 @@ decorate
   /border                   DONE                  NO                   DONE
   /inserttext               TODO                  NO                   TODO (though BQM Watermark tool)
   /texture                  DONE                 DONE                  TODO
-  /superimpose               NO                   NO                    NO
 
 filters
   /colorfx                  TODO                 TODO                  TODO
diff --git a/imageplugins/decorate/CMakeLists.txt b/imageplugins/decorate/CMakeLists.txt
index 00ee18d..9321db2 100644
--- a/imageplugins/decorate/CMakeLists.txt
+++ b/imageplugins/decorate/CMakeLists.txt
@@ -3,10 +3,6 @@ SET(digikamimageplugin_decorate_PART_SRCS imageplugin_decorate.cpp
                                           inserttexttool.cpp
                                           bordertool.cpp
                                           texturetool.cpp
-                                          superimpose/dirselectwidget.cpp
-                                          superimpose/superimposewidget.cpp
-                                          superimpose/superimpose.cpp
-                                          superimpose/superimposetool.cpp
    )
 
 KDE4_ADD_PLUGIN(digikamimageplugin_decorate ${digikamimageplugin_decorate_PART_SRCS})
@@ -19,10 +15,6 @@ TARGET_LINK_LIBRARIES(
     ${QT_QTCORE_LIBRARY}
     ${QT_QTGUI_LIBRARY}
     ${KDCRAW_LIBRARIES}
-
-    # For Superimpose tool which is not yet ported to pure Qt4 implementation.
-    ${KDE4_KDE3SUPPORT_LIBS}
-    ${QT_QT3SUPPORT_LIBRARY}
     )
 
 INSTALL(TARGETS digikamimageplugin_decorate DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/imageplugins/decorate/digikamimageplugin_decorate_ui.rc b/imageplugins/decorate/digikamimageplugin_decorate_ui.rc
index 22dbc82..8b32bc7 100644
--- a/imageplugins/decorate/digikamimageplugin_decorate_ui.rc
+++ b/imageplugins/decorate/digikamimageplugin_decorate_ui.rc
@@ -1,13 +1,12 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui version="12" name="digikamimageplugin_decorate" >
+<gui version="13" name="digikamimageplugin_decorate" >
 
  <MenuBar>
 
   <Menu name="Decorate" ><text>&Decorate</text>
    <Action name="imageplugin_inserttext" />
    <Action name="imageplugin_border" />
-   <Action name="imageplugin_texture" />  
-   <Action name="imageplugin_superimpose" />   
+   <Action name="imageplugin_texture" />
   </Menu>
 
  </MenuBar>
@@ -18,9 +17,8 @@
 
  <ActionProperties>
   <Action name="imageplugin_inserttext" />
-  <Action name="imageplugin_border" />  
-  <Action name="imageplugin_texture" />  
-  <Action name="imageplugin_superimpose" />  
+  <Action name="imageplugin_border" />
+  <Action name="imageplugin_texture" />
  </ActionProperties>
 
 </gui>
diff --git a/imageplugins/decorate/imageplugin_decorate.cpp b/imageplugins/decorate/imageplugin_decorate.cpp
index 69f3add..f1c818e 100644
--- a/imageplugins/decorate/imageplugin_decorate.cpp
+++ b/imageplugins/decorate/imageplugin_decorate.cpp
@@ -6,7 +6,7 @@
  * Date        : 2005-02-14
  * Description : a plugin to insert a text over an image.
  *
- * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2005-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -39,7 +39,6 @@
 #include "inserttexttool.h"
 #include "bordertool.h"
 #include "texturetool.h"
-#include "superimposetool.h"
 
 using namespace DigikamDecorateImagePlugin;
 
@@ -51,14 +50,12 @@ class ImagePlugin_Decorate::ImagePlugin_DecoratePriv
 public:
 
     ImagePlugin_DecoratePriv() :
-        superimposeAction(0),
         textureAction(0),
         borderAction(0),
         insertTextAction(0)
     {
     }
 
-    KAction* superimposeAction;
     KAction* textureAction;
     KAction* borderAction;
     KAction* insertTextAction;
@@ -84,11 +81,6 @@ ImagePlugin_Decorate::ImagePlugin_Decorate(QObject* parent, const QVariantList&)
     connect(d->textureAction, SIGNAL(triggered(bool)),
             this, SLOT(slotTexture()));
 
-    d->superimposeAction = new KAction(KIcon("superimpose"), i18n("Template Superimpose..."), this);
-    actionCollection()->addAction("imageplugin_superimpose", d->superimposeAction );
-    connect(d->superimposeAction, SIGNAL(triggered(bool)),
-            this, SLOT(slotSuperImpose()));
-
     setXMLFile("digikamimageplugin_decorate_ui.rc");
 
     kDebug() << "ImagePlugin_Decorate plugin loaded";
@@ -104,7 +96,6 @@ void ImagePlugin_Decorate::setEnabledActions(bool b)
     d->insertTextAction->setEnabled(b);
     d->borderAction->setEnabled(b);
     d->textureAction->setEnabled(b);
-    d->superimposeAction->setEnabled(b);
 }
 
 void ImagePlugin_Decorate::slotInsertText()
@@ -124,9 +115,3 @@ void ImagePlugin_Decorate::slotTexture()
     TextureTool* tool = new TextureTool(this);
     loadTool(tool);
 }
-
-void ImagePlugin_Decorate::slotSuperImpose()
-{
-    SuperImposeTool* tool = new SuperImposeTool(this);
-    loadTool(tool);
-}
diff --git a/imageplugins/decorate/imageplugin_decorate.h b/imageplugins/decorate/imageplugin_decorate.h
index c8914f6..28ca1c3 100644
--- a/imageplugins/decorate/imageplugin_decorate.h
+++ b/imageplugins/decorate/imageplugin_decorate.h
@@ -6,7 +6,7 @@
  * Date        : 2005-02-14
  * Description : a plugin to insert a text over an image.
  *
- * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2005-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
diff --git a/imageplugins/decorate/superimpose/dirselectwidget.cpp b/imageplugins/decorate/superimpose/dirselectwidget.cpp
deleted file mode 100644
index f1af73a..0000000
--- a/imageplugins/decorate/superimpose/dirselectwidget.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "dirselectwidget.moc"
-
-// Qt includes
-
-#include <Q3Header>
-#include <Q3ListView>
-#include <QLayout>
-#include <QDir>
-
-// KDE includes
-
-#include <klocale.h>
-#include <kfiletreebranch.h>
-#include <kdebug.h>
-
-namespace DigikamDecorateImagePlugin
-{
-
-class DirSelectWidget::DirSelectWidgetPrivate
-{
-public:
-
-    DirSelectWidgetPrivate() {};
-
-    KFileTreeBranch* m_item;
-    QStringList      m_pendingPath;
-    QString          m_handled;
-    KUrl             m_rootUrl;
-};
-
-DirSelectWidget::DirSelectWidget(QWidget* parent, const char* name, const QString& headerLabel)
-    : K3FileTreeView( parent), d(new DirSelectWidgetPrivate)
-{
-    setObjectName(name);
-    addColumn(headerLabel);
-
-    if ( headerLabel.isNull() )
-    {
-        header()->hide();
-    }
-
-    setAlternateBackground(QColor());
-}
-
-DirSelectWidget::DirSelectWidget(const KUrl& rootUrl, const KUrl& currentUrl,
-                                 QWidget* parent, const char* name, const QString& headerLabel)
-    : K3FileTreeView( parent), d(new DirSelectWidgetPrivate)
-{
-    setObjectName(name);
-    addColumn(headerLabel);
-
-    if ( headerLabel.isNull() )
-    {
-        header()->hide();
-    }
-
-    setAlternateBackground(QColor());
-    setRootPath(rootUrl, currentUrl);
-}
-
-DirSelectWidget::~DirSelectWidget()
-{
-    delete d;
-}
-
-KUrl DirSelectWidget::path() const
-{
-    return currentUrl();
-}
-
-void DirSelectWidget::load()
-{
-    if ( d->m_pendingPath.isEmpty() )
-    {
-        disconnect( d->m_item, SIGNAL(populateFinished(K3FileTreeViewItem*)),
-                    this, SLOT(load()) );
-
-        emit folderItemSelected(currentUrl());
-        return;
-    }
-
-    QString item = d->m_pendingPath.front();
-    d->m_pendingPath.pop_front();
-    d->m_handled += item;
-    K3FileTreeViewItem* branch = findItem( d->m_item, d->m_handled );
-
-    if ( !branch )
-    {
-        kDebug() << "Unable to open " << d->m_handled;
-    }
-    else
-    {
-        branch->setOpen( true );
-        setSelected( branch, true );
-        ensureItemVisible ( branch );
-        d->m_handled += '/';
-
-        if ( branch->alreadyListed() )
-        {
-            load();
-        }
-    }
-}
-
-void DirSelectWidget::setCurrentPath(const KUrl& currentUrl)
-{
-    if ( !currentUrl.isValid() )
-    {
-        return;
-    }
-
-    QString currentPath = QDir::cleanPath(currentUrl.toLocalFile());
-    currentPath = currentPath.mid(d->m_rootUrl.toLocalFile().length());
-    d->m_pendingPath.clear();
-    d->m_handled = QString("");
-    d->m_pendingPath = currentPath.split('/', QString::KeepEmptyParts);
-
-    if (!d->m_pendingPath.at(0).isEmpty())
-    {
-        d->m_pendingPath.prepend("");    // ensure we open the root first.
-    }
-
-    connect( d->m_item, SIGNAL(populateFinished(K3FileTreeViewItem*)),
-             this, SLOT(load()) );
-    load();
-}
-
-void DirSelectWidget::setRootPath(const KUrl& rootUrl, const KUrl& currentUrl)
-{
-    d->m_rootUrl = rootUrl;
-    clear();
-    QString root = QDir::cleanPath(rootUrl.toLocalFile());
-
-    if (!root.endsWith('/'))
-    {
-        root.append("/");
-    }
-
-    QString currentPath = QDir::cleanPath(currentUrl.isValid() ? currentUrl.toLocalFile() : root);
-
-    d->m_item = addBranch( rootUrl, rootUrl.fileName() );
-    setDirOnlyMode( d->m_item, true );
-    currentPath      = currentPath.mid( root.length() );
-    d->m_pendingPath = currentPath.split('/', QString::KeepEmptyParts);
-
-    if ( !d->m_pendingPath.at(0).isEmpty() )
-    {
-        d->m_pendingPath.prepend( "" );    // ensure we open the root first.
-    }
-
-    connect( d->m_item, SIGNAL(populateFinished(K3FileTreeViewItem*)),
-             this, SLOT(load()) );
-
-    load();
-
-    connect( this, SIGNAL(executed(Q3ListViewItem*)),
-             this, SLOT(slotFolderSelected(Q3ListViewItem*)) );
-}
-
-KUrl DirSelectWidget::rootPath() const
-{
-    return d->m_rootUrl;
-}
-
-void DirSelectWidget::slotFolderSelected(Q3ListViewItem*)
-{
-    emit folderItemSelected(currentUrl());
-}
-
-}   // namespace DigikamDecorateImagePlugin
diff --git a/imageplugins/decorate/superimpose/dirselectwidget.h b/imageplugins/decorate/superimpose/dirselectwidget.h
deleted file mode 100644
index 764f4e9..0000000
--- a/imageplugins/decorate/superimpose/dirselectwidget.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef DIRSELECTWIDGET_H
-#define DIRSELECTWIDGET_H
-
-// Qt includes
-
-#include <QWidget>
-#include <QString>
-
-// KDE includes
-
-#include <k3filetreeview.h>
-#include <kurl.h>
-
-namespace DigikamDecorateImagePlugin
-{
-
-class DirSelectWidget : public K3FileTreeView
-{
-    Q_OBJECT
-
-public:
-
-    explicit DirSelectWidget(QWidget* parent, const char* name=0, const QString& headerLabel=QString());
-
-    explicit DirSelectWidget(const KUrl& rootUrl=KUrl("/"), const KUrl& currentUrl=KUrl(),
-                             QWidget* parent=0, const char* name=0, const QString& headerLabel=QString());
-
-    ~DirSelectWidget();
-
-    KUrl path() const;
-    KUrl rootPath() const;
-    void setRootPath(const KUrl& rootUrl, const KUrl& currentUrl=KUrl(QString()));
-    void setCurrentPath(const KUrl& currentUrl);
-
-Q_SIGNALS:
-
-    void folderItemSelected(const KUrl& url);
-
-protected Q_SLOTS:
-
-    void load();
-    void slotFolderSelected(Q3ListViewItem*);
-
-private:
-
-    class DirSelectWidgetPrivate;
-    DirSelectWidgetPrivate* const d;
-};
-
-}  // namespace DigikamDecorateImagePlugin
-
-#endif /* DIRSELECTWIDGET_H */
diff --git a/imageplugins/decorate/superimpose/superimpose.cpp b/imageplugins/decorate/superimpose/superimpose.cpp
deleted file mode 100644
index e1a1f9c..0000000
--- a/imageplugins/decorate/superimpose/superimpose.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2006-18-03
- * Description : Superimpose filter.
- *
- * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "superimpose.h"
-
-namespace DigikamDecorateImagePlugin
-{
-
-SuperImpose::SuperImpose(DImg* orgImage, DImg* templ,
-                         QRect orgImageSelection,
-                         DColorComposer::CompositingOperation compositeRule)
-{
-    m_orgImage      = *orgImage;
-    m_template      = *templ;
-    m_selection     = orgImageSelection;
-    m_compositeRule = compositeRule;
-
-    filterImage();
-}
-
-void SuperImpose::filterImage()
-{
-    if (m_template.isNull())
-    {
-        return;
-    }
-
-    int templateWidth  = m_template.width();
-    int templateHeight = m_template.height();
-
-    // take selection of src image and scale it to size of template
-    m_destImage = m_orgImage.smoothScaleSection(m_selection.x(), m_selection.y(),
-                  m_selection.width(), m_selection.height(), templateWidth, templateHeight);
-
-    // convert depth if necessary
-    m_template.convertToDepthOfImage(&m_destImage);
-
-    // get composer for compositing rule
-    DColorComposer* composer = DColorComposer::getComposer(m_compositeRule);
-    DColorComposer::MultiplicationFlags flags = DColorComposer::NoMultiplication;
-
-    if (m_compositeRule != DColorComposer::PorterDuffNone)
-    {
-        flags = DColorComposer::MultiplicationFlagsDImg;
-    }
-
-    // do alpha blending of template on dest image
-    m_destImage.bitBlendImage(composer, &m_template, 0, 0, templateWidth, templateHeight, 0, 0, flags);
-
-    delete composer;
-}
-
-} // namespace DigikamDecorateImagePlugin
diff --git a/imageplugins/decorate/superimpose/superimpose.h b/imageplugins/decorate/superimpose/superimpose.h
deleted file mode 100644
index 7df2adb..0000000
--- a/imageplugins/decorate/superimpose/superimpose.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2006-18-03
- * Description : Superimpose filter.
- *
- * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef SUPERIMPOSE_H
-#define SUPERIMPOSE_H
-
-// Qt includes
-
-#include <QRect>
-
-// Local includes
-
-#include "dimg.h"
-#include "dcolor.h"
-
-using namespace Digikam;
-
-namespace DigikamDecorateImagePlugin
-{
-
-class SuperImpose
-{
-
-public:
-
-    SuperImpose(DImg* orgImage, DImg* templ,
-                QRect orgImageSelection,
-                DColorComposer::CompositingOperation
-                compositeRule = DColorComposer::PorterDuffNone);
-
-    DImg getTargetImage() const
-    {
-        return m_destImage;
-    }
-
-private:
-
-    void filterImage();
-
-private:
-
-    QRect                                m_selection;
-
-    DImg                                 m_orgImage;
-    DImg                                 m_template;
-    DImg                                 m_destImage;
-    DColorComposer::CompositingOperation m_compositeRule;
-};
-
-} // namespace DigikamDecorateImagePlugin
-
-#endif /* SUPERIMPOSE_H */
diff --git a/imageplugins/decorate/superimpose/superimposetool.cpp b/imageplugins/decorate/superimpose/superimposetool.cpp
deleted file mode 100644
index 8007d2f..0000000
--- a/imageplugins/decorate/superimpose/superimposetool.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "superimposetool.moc"
-
-// Qt includes
-
-#include <QButtonGroup>
-#include <QDir>
-#include <QFile>
-#include <QFrame>
-#include <QGridLayout>
-#include <QGroupBox>
-#include <QLabel>
-#include <QPixmap>
-#include <QPushButton>
-#include <QToolButton>
-#include <QProgressBar>
-
-// KDE includes
-
-#include <kapplication.h>
-#include <kconfig.h>
-#include <kcursor.h>
-#include <kfiledialog.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
-#include <khelpmenu.h>
-#include <kiconloader.h>
-#include <klocale.h>
-#include <kmenu.h>
-#include <kstandarddirs.h>
-
-// Local includes
-
-#include "dimg.h"
-#include "dirselectwidget.h"
-#include "editortoolsettings.h"
-#include "imageiface.h"
-#include "superimposewidget.h"
-#include "thumbbar.h"
-
-namespace DigikamDecorateImagePlugin
-{
-
-class SuperImposeTool::SuperImposeToolPriv
-{
-public:
-
-    SuperImposeToolPriv() :
-        thumbnailsBar(0),
-        gboxSettings(0),
-        previewWidget(0),
-        dirSelect(0)
-    {}
-
-    static const QString configGroupName;
-    static const QString configTemplatesRootURLEntry;
-    static const QString configTemplatesURLEntry;
-
-    KUrl                 templatesUrl;
-    KUrl                 templatesRootUrl;
-
-    ThumbBarView*        thumbnailsBar;
-    EditorToolSettings*  gboxSettings;
-    SuperImposeWidget*   previewWidget;
-    DirSelectWidget*     dirSelect;
-};
-
-const QString SuperImposeTool::SuperImposeToolPriv::configGroupName("superimpose Tool");
-const QString SuperImposeTool::SuperImposeToolPriv::configTemplatesRootURLEntry("Templates Root URL");
-const QString SuperImposeTool::SuperImposeToolPriv::configTemplatesURLEntry("Templates URL");
-
-// --------------------------------------------------------
-
-SuperImposeTool::SuperImposeTool(QObject* parent)
-    : EditorTool(parent),
-      d(new SuperImposeToolPriv)
-{
-    setObjectName("superimpose");
-    setToolName(i18n("Template Superimpose"));
-    setToolIcon(SmallIcon("superimpose"));
-
-    // -------------------------------------------------------------
-
-    QFrame* frame = new QFrame(0);
-    frame->setFrameStyle(QFrame::Panel|QFrame::Sunken);
-
-    QGridLayout* gridFrame = new QGridLayout(frame);
-    d->previewWidget       = new SuperImposeWidget(400, 300, frame);
-    d->previewWidget->setWhatsThis( i18n("This previews the template superimposed onto the image."));
-
-    // -------------------------------------------------------------
-
-    QWidget* toolBox     = new QWidget(frame);
-    QHBoxLayout* hlay    = new QHBoxLayout(toolBox);
-    QButtonGroup* bGroup = new QButtonGroup(frame);
-
-    QToolButton* zoomInButton = new QToolButton(toolBox);
-    bGroup->addButton(zoomInButton, ZOOMIN);
-    zoomInButton->setIcon(KIcon("zoom-in"));
-    zoomInButton->setCheckable(true);
-    zoomInButton->setToolTip(i18n("Zoom in"));
-
-    QToolButton* zoomOutButton = new QToolButton(toolBox);
-    bGroup->addButton(zoomOutButton, ZOOMOUT);
-    zoomOutButton->setIcon(KIcon("zoom-out"));
-    zoomOutButton->setCheckable(true);
-    zoomOutButton->setToolTip(i18n("Zoom out"));
-
-    QToolButton* moveButton = new QToolButton(toolBox);
-    bGroup->addButton(moveButton, MOVE);
-    moveButton->setIcon(KIcon("transform-move"));
-    moveButton->setCheckable(true);
-    moveButton->setChecked(true);
-    moveButton->setToolTip(i18n("Move"));
-
-    bGroup->setExclusive(true);
-
-    hlay->setMargin(0);
-    hlay->setSpacing(0);
-    hlay->addSpacing(20);
-    hlay->addWidget(zoomInButton);
-    hlay->addSpacing(20);
-    hlay->addWidget(zoomOutButton);
-    hlay->addSpacing(20);
-    hlay->addWidget(moveButton);
-    hlay->addSpacing(20);
-
-    // -------------------------------------------------------------
-
-    gridFrame->addWidget(d->previewWidget, 0, 0, 1, 3);
-    gridFrame->addWidget(toolBox,          1, 1, 1, 1);
-    gridFrame->setColumnStretch(0, 10);
-    gridFrame->setColumnStretch(2, 10);
-    gridFrame->setRowStretch(0, 10);
-    gridFrame->setMargin(0);
-    gridFrame->setSpacing(0);
-
-    setToolView(frame);
-
-    // -------------------------------------------------------------
-
-    d->gboxSettings   = new EditorToolSettings;
-
-    QGridLayout* grid = new QGridLayout(d->gboxSettings->plainPage());
-
-    d->thumbnailsBar  = new ThumbBarView(d->gboxSettings->plainPage());
-    d->thumbnailsBar->setToolTip(new ThumbBarToolTip(d->thumbnailsBar));
-
-    d->dirSelect      = new DirSelectWidget(d->gboxSettings->plainPage());
-    QPushButton* templateDirButton = new QPushButton(i18n("Root Directory..."), d->gboxSettings->plainPage());
-    templateDirButton->setWhatsThis(i18n("Set here the current templates' root directory."));
-
-    // -------------------------------------------------------------
-
-    grid->addWidget(d->thumbnailsBar,   0, 0, 2, 1);
-    grid->addWidget(d->dirSelect,       0, 1, 1, 1);
-    grid->addWidget(templateDirButton,  1, 1, 1, 1);
-    grid->setColumnStretch(1, 10);
-    grid->setMargin(d->gboxSettings->spacingHint());
-    grid->setSpacing(d->gboxSettings->spacingHint());
-
-    setToolSettings(d->gboxSettings);
-    init();
-
-    // -------------------------------------------------------------
-
-    connect(bGroup, SIGNAL(buttonReleased(int)),
-            d->previewWidget, SLOT(slotEditModeChanged(int)));
-
-    connect(d->thumbnailsBar, SIGNAL(signalUrlSelected(KUrl)),
-            d->previewWidget, SLOT(slotSetCurrentTemplate(KUrl)));
-
-    connect(d->dirSelect, SIGNAL(folderItemSelected(KUrl)),
-            this, SLOT(slotTemplateDirChanged(KUrl)));
-
-    connect(templateDirButton, SIGNAL(clicked()),
-            this, SLOT(slotRootTemplateDirChanged()));
-
-    // -------------------------------------------------------------
-
-    populateTemplates();
-}
-
-SuperImposeTool::~SuperImposeTool()
-{
-    delete d;
-}
-
-void SuperImposeTool::populateTemplates(void)
-{
-    d->thumbnailsBar->clear(true);
-
-    if (!d->templatesUrl.isValid() || !d->templatesUrl.isLocalFile())
-    {
-        return;
-    }
-
-    QDir dir(d->templatesUrl.toLocalFile(), "*.png *.PNG");
-
-    if (!dir.exists())
-    {
-        return;
-    }
-
-    dir.setFilter ( QDir::Files | QDir::NoSymLinks );
-
-    QFileInfoList fileinfolist = dir.entryInfoList();
-
-    if (fileinfolist.isEmpty())
-    {
-        return;
-    }
-
-    QFileInfoList::const_iterator fi;
-
-    for (fi = fileinfolist.constBegin(); fi != fileinfolist.constEnd(); ++fi)
-    {
-        new ThumbBarItem( d->thumbnailsBar, KUrl(fi->filePath()) );
-    }
-}
-
-void SuperImposeTool::readSettings()
-{
-    KSharedConfig::Ptr config = KGlobal::config();
-    KConfigGroup group        = config->group("Album Settings");
-    KUrl albumDBUrl( group.readEntry("Album Path", KGlobalSettings::documentPath()) );
-
-    group = config->group(d->configGroupName);
-    d->templatesRootUrl.setPath( group.readEntry(d->configTemplatesRootURLEntry, albumDBUrl.toLocalFile()) );
-    d->templatesUrl.setPath( group.readEntry(d->configTemplatesURLEntry,         albumDBUrl.toLocalFile()) );
-    d->dirSelect->setRootPath(d->templatesRootUrl, d->templatesUrl);
-}
-
-void SuperImposeTool::writeSettings()
-{
-    KSharedConfig::Ptr config = KGlobal::config();
-    KConfigGroup group        = config->group(d->configGroupName);
-    group.writeEntry( d->configTemplatesRootURLEntry, d->dirSelect->rootPath().toLocalFile() );
-    group.writeEntry( d->configTemplatesURLEntry,     d->templatesUrl.toLocalFile() );
-    group.sync();
-}
-
-void SuperImposeTool::slotResetSettings()
-{
-    d->previewWidget->resetEdit();
-}
-
-void SuperImposeTool::slotRootTemplateDirChanged(void)
-{
-    KUrl url = KFileDialog::getExistingDirectory(d->templatesRootUrl.toLocalFile(), kapp->activeWindow(),
-               i18n("Select Template Root Directory to Use"));
-
-    if ( url.isValid() )
-    {
-        d->dirSelect->setRootPath(url);
-        d->templatesRootUrl = url;
-        d->templatesUrl = url;
-        populateTemplates();
-    }
-}
-
-void SuperImposeTool::slotTemplateDirChanged(const KUrl& url)
-{
-    if (url.isValid())
-    {
-        d->templatesUrl = url;
-        populateTemplates();
-    }
-}
-
-void SuperImposeTool::finalRendering()
-{
-    d->previewWidget->setEnabled(false);
-    d->dirSelect->setEnabled(false);
-    d->thumbnailsBar->setEnabled(false);
-
-    ImageIface iface(0, 0);
-    DImg img = d->previewWidget->makeSuperImpose();
-    //TODO: Make separate filter
-    FilterAction action(i18n("Super Impose Tool"), 1, FilterAction::DocumentedHistory);
-    iface.putOriginalImage(i18n("Super Impose"), action, img.bits(), img.width(), img.height() );
-
-    d->previewWidget->setEnabled(true);
-    d->dirSelect->setEnabled(true);
-    d->thumbnailsBar->setEnabled(true);
-}
-
-void SuperImposeTool::setBackgroundColor(const QColor& bg)
-{
-    d->previewWidget->setBackgroundColor(bg);
-}
-
-}  // namespace DigikamDecorateImagePlugin
diff --git a/imageplugins/decorate/superimpose/superimposetool.h b/imageplugins/decorate/superimpose/superimposetool.h
deleted file mode 100644
index 0c6527a..0000000
--- a/imageplugins/decorate/superimpose/superimposetool.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef SUPERIMPOSETOOL_H
-#define SUPERIMPOSETOOL_H
-
-// Local includes
-
-#include "editortool.h"
-
-class KUrl;
-
-using namespace Digikam;
-
-namespace DigikamDecorateImagePlugin
-{
-
-class SuperImposeTool : public EditorTool
-{
-    Q_OBJECT
-
-public:
-
-    SuperImposeTool(QObject* parent);
-    ~SuperImposeTool();
-
-private Q_SLOTS:
-
-    void slotResetSettings();
-    void slotTemplateDirChanged(const KUrl& url);
-    void slotRootTemplateDirChanged(void);
-
-private:
-
-    void readSettings();
-    void writeSettings();
-    void populateTemplates(void);
-    void finalRendering();
-    void setBackgroundColor(const QColor& bg);
-
-private:
-
-    class SuperImposeToolPriv;
-    SuperImposeToolPriv* const d;
-};
-
-}  // namespace DigikamDecorateImagePlugin
-
-#endif /* SUPERIMPOSETOOL_H */
diff --git a/imageplugins/decorate/superimpose/superimposewidget.cpp b/imageplugins/decorate/superimpose/superimposewidget.cpp
deleted file mode 100644
index cb5e7d3..0000000
--- a/imageplugins/decorate/superimpose/superimposewidget.cpp
+++ /dev/null
@@ -1,390 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "superimposewidget.moc"
-
-// C++ includes
-
-#include <cstdio>
-
-// Qt includes
-
-#include <QPainter>
-#include <QPaintEvent>
-#include <QResizeEvent>
-#include <QPixmap>
-#include <QMouseEvent>
-
-// KDE includes
-
-#include <kstandarddirs.h>
-#include <kcursor.h>
-#include <kglobal.h>
-
-// Local includes
-
-#include "superimpose.h"
-
-namespace DigikamDecorateImagePlugin
-{
-
-SuperImposeWidget::SuperImposeWidget(int w, int h, QWidget* parent)
-    : QWidget(parent)
-{
-    setAttribute(Qt::WA_DeleteOnClose);
-    m_bgColor  = palette().color(QPalette::Background);
-    m_pixmap   = new QPixmap(w, h);
-    m_editMode = MOVE;
-
-    ImageIface iface(0, 0);
-    m_w = iface.originalWidth();
-    m_h = iface.originalHeight();
-
-    setMinimumSize(w, h);
-    setMouseTracking(true);
-
-    resetEdit();
-}
-
-SuperImposeWidget::~SuperImposeWidget()
-{
-    delete m_pixmap;
-}
-
-DImg SuperImposeWidget::makeSuperImpose()
-{
-    ImageIface iface(0, 0);
-    SuperImpose superimpose(iface.getOriginalImg(), &m_template, m_currentSelection);
-    return superimpose.getTargetImage();
-}
-
-void SuperImposeWidget::resetEdit()
-{
-    m_zoomFactor       = 1.0;
-    m_currentSelection = QRect(m_w/2 - m_rect.width()/2, m_h/2 - m_rect.height()/2,
-                               m_rect.width(), m_rect.height());
-    makePixmap();
-    repaint();
-}
-
-void SuperImposeWidget::makePixmap()
-{
-    ImageIface iface(0, 0);
-    SuperImpose superimpose(iface.getOriginalImg(), &m_templateScaled, m_currentSelection);
-    DImg image = superimpose.getTargetImage();
-
-    m_pixmap->fill(m_bgColor);
-    QPainter p(m_pixmap);
-    QPixmap imagePix = image.convertToPixmap();
-    p.drawPixmap(m_rect.x(), m_rect.y(), imagePix, 0, 0, m_rect.width(), m_rect.height());
-    p.end();
-}
-
-void SuperImposeWidget::resizeEvent(QResizeEvent* e)
-{
-    blockSignals(true);
-    delete m_pixmap;
-    int w    = e->size().width();
-    int h    = e->size().height();
-    m_pixmap = new QPixmap(w, h);
-
-    if (!m_template.isNull())
-    {
-        int templateWidth  = m_template.width();
-        int templateHeight = m_template.height();
-
-        if (templateWidth < templateHeight)
-        {
-            int neww = (int) ((float)height() / (float)templateHeight * (float)templateWidth);
-            m_rect   = QRect(width()/2-neww/2, 0, neww, height());
-        }
-        else
-        {
-            int newh = (int) ((float)width() / (float)templateWidth * (float)templateHeight);
-            m_rect   = QRect(0, height()/2-newh/2, width(), newh);
-        }
-
-        m_templateScaled = m_template.smoothScale(m_rect.width(), m_rect.height());
-        makePixmap();
-    }
-    else
-    {
-        m_rect = QRect();
-        m_pixmap->fill(palette().color(QPalette::Background));
-    }
-
-    blockSignals(false);
-}
-
-void SuperImposeWidget::setBackgroundColor(const QColor& bg)
-{
-    m_bgColor = bg;
-    makePixmap();
-    repaint();
-}
-
-void SuperImposeWidget::paintEvent(QPaintEvent*)
-{
-    QPainter p(this);
-    p.drawPixmap(0, 0, *m_pixmap);
-    p.end();
-}
-
-void SuperImposeWidget::slotEditModeChanged(int mode)
-{
-    m_editMode = mode;
-}
-
-void SuperImposeWidget::slotSetCurrentTemplate(const KUrl& url)
-{
-    m_template.load(url.toLocalFile());
-
-    if (m_template.isNull())
-    {
-        m_rect = QRect();
-        return;
-    }
-
-    int templateWidth  = m_template.width();
-    int templateHeight = m_template.height();
-
-    if (templateWidth < templateHeight)
-    {
-        int neww = (int) ((float)height() / (float)templateHeight * (float)templateWidth);
-        m_rect   = QRect(width()/2-neww/2, 0, neww, height());
-    }
-    else
-    {
-        int newh = (int) ((float)width() / (float)templateWidth * (float)templateHeight);
-        m_rect   = QRect(0, height()/2-newh/2, width(), newh);
-    }
-
-    m_templateScaled  = m_template.smoothScale(m_rect.width(), m_rect.height());
-    m_currentSelection = QRect(m_w/2 - m_rect.width()/2, m_h/2 - m_rect.height()/2,
-                               m_rect.width(), m_rect.height());
-    zoomSelection(0);
-}
-
-void SuperImposeWidget::moveSelection(int dx, int dy)
-{
-    QRect selection = m_currentSelection;
-    float wf = (float)selection.width() / (float)m_rect.width();
-    float hf = (float)selection.height() / (float)m_rect.height();
-
-    selection.translate( -(int)(wf*(float)dx), -(int)(hf*(float)dy) );
-
-    if (selection.left() < 0)
-    {
-        selection.moveLeft(0);
-    }
-
-    if (selection.top() < 0)
-    {
-        selection.moveTop(0);
-    }
-
-    if (selection.bottom() > m_h)
-    {
-        selection.moveBottom(m_h);
-    }
-
-    if (selection.right() > m_w)
-    {
-        selection.moveRight(m_w);
-    }
-
-    m_currentSelection = selection;
-}
-
-bool SuperImposeWidget::zoomSelection(float deltaZoomFactor)
-{
-    float newZoom = m_zoomFactor + deltaZoomFactor;
-
-    if (newZoom < 0.0)
-    {
-        return false;
-    }
-
-    QRect selection = m_currentSelection;
-    int wf          = (int)((float)m_rect.width()  / newZoom);
-    int hf          = (int)((float)m_rect.height() / newZoom);
-    int deltaX      = (m_currentSelection.width()  - wf) / 2;
-    int deltaY      = (m_currentSelection.height() - hf) / 2;
-
-    selection.setLeft(m_currentSelection.left() + deltaX);
-    selection.setTop(m_currentSelection.top() + deltaY);
-    selection.setWidth(wf);
-    selection.setHeight(hf);
-
-    // check that selection is still inside original image
-    QRect orgImageRect(0, 0, m_w, m_h);
-
-    if (!orgImageRect.contains(selection))
-    {
-        // try to adjust
-        if (selection.left() < 0)
-        {
-            selection.moveLeft(0);
-        }
-
-        if (selection.top() < 0)
-        {
-            selection.moveTop(0);
-        }
-
-        if (selection.bottom() > m_h)
-        {
-            selection.moveBottom(m_h);
-        }
-
-        if (selection.right() > m_w)
-        {
-            selection.moveRight(m_w);
-        }
-
-        // was it successful?
-        if (selection.contains(orgImageRect))
-        {
-            return false;
-        }
-
-    }
-
-    m_zoomFactor       = newZoom;
-    m_currentSelection = selection;
-
-    makePixmap();
-    repaint();
-
-    return true;
-}
-
-void SuperImposeWidget::mousePressEvent(QMouseEvent* e)
-{
-    if ( isEnabled() && e->button() == Qt::LeftButton &&
-         rect().contains( e->x(), e->y() ) )
-    {
-        switch (m_editMode)
-        {
-            case ZOOMIN:
-
-                if (zoomSelection(+0.05F))
-                {
-                    moveSelection(width()/2 - e->x(), height()/2 - e->y());
-                }
-
-                break;
-
-            case ZOOMOUT:
-
-                if (zoomSelection(-0.05F))
-                {
-                    moveSelection(width()/2 - e->x(), height()/2 - e->y());
-                }
-
-                break;
-
-            case MOVE:
-                m_xpos = e->x();
-                m_ypos = e->y();
-                break;
-        }
-    }
-}
-
-void SuperImposeWidget::mouseReleaseEvent(QMouseEvent*)
-{
-    setEditModeCursor();
-}
-
-void SuperImposeWidget::mouseMoveEvent(QMouseEvent* e)
-{
-    if ( isEnabled() )
-    {
-        if ( e->buttons() == Qt::LeftButton )
-        {
-            switch (m_editMode)
-            {
-                case ZOOMIN:
-                case ZOOMOUT:
-                    break;
-
-                case MOVE:
-                    int newxpos = e->x();
-                    int newypos = e->y();
-
-                    if (newxpos < m_rect.left())
-                    {
-                        newxpos = m_rect.left();
-                    }
-
-                    if (newxpos > m_rect.right())
-                    {
-                        newxpos = m_rect.right();
-                    }
-
-                    if (newxpos < m_rect.top())
-                    {
-                        newxpos = m_rect.top();
-                    }
-
-                    if (newxpos > m_rect.bottom())
-                    {
-                        newxpos = m_rect.bottom();
-                    }
-
-                    moveSelection(newxpos - m_xpos, newypos - m_ypos);
-                    makePixmap();
-                    repaint();
-
-                    m_xpos = newxpos;
-                    m_ypos = newypos;
-                    setCursor( Qt::PointingHandCursor );
-                    break;
-            }
-        }
-        else if (rect().contains( e->x(), e->y() ))
-        {
-            setEditModeCursor();
-        }
-    }
-}
-
-void SuperImposeWidget::setEditModeCursor()
-{
-    switch (m_editMode)
-    {
-        case ZOOMIN:
-        case ZOOMOUT:
-            setCursor ( Qt::CrossCursor );
-            break;
-
-        case MOVE:
-            setCursor ( Qt::SizeAllCursor );
-            break;
-    }
-}
-
-}  // namespace DigikamDecorateImagePlugin
diff --git a/imageplugins/decorate/superimpose/superimposewidget.h b/imageplugins/decorate/superimpose/superimposewidget.h
deleted file mode 100644
index 247b9ff..0000000
--- a/imageplugins/decorate/superimpose/superimposewidget.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2005-01-04
- * Description : a Digikam image editor plugin for superimpose a
- *               template to an image.
- *
- * Copyright (C) 2005-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
- * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef SUPERIMPOSEWIDGET_H
-#define SUPERIMPOSEWIDGET_H
-
-// Qt includes
-
-#include <QWidget>
-#include <QImage>
-#include <QRect>
-#include <QSize>
-#include <QPaintEvent>
-#include <QResizeEvent>
-#include <QMouseEvent>
-
-// KDE includes
-
-#include <kurl.h>
-
-// Local includes
-
-#include "imageiface.h"
-#include "dimg.h"
-
-class QPixmap;
-
-using namespace Digikam;
-
-namespace DigikamDecorateImagePlugin
-{
-
-enum Action
-{
-    ZOOMIN=0,
-    ZOOMOUT,
-    MOVE
-};
-
-class SuperImposeWidget : public QWidget
-{
-    Q_OBJECT
-
-public:
-
-    SuperImposeWidget(int w, int h, QWidget* parent=0);
-    ~SuperImposeWidget();
-
-    void   setBackgroundColor(const QColor& bg);
-    void   setEditMode(int mode);
-    void   resetEdit();
-    QRect  getCurrentSelection();
-    QSize  getTemplateSize();
-    DImg   makeSuperImpose();
-
-public Q_SLOTS:
-
-    void slotEditModeChanged(int mode);
-    void slotSetCurrentTemplate(const KUrl& url);
-
-protected:
-
-    void paintEvent(QPaintEvent*);
-    void resizeEvent(QResizeEvent*);
-    void mousePressEvent(QMouseEvent*);
-    void mouseReleaseEvent(QMouseEvent*);
-    void mouseMoveEvent(QMouseEvent*);
-
-    bool zoomSelection(float deltaZoomFactor);
-    void moveSelection(int x, int y);
-    void makePixmap(void);
-    void setEditModeCursor();
-
-private:
-
-    int      m_w;
-    int      m_h;
-
-    int      m_xpos;
-    int      m_ypos;
-    int      m_editMode;
-    float    m_zoomFactor;
-
-    QColor   m_bgColor;           // Pixmap background color.
-
-    QPixmap* m_pixmap;            // For image region selection manipulations.
-
-    QRect    m_rect;              // For mouse drag position.
-    QRect    m_currentSelection;  // Region selection in image displayed in the widget.
-
-    DImg     m_template;          // Full template data.
-    DImg     m_templateScaled;    // Template scaled to preview widget
-};
-
-}  // namespace DigikamDecorateImagePlugin
-
-#endif /* SUPERIMPOSEWIDGET_H */



More information about the Digikam-devel mailing list