extragear/graphics/digikam/imageplugins/coreplugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

extragear/graphics/digikam/imageplugins/coreplugin

Gilles Caulier-4
SVN commit 685216 by cgilles:

digiKam from trunk : Black and White Converter image plugin is now ported to KDE4
CCMAIL: [hidden email]


 M  +1 -1      CMakeLists.txt  
 M  +13 -13    imageeffect_bwsepia.cpp  
 M  +4 -4      imageeffect_bwsepia.h  
 M  +0 -1      imageeffect_iccproof.cpp  
 M  +18 -15    imageplugin_core.cpp  


--- trunk/extragear/graphics/digikam/imageplugins/coreplugin/CMakeLists.txt #685215:685216
@@ -48,7 +48,7 @@
     ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_autocorrection.cpp
     ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_redeye.cpp
     ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_iccproof.cpp
-#    ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_bwsepia.cpp
+    ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_bwsepia.cpp
 #    ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/hsl/hspreviewwidget.cpp
 #    ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/hsl/imageeffect_hsl.cpp
 #    ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/sharpnesseditor/imageeffect_sharpen.cpp
--- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageeffect_bwsepia.cpp #685215:685216
@@ -470,17 +470,17 @@
     gridTab2->addMultiCellWidget(spaceh, 1, 1, 2, 2);
     gridTab2->addMultiCellWidget(hGradient, 2, 2, 2, 2);
     gridTab2->addMultiCellWidget(m_cInput, 4, 4, 0, 2);
-    gridTab2->setRowSpacing(3, spacingHint());
+    gridTab2->setRowMinimumHeight(3, spacingHint());
     gridTab2->setRowStretch(5, 10);
     gridTab2->setMargin(spacingHint());
     gridTab2->setSpacing(0);
     
     // -------------------------------------------------------------
 
-    m_tab->insertTab(m_bwFilm, i18n("Film"),         FilmTab);
-    m_tab->insertTab(vbox,     i18n("Lens Filters"), BWFiltersTab);
-    m_tab->insertTab(m_bwTone, i18n("Tone"),         ToneTab);
-    m_tab->insertTab(curveBox, i18n("Lightness"),    LuminosityTab);
+    m_tab->insertTab(FilmTab,       m_bwFilm, i18n("Film"));
+    m_tab->insertTab(BWFiltersTab,  vbox,     i18n("Lens Filters"));
+    m_tab->insertTab(ToneTab,       m_bwTone, i18n("Tone"));
+    m_tab->insertTab(LuminosityTab, curveBox, i18n("Lightness"));
 
     gridSettings->addMultiCellLayout(l1, 0, 0, 0, 4);
     gridSettings->addMultiCellWidget(histoBox, 1, 2, 0, 4);
@@ -612,15 +612,15 @@
             break;
     }
 
-    m_histogramWidget->repaint(false);
+    m_histogramWidget->repaint();
 }
 
 void ImageEffect_BWSepia::slotScaleChanged(int scale)
 {
     m_histogramWidget->m_scaleType = scale;
-    m_histogramWidget->repaint(false);
+    m_histogramWidget->repaint();
     m_curvesWidget->m_scaleType = scale;
-    m_curvesWidget->repaint(false);
+    m_curvesWidget->repaint();
 }
 
 void ImageEffect_BWSepia::slotSpotColorChanged(const Digikam::DColor &color)
@@ -638,8 +638,8 @@
     KSharedConfig::Ptr config = KGlobal::config();
     KConfigGroup group        = config->group("convertbw Tool Dialog");
 
-    m_tab->setCurrentPage(group.readEntry("Settings Tab", (int)BWFiltersTab));
-    m_channelCB->setCurrentItem(group.readEntry("Histogram Channel", 0));    // Luminosity.
+    m_tab->setCurrentIndex(group.readEntry("Settings Tab", (int)BWFiltersTab));
+    m_channelCB->setCurrentIndex(group.readEntry("Histogram Channel", 0));    // Luminosity.
     m_scaleBG->button(group.readEntry("Histogram Scale",
                       (int)Digikam::HistogramWidget::LogScaleHistogram))->setChecked(true);
 
@@ -672,7 +672,7 @@
     for (int i = 0 ; i < 5 ; i++)
         m_curves->curvesCalculateCurve(i);
 
-    slotChannelChanged(m_channelCB->currentItem());
+    slotChannelChanged(m_channelCB->currentIndex());
     slotScaleChanged(m_scaleBG->checkedId());
     slotFilterSelected(m_bwFilters->currentItem());
 }
@@ -681,8 +681,8 @@
 {
     KSharedConfig::Ptr config = KGlobal::config();
     KConfigGroup group        = config->group("convertbw Tool Dialog");
-    group.writeEntry("Settings Tab", m_tab->currentPageIndex());
-    group.writeEntry("Histogram Channel", m_channelCB->currentItem());
+    group.writeEntry("Settings Tab", m_tab->currentIndex());
+    group.writeEntry("Histogram Channel", m_channelCB->currentIndex());
     group.writeEntry("Histogram Scale", m_scaleBG->checkedId());
     group.writeEntry("BW Filter", m_bwFilters->currentItem());
     group.writeEntry("BW Film", m_bwFilm->currentItem());
--- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageeffect_bwsepia.h #685215:685216
@@ -161,11 +161,11 @@
     
     QComboBox                    *m_channelCB;
     
-    Q3HButtonGroup                *m_scaleBG;
+    QButtonGroup                 *m_scaleBG;
     
-    Q3ListBox                     *m_bwFilters;
-    Q3ListBox                     *m_bwFilm;
-    Q3ListBox                     *m_bwTone;
+    Q3ListBox                    *m_bwFilters;
+    Q3ListBox                    *m_bwFilm;
+    Q3ListBox                    *m_bwTone;
 
     KIntNumInput                 *m_cInput;
     KIntNumInput                 *m_strengthInput;
--- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageeffect_iccproof.cpp #685215:685216
@@ -1327,4 +1327,3 @@
 }
 
 } // NameSpace DigikamImagesPluginCore
-
--- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageplugin_core.cpp #685215:685216
@@ -126,17 +126,18 @@
     connect(m_colorManagementAction, SIGNAL(triggered(bool) ),
             this, SLOT(slotColorManagement()));
 
-/*
+
     //-------------------------------
     // Filters menu actions.
 
-    m_BWAction = new KAction(i18n("Black && White..."), "bwtonal", 0,
-                     this, SLOT(slotBW()),
-                     actionCollection(), "implugcore_blackwhite");
+    m_BWAction = new KAction(KIcon("bwtonal"), i18n("Black && White..."), this);
+    actionCollection()->addAction("implugcore_blackwhite", m_BWAction );
+    connect(m_BWAction, SIGNAL(triggered(bool) ),
+            this, SLOT(slotBW()));
 
     //-------------------------------
     // Transform menu actions.
-    
+/*    
     m_aspectRatioCropAction = new KAction(i18n("Aspect Ratio Crop..."), "ratiocrop", 0,
                                   this, SLOT(slotRatioCrop()),
                                   actionCollection(), "implugcore_ratiocrop");
@@ -165,14 +166,16 @@
     m_BCGAction->setEnabled(enable);
     m_RGBAction->setEnabled(enable);
     m_blurAction->setEnabled(enable);
-
-/*    m_redeyeAction->setEnabled(enable);
-    m_HSLAction->setEnabled(enable);
+    m_redeyeAction->setEnabled(enable);
     m_autoCorrectionAction->setEnabled(enable);
     m_BWAction->setEnabled(enable);
+    m_colorManagementAction->setEnabled(enable);
+    
+/*    
+    m_HSLAction->setEnabled(enable);
     m_aspectRatioCropAction->setEnabled(enable);
     m_sharpenAction->setEnabled(enable);
-    m_colorManagementAction->setEnabled(enable);*/
+    */
 }
 
 void ImagePlugin_Core::slotInvert()
@@ -282,6 +285,12 @@
     dlg.exec();
 }
 
+void ImagePlugin_Core::slotBW()
+{
+    DigikamImagesPluginCore::ImageEffect_BWSepia dlg(parentWidget());
+    dlg.exec();
+}
+
 void ImagePlugin_Core::slotSharpen()
 {
 /*    DigikamImagesPluginCore::ImageEffect_Sharpen dlg(parentWidget());
@@ -294,12 +303,6 @@
     dlg.exec();*/
 }
 
-void ImagePlugin_Core::slotBW()
-{
-/*    DigikamImagesPluginCore::ImageEffect_BWSepia dlg(parentWidget());
-    dlg.exec();*/
-}
-
 void ImagePlugin_Core::slotRatioCrop()
 {
 /*    DigikamImagesPluginCore::ImageEffect_RatioCrop dlg(parentWidget());
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel