[Kde-imaging] extragear/graphics/kipi-plugins/dngconverter
Gilles Caulier
caulier.gilles at gmail.com
Tue Sep 30 09:06:33 CEST 2008
SVN commit 866130 by cgilles:
Kipi-plugins from trunk: DNGConverter : added a new version of the tool as stand alone application.
CCMAIL: kde-imaging at kde.org
CCMAIL: alexandre.prokoudine at gmail.com
M +9 -0 CMakeLists.txt
M +0 -7 plugin/CMakeLists.txt
M +16 -10 plugin/batchdialog.cpp
M +2 -1 plugin/plugin_dngconverter.h
M +19 -2 test/CMakeLists.txt
AM test/dngconverter.cpp [License: GPL (v2+)]
--- trunk/extragear/graphics/kipi-plugins/dngconverter/CMakeLists.txt #866129:866130
@@ -180,5 +180,14 @@
# =======================================================
+INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/plugin )
+
+SET(kipiplugin_dngconverter_PART_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/plugin/plugin_dngconverter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/plugin/actionthread.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/plugin/batchdialog.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/plugin/settingswidget.cpp
+ ${libdngwriter_SRCS}
+ )
+
ADD_SUBDIRECTORY(plugin)
ADD_SUBDIRECTORY(test)
--- trunk/extragear/graphics/kipi-plugins/dngconverter/plugin/CMakeLists.txt #866129:866130
@@ -8,13 +8,6 @@
SET_SOURCE_FILES_PROPERTIES(${_curentfile} PROPERTIES COMPILE_FLAGS -w)
ENDFOREACH(_curentfile ${libxmp_SRCS})
-SET(kipiplugin_dngconverter_PART_SRCS plugin_dngconverter.cpp
- actionthread.cpp
- batchdialog.cpp
- settingswidget.cpp
- ${libdngwriter_SRCS}
- )
-
KDE4_ADD_PLUGIN(kipiplugin_dngconverter ${kipiplugin_dngconverter_PART_SRCS})
TARGET_LINK_LIBRARIES(kipiplugin_dngconverter
--- trunk/extragear/graphics/kipi-plugins/dngconverter/plugin/batchdialog.cpp #866129:866130
@@ -180,12 +180,12 @@
d->about = new KPAboutData(ki18n("DNG Image Converter"),
0,
KAboutData::License_GPL,
- ki18n("A Kipi plugin to batch convert RAW camera images to DNG"),
+ ki18n("A tool to batch convert RAW camera images to DNG"),
ki18n("(c) 2008, Gilles Caulier"));
d->about->addAuthor(ki18n("Gilles Caulier"),
- ki18n("Author"),
- "caulier dot gilles at gmail dot com");
+ ki18n("Author"),
+ "caulier dot gilles at gmail dot com");
disconnect(this, SIGNAL(helpClicked()),
this, SLOT(slotHelp()));
@@ -230,8 +230,11 @@
connect(d->thread, SIGNAL(finished(const ActionData&)),
this, SLOT(slotAction(const ActionData&)));
- connect(d->iface, SIGNAL(gotThumbnail( const KUrl&, const QPixmap& )),
- this, SLOT(slotThumbnail(const KUrl&, const QPixmap&)));
+ if (d->iface)
+ {
+ connect(d->iface, SIGNAL(gotThumbnail( const KUrl&, const QPixmap& )),
+ this, SLOT(slotThumbnail(const KUrl&, const QPixmap&)));
+ }
// ---------------------------------------------------------------
@@ -410,7 +413,7 @@
if (!urlList.empty())
{
- if (!d->iface->hasFeature(KIPI::HostSupportsThumbnails))
+ if (!d->iface || !d->iface->hasFeature(KIPI::HostSupportsThumbnails))
d->thread->thumbRawFiles(urlList);
else
d->iface->thumbnails(urlList, 256);
@@ -555,11 +558,14 @@
d->currentConvertItem->setDestFileName(QFileInfo(destFile).fileName());
d->currentConvertItem->setProgressIcon(SmallIcon("dialog-ok"));
- // Assign Kipi host attributes from original RAW image.
+ if (d->iface)
+ {
+ // Assign Kipi host attributes from original RAW image.
- KIPI::ImageInfo orgInfo = d->iface->info(url);
- KIPI::ImageInfo newInfo = d->iface->info(KUrl(destFile));
- newInfo.cloneData(orgInfo);
+ KIPI::ImageInfo orgInfo = d->iface->info(url);
+ KIPI::ImageInfo newInfo = d->iface->info(KUrl(destFile));
+ newInfo.cloneData(orgInfo);
+ }
}
}
--- trunk/extragear/graphics/kipi-plugins/dngconverter/plugin/plugin_dngconverter.h #866129:866130
@@ -41,10 +41,11 @@
KIPI::Category category(KAction* action) const;
void setup(QWidget* widget);
+ static bool isRAWFile(const QString& filePath);
+
private:
bool checkBinaries();
- bool isRAWFile(const QString& filePath);
private slots:
--- trunk/extragear/graphics/kipi-plugins/dngconverter/test/CMakeLists.txt #866129:866130
@@ -1,6 +1,5 @@
# =======================================================
-
# DNGVALIDATE tool from DNG SDK
# Disable DNG SDK warnings: we will never touch this code.
@@ -30,7 +29,7 @@
)
# =======================================================
-# RAW2DNG tool
+# RAW2DNG command line tool
SET(raw2dng_SRCS raw2dng.cpp)
@@ -48,3 +47,21 @@
${KDCRAW_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
+
+# =======================================================
+# Stand alone version of dngconverter plugin
+
+SET(dngconverter_SRCS dngconverter.cpp ${kipiplugin_dngconverter_PART_SRCS})
+
+KDE4_ADD_EXECUTABLE(dngconverter ${dngconverter_SRCS})
+
+TARGET_LINK_LIBRARIES(dngconverter
+ ${EXPAT_LIBRARY}
+ ${KDE4_KDEUI_LIBS}
+ ${QT_AND_KDECORE_LIBS}
+ ${QT_LIBRARIES}
+ ${KEXIV2_LIBRARIES}
+ ${KDCRAW_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
+ kipiplugins
+ )
\ No newline at end of file
** trunk/extragear/graphics/kipi-plugins/dngconverter/test/dngconverter.cpp #property svn:eol-style
+ native
More information about the Kde-imaging
mailing list