[Digikam-devel] extragear/graphics/digikam

Angelo Naselli anaselli at linux.it
Fri Feb 6 00:22:50 GMT 2009


SVN commit 921944 by anaselli:

Added print management to ShowFoto. 
Don't need to reinvent the wheel, so i used gwenview code - that is a great improvement of my old one :) Thanks Aurelien

CCMAIL:  digikam-devel at kde.org,  aurelien.gateau at free.fr

 M  +10 -1     CMakeLists.txt  
 M  +1 -0      NEWS  
 M  +7 -0      digikam/CMakeLists.txt  
 M  +7 -7      utilities/imageeditor/editor/editorwindow.cpp  
 A             utilities/imageeditor/tools/digikamconfig.kcfg  
 A             utilities/imageeditor/tools/digikamconfig.kcfgc  
 D             utilities/imageeditor/tools/imageprint.cpp  
 D             utilities/imageeditor/tools/imageprint.h  
 AM            utilities/imageeditor/tools/printhelper.cpp   [License: GPL (v2+)]
 AM            utilities/imageeditor/tools/printhelper.h   [License: GPL (v2+)]
 AM            utilities/imageeditor/tools/printoptionspage.cpp   [License: GPL (v2+)]
 AM            utilities/imageeditor/tools/printoptionspage.h   [License: GPL (v2+)]
 A             utilities/imageeditor/tools/printoptionspage.ui  
 AM            utilities/imageeditor/tools/signalblocker.h   [License: GPL (v2+)]


--- trunk/extragear/graphics/digikam/CMakeLists.txt #921943:921944
@@ -559,10 +559,19 @@
        )
 
     SET(libdimgeditortools_SRCS
-        ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/imageprint.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/printhelper.cpp  
+        ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/printoptionspage.cpp  
         ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/imageresize.cpp
        )
 
+#     KDE4_ADD_UI_FILES(libdimgeditortools_SRCS
+#         ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/printoptionspage.ui
+#        )
+# 
+#     kde4_add_kcfg_files(libdimgeditortools_SRCS
+#         ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/tools/digikamconfig.kcfgc
+#        )
+
     SET(librawimport_SRCS
         ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/rawimport/rawpostprocessing.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/utilities/imageeditor/rawimport/rawimport.cpp
--- trunk/extragear/graphics/digikam/NEWS #921943:921944
@@ -4,6 +4,7 @@
 NEW FEATURES:
 
 General        : Sidebar type is configurable: title is visible for only active tab, or for all tabs.
+ShowFoto       : Added print management
 
 BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
 
--- trunk/extragear/graphics/digikam/digikam/CMakeLists.txt #921943:921944
@@ -93,6 +93,13 @@
                         ${librawimport_SRCS}
    )
 
+    KDE4_ADD_UI_FILES(digikamcore_LIB_SRCS
+        ${CMAKE_CURRENT_SOURCE_DIR}/../utilities/imageeditor/tools/printoptionspage.ui
+       )
+
+    kde4_add_kcfg_files(digikamcore_LIB_SRCS
+        ${CMAKE_CURRENT_SOURCE_DIR}/../utilities/imageeditor/tools/digikamconfig.kcfgc
+       )
 KDE4_ADD_LIBRARY(digikamcore SHARED ${digikamcore_LIB_SRCS})
 
 TARGET_LINK_LIBRARIES(digikamcore
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #921943:921944
@@ -104,7 +104,6 @@
 #include "imagedialog.h"
 #include "imageplugin.h"
 #include "imagepluginloader.h"
-#include "imageprint.h"
 #include "imageresize.h"
 #include "iofilesettingscontainer.h"
 #include "libsinfodlg.h"
@@ -116,6 +115,7 @@
 #include "statusprogressbar.h"
 #include "themeengine.h"
 #include "thumbbar.h"
+#include "printhelper.h"
 
 namespace Digikam
 {
@@ -607,11 +607,6 @@
 
 void EditorWindow::printImage(KUrl /*url*/)
 {
-#ifndef Q_CC_MSVC
-#warning "TODO: KPrinter is disabled for KDE4.0";
-#endif
-
-/*
     uchar* ptr      = m_canvas->interface()->getImage();
     int w           = m_canvas->interface()->origWidth();
     int h           = m_canvas->interface()->origHeight();
@@ -623,6 +618,10 @@
 
     DImg image(w, h, sixteenBit, hasAlpha, ptr);
 
+    PrintHelper printHelp(this);
+    printHelp.print(image);
+
+    /*
     KPrinter printer;
     QString appName = KGlobal::mainComponent().aboutData()->appName();
     printer.setDocName( url.fileName() );
@@ -639,7 +638,8 @@
             KMessageBox::error(this, i18n("Failed to print file: '%1'",
                                url.fileName()));
         }
-    }*/
+    }
+    */
 }
 
 void EditorWindow::slotEditKeys()
** trunk/extragear/graphics/digikam/utilities/imageeditor/tools/printhelper.cpp #property svn:eol-style
   + native
** trunk/extragear/graphics/digikam/utilities/imageeditor/tools/printhelper.h #property svn:eol-style
   + native
** trunk/extragear/graphics/digikam/utilities/imageeditor/tools/printoptionspage.cpp #property svn:eol-style
   + native
** trunk/extragear/graphics/digikam/utilities/imageeditor/tools/printoptionspage.h #property svn:eol-style
   + native
** trunk/extragear/graphics/digikam/utilities/imageeditor/tools/signalblocker.h #property svn:eol-style
   + native



More information about the Digikam-devel mailing list