SVN commit 855459 by cgilles:
digiKam from trunk : Inpainting image plugin is now ported to EditorTool API
CCMAIL:
[hidden email]
M +1 -1 CMakeLists.txt
D imageeffect_inpainting.cpp
D imageeffect_inpainting.h
M +27 -2 imageplugin_inpainting.cpp
A inpaintingtool.cpp imageeffect_inpainting.cpp#855423 [License: GPL (v2+)]
A inpaintingtool.h imageeffect_inpainting.h#855423 [License: GPL (v2+)]
--- trunk/extragear/graphics/digikam/imageplugins/inpainting/CMakeLists.txt #855458:855459
@@ -1,6 +1,6 @@
SET(digikamimageplugin_inpainting_PART_SRCS imageplugin_inpainting.cpp
- imageeffect_inpainting.cpp
+ inpaintingtool.cpp
)
--- trunk/extragear/graphics/digikam/imageplugins/inpainting/imageplugin_inpainting.cpp #855458:855459
@@ -35,10 +35,14 @@
// Local includes.
#include "ddebug.h"
-#include "imageeffect_inpainting.h"
+#include "imageiface.h"
+#include "inpaintingtool.h"
#include "imageplugin_inpainting.h"
#include "imageplugin_inpainting.moc"
+using namespace DigikamInPaintingImagesPlugin;
+using namespace Digikam;
+
K_PLUGIN_FACTORY( InPaintingFactory, registerPlugin<ImagePlugin_InPainting>(); )
K_EXPORT_PLUGIN ( InPaintingFactory("digikamimageplugin_inpainting") )
@@ -71,5 +75,26 @@
void ImagePlugin_InPainting::slotInPainting()
{
- DigikamInPaintingImagesPlugin::ImageEffect_InPainting::inPainting(kapp->activeWindow());
+
+ ImageIface iface(0, 0);
+
+ int w = iface.selectedWidth();
+ int h = iface.selectedHeight();
+
+ if (!w || !h)
+ {
+ InPaintingPassivePopup* popup = new InPaintingPassivePopup(kapp->activeWindow());
+ popup->setView(i18n("Inpainting Photograph Tool"),
+ i18n("You need to select a region to inpaint to use "
+ "this tool"));
+ popup->setAutoDelete(true);
+ popup->setTimeout(2500);
+ popup->show();
+ return;
+ }
+
+ // -- run the dlg ----------------------------------------------
+
+ InPaintingTool *tool = new InPaintingTool(this);
+ loadTool(tool);
}
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel