SVN commit 684549 by cgilles:
digiKam from trunk : port Bur tool to KDE4. CCMAIL: [hidden email] M +1 -1 CMakeLists.txt M +14 -15 imageeffect_blur.cpp M +8 -6 imageplugin_core.cpp --- trunk/extragear/graphics/digikam/imageplugins/coreplugin/CMakeLists.txt #684548:684549 @@ -44,7 +44,7 @@ ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageplugin_core.cpp ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_bcg.cpp ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_rgb.cpp -# ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_blur.cpp + ${CMAKE_SOURCE_DIR}/digikam/imageplugins/coreplugin/imageeffect_blur.cpp # ${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 --- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageeffect_blur.cpp #684548:684549 @@ -23,12 +23,9 @@ // Qt includes. -#include <qlayout.h> -#include <qlabel.h> +#include <QLabel> +#include <QGridLayout> -//Added by qt3to4: -#include <Q3GridLayout> - // KDE includes. #include <kaboutdata.h> @@ -57,27 +54,30 @@ : Digikam::CtrlPanelDlg(parent, i18n("Apply Gaussian Blur on Photograph"), "gaussianblur") { - setHelp("blursharpentool.anchor", KApplication::kApplication()->aboutData()->appName()); + setHelp("blursharpentool.anchor", "digikam"); - QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); - Q3GridLayout* gridSettings = new Q3GridLayout( gboxSettings, 1, 1, 0, spacingHint()); + QWidget *gboxSettings = new QWidget(m_imagePreviewWidget); + QGridLayout* gridSettings = new QGridLayout( gboxSettings ); + QLabel *label = new QLabel(i18n("Smoothness:"), gboxSettings); m_radiusInput = new KIntNumInput(gboxSettings); m_radiusInput->setRange(0, 100, 1, true); m_radiusInput->setValue(0); m_radiusInput->setWhatsThis( i18n("<p>A smoothness of 0 has no effect, " - "1 and above determine the Gaussian blur matrix radius " - "that determines how much to blur the image.")); + "1 and above determine the Gaussian blur matrix radius " + "that determines how much to blur the image.")); - gridSettings->addMultiCellWidget(label, 0, 0, 0, 1); - gridSettings->addMultiCellWidget(m_radiusInput, 1, 1, 0, 1); - + gridSettings->addWidget(label, 0, 0, 1, 2 ); + gridSettings->addWidget(m_radiusInput, 1, 0, 1, 2 ); + gridSettings->setMargin(spacingHint()); + gridSettings->setSpacing(spacingHint()); + m_imagePreviewWidget->setUserAreaWidget(gboxSettings); // ------------------------------------------------------------- - connect(m_radiusInput, SIGNAL(valueChanged (int)), + connect(m_radiusInput, SIGNAL(valueChanged(int)), this, SLOT(slotTimer())); } @@ -152,4 +152,3 @@ } } // NameSpace DigikamImagesPluginCore - --- trunk/extragear/graphics/digikam/imageplugins/coreplugin/imageplugin_core.cpp #684548:684549 @@ -60,10 +60,12 @@ //------------------------------- // Fix and Colors menu actions -/* m_blurAction = new KAction(i18n("Blur..."), "blurimage", 0, - this, SLOT(slotBlur()), - actionCollection(), "implugcore_blur"); + m_blurAction = new KAction(KIcon("blurimage"), i18n("Blur..."), this); + actionCollection()->addAction("implugcore_blur", m_blurAction ); + connect(m_blurAction, SIGNAL(triggered(bool) ), + this, SLOT(slotBlur())); +/* m_sharpenAction = new KAction(i18n("Sharpen..."), "sharpenimage", 0, this, SLOT(slotSharpen()), actionCollection(), "implugcore_sharpen"); @@ -157,6 +159,7 @@ m_invertAction->setEnabled(enable); m_BCGAction->setEnabled(enable); m_RGBAction->setEnabled(enable); + m_blurAction->setEnabled(enable); /* m_redeyeAction->setEnabled(enable); m_HSLAction->setEnabled(enable); @@ -164,7 +167,6 @@ m_BWAction->setEnabled(enable); m_aspectRatioCropAction->setEnabled(enable); m_sharpenAction->setEnabled(enable); - m_blurAction->setEnabled(enable); m_colorManagementAction->setEnabled(enable);*/ } @@ -238,8 +240,8 @@ void ImagePlugin_Core::slotBlur() { -/* DigikamImagesPluginCore::ImageEffect_Blur dlg(parentWidget()); - dlg.exec();*/ + DigikamImagesPluginCore::ImageEffect_Blur dlg(parentWidget()); + dlg.exec(); } void ImagePlugin_Core::slotSharpen() _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |