[Digikam-devel] extragear/graphics/digikam/utilities/imageeditor/editor

Francisco J. Cruz fj.cruz at supercable.es
Mon Dec 12 21:36:26 GMT 2005


SVN commit 488016 by fjcruz:

Real dynamic support for color management, using settings from dialog setup has been added. Please test and report.

CCMAIL:digikam-devel at kde.org

 M  +26 -1     imagewindow.cpp  
 M  +3 -0      imagewindow.h  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp #488015:488016
@@ -80,6 +80,7 @@
 #include "imageinfo.h"
 #include "imagepropertiessidebardb.h"
 #include "tagspopupmenu.h"
+#include "iccsettingscontainer.h"
 
 ImageWindow* ImageWindow::imagewindow()
 {
@@ -103,6 +104,8 @@
     m_dirtyImage            = false;
     m_view                  = 0L;
 
+    m_container             = new ICCSettingsContainer();
+
     // -- construct the view ---------------------------------
 
     QWidget* widget  = new QWidget(this);
@@ -526,6 +529,18 @@
     histogramType = (histogramType < 0 || histogramType > 5) ? 0 : histogramType;
     m_viewHistogramAction->setCurrentItem(histogramType);
     slotViewHistogram(); // update
+
+    // Settings for Color Management stuff
+    config->setGroup("Color Management");
+
+    m_container->enableCMSetting = config->readBoolEntry("EnableCM");
+    m_container->askOrApplySetting = config->readBoolEntry("BehaviourICC");
+    m_container->BPCSetting = config->readBoolEntry("BPCAlgorithm");
+    m_container->renderingSetting = config->readNumEntry("RenderingIntent");
+    m_container->inputSetting = config->readPathEntry("InProfileFile");
+    m_container->workspaceSetting = config->readPathEntry("WorkProfileFile");
+    m_container->monitorSetting = config->readPathEntry("MonitorProfileFile");
+    m_container->proofSetting = config->readPathEntry("ProofProfileFile");
 }
 
 void ImageWindow::saveSettings()
@@ -567,7 +582,17 @@
     {
         QApplication::setOverrideCursor(Qt::WaitCursor);
 
-        m_isReadOnly = m_canvas->load(m_urlCurrent.path());
+        // FIXME implement color management here
+        if (m_container->enableCMSetting)
+        {
+            kdDebug() << "enableCMSetting=true" << endl;
+            m_isReadOnly = m_canvas->load(m_urlCurrent.path(), m_container, m_instance);
+        }
+        else
+        {
+            kdDebug() << "imagewindow.cpp line 594" << endl;
+            m_isReadOnly = m_canvas->load(m_urlCurrent.path());
+        }
         
         m_rotatedOrFlipped = false;
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.h #488015:488016
@@ -45,6 +45,7 @@
 
 class Canvas;
 class AlbumIconView;
+class ICCSettingsContainer;
 
 namespace Digikam
 {
@@ -149,6 +150,8 @@
     static ImageWindow     *m_instance;
 
     Canvas                 *m_canvas;
+
+    ICCSettingsContainer   *m_container;
     
     // Allow to use Image properties and 
     // Comments/Tags dialogs from main window.



More information about the Digikam-devel mailing list