void BatchProcessImagesDialog::slotAddDropItems(const QStringList& filesPath) { if (filesPath.isEmpty()) return; for (QStringList::const_iterator it = filesPath.constBegin(); it != filesPath.constEnd(); ++it) { QString currentDropFile = *it; // Check if the new item already exist in the list. bool findItem = false; for (KUrl::List::Iterator it2 = m_selectedImageFiles.begin(); it2 != m_selectedImageFiles.end(); ++it2) { QString currentFile = (*it2).path(); // PENDING(blackie) Handle URL's if (currentFile == currentDropFile) findItem = true; } if (findItem == false) m_selectedImageFiles.append(currentDropFile); } listImageFiles(); }
EffectImagesDialog::EffectImagesDialog(const KUrl::List& urlList, QWidget* parent) : BatchProcessImagesDialog(urlList, i18n("Batch Image Effects"), parent) { m_nbItem = m_selectedImageFiles.count(); //--------------------------------------------- setOptionBoxTitle(i18n("Image Effect Options")); m_labelType->setText(i18n("Effect:")); m_Type->addItem(i18nc("image effect", "Adaptive Threshold")); // 0 m_Type->addItem(i18nc("image effect", "Charcoal")); m_Type->addItem(i18nc("image effect", "Detect Edges")); m_Type->addItem(i18nc("image effect", "Emboss")); m_Type->addItem(i18nc("image effect", "Implode")); m_Type->addItem(i18nc("image effect", "Paint")); // 5 m_Type->addItem(i18nc("image effect", "Shade Light")); m_Type->addItem(i18nc("image effect", "Solarize")); m_Type->addItem(i18nc("image effect", "Spread")); m_Type->addItem(i18nc("image effect", "Swirl")); m_Type->addItem(i18nc("image effect", "Wave")); // 10 m_Type->setCurrentItem(i18nc("image effect", "Emboss")); QString whatsThis = i18n( "<p>Select here the effect type for your images:</p>" "<p>" "<b>Adaptive threshold</b>: perform local adaptive thresholding. The algorithm " "selects an individual threshold for each pixel based on the range of intensity " "values in its local neighborhood. This allows for thresholding of an image whose " "global intensity histogram does not contain distinctive peaks.<br/>" "<b>Charcoal</b>: simulate a charcoal drawing.<br/>" "<b>Detect edges</b>: detect edges within an image.<br/>" "<b>Emboss</b>: returns a grayscale image with a three-dimensional effect. The " "algorithm convolves the image with a Gaussian operator of the given radius and " "standard deviation.<br/>" "<b>Implode</b>: implode image pixels about the center.<br/>" "<b>Paint</b>: applies a special effect filter that simulates an oil painting.<br/>" "<b>Shade light</b>: shines a distant light on an image to create a three-dimensional " "effect.<br/>" "<b>Solarize</b>: negate all pixels above the threshold level. This algorithm produces a " "solarization effect seen when exposing a photographic film to light during the development " "process.<br/>" "<b>Spread</b>: this is a special-effect method that randomly displaces each pixel in a " "block defined by the radius parameter.<br/>" "<b>Swirl</b>: swirls the pixels about the center of the image. <br/>" "<b>Wave</b>: creates a \"ripple\" effect in the image by shifting the pixels vertically " "along a sine wave." "</p>"); m_Type->setWhatsThis(whatsThis); //--------------------------------------------- readSettings(); listImageFiles(); }
void ConvertImagesDialog::slotTypeChanged(int type) { if ( type == 3 || type == 4 || type == 6 ) // PPM || BMP || EPS m_optionsButton->setEnabled(false); else m_optionsButton->setEnabled(true); m_listFiles->clear(); listImageFiles(); }
FilterImagesDialog::FilterImagesDialog(const KUrl::List& urlList, QWidget *parent) : BatchProcessImagesDialog(urlList, i18n("Batch Image Filtering"), parent) { m_nbItem = m_selectedImageFiles.count(); //--------------------------------------------- setOptionBoxTitle(i18n("Image Filtering Options")); m_labelType->setText(i18n("Filter:")); m_Type->addItem(i18nc("image filter", "Add Noise")); // 0 m_Type->addItem(i18nc("image filter", "Antialias")); m_Type->addItem(i18nc("image filter", "Blur")); m_Type->addItem(i18nc("image filter", "Despeckle")); m_Type->addItem(i18nc("image filter", "Enhance")); // 4 m_Type->addItem(i18nc("image filter", "Median")); m_Type->addItem(i18nc("image filter", "Noise Reduction")); m_Type->addItem(i18nc("image filter", "Sharpen")); m_Type->addItem(i18nc("image filter", "Unsharp")); // 8 m_Type->setCurrentItem(i18nc("image filter", "Sharpen")); QString whatsThis = i18n( "<p>Select here the filter type for your images:</p>" "<p>" "<b>Add noise</b>: add artificial noise to an image.<br/>" "<b>Antialias</b>: remove pixel aliasing.<br/>" "<b>Blur</b>: blur the image with a Gaussian operator.<br/>" "<b>Despeckle</b>: reduces the speckle noise in an image while preserving the " "edges of the original image.<br/>" "<b>Enhance</b>: apply a digital filter to enhance a noisy image.<br/>" "<b>Median</b>: apply a median filter to an image.<br/>" "<b>Noise reduction</b>: reduce noise in an image. <br/>" "<b>Sharpen</b>: sharpen the image with a Gaussian operator.<br/>" "<b>Unsharp</b>: sharpen the image with an unsharp mask operator." "</p>"); m_Type->setWhatsThis(whatsThis); //--------------------------------------------- readSettings(); listImageFiles(); slotTypeChanged(m_Type->currentIndex()); }
RecompressImagesDialog::RecompressImagesDialog(const KUrl::List& urlList, KIPI::Interface* interface, QWidget *parent) : BatchProcessImagesDialog(urlList, interface, i18n("Batch Recompress Images"), parent) { // About data and help button. m_about = new KIPIPlugins::KPAboutData(ki18n("Batch recompress images"), QByteArray(), KAboutData::License_GPL, ki18n("A Kipi plugin to batch recompress images.\n" "This plugin uses the \"convert\" program from the \"ImageMagick\" package."), ki18n("(c) 2003-2009, Gilles Caulier\n" "(c) 2007-2009, Aurélien Gateau")); m_about->addAuthor(ki18n("Gilles Caulier"), ki18n("Author"), "caulier dot gilles at gmail dot com"); m_about->addAuthor(ki18n("Aurelien Gateau"), ki18n("Maintainer"), "aurelien dot gateau at free dot fr"); DialogUtils::setupHelpButton(this, m_about); //--------------------------------------------- m_nbItem = m_selectedImageFiles.count(); //--------------------------------------------- setOptionBoxTitle(i18n("Image Recompression Options")); m_labelType->hide(); m_Type->hide(); setPreviewOptionsVisible(false); //--------------------------------------------- readSettings(); listImageFiles(); }
FilterImagesDialog::FilterImagesDialog(const KUrl::List& urlList, KIPI::Interface* interface, QWidget *parent) : BatchProcessImagesDialog(urlList, interface, i18n("Batch Image Filtering"), parent) { // About data and help button. m_about = new KIPIPlugins::KPAboutData(ki18n("Batch image filtering"), QByteArray(), KAboutData::License_GPL, ki18n("A Kipi plugin to batch filter images.\n" "This plugin uses the \"convert\" program from the \"ImageMagick\" package."), ki18n("(c) 2003-2009, Gilles Caulier\n" "(c) 2007-2009, Aurélien Gateau")); m_about->addAuthor(ki18n("Gilles Caulier"), ki18n("Author"), "caulier dot gilles at gmail dot com"); m_about->addAuthor(ki18n("Aurelien Gateau"), ki18n("Maintainer"), "aurelien dot gateau at free dot fr"); DialogUtils::setupHelpButton(this, m_about); //--------------------------------------------- m_nbItem = m_selectedImageFiles.count(); //--------------------------------------------- setOptionBoxTitle(i18n("Image Filtering Options")); m_labelType->setText(i18n("Filter:")); m_Type->addItem(i18nc("image filter", "Add Noise")); // 0 m_Type->addItem(i18nc("image filter", "Antialias")); m_Type->addItem(i18nc("image filter", "Blur")); m_Type->addItem(i18nc("image filter", "Despeckle")); m_Type->addItem(i18nc("image filter", "Enhance")); // 4 m_Type->addItem(i18nc("image filter", "Median")); m_Type->addItem(i18nc("image filter", "Noise Reduction")); m_Type->addItem(i18nc("image filter", "Sharpen")); m_Type->addItem(i18nc("image filter", "Unsharp")); // 8 m_Type->setCurrentItem(i18nc("image filter", "Sharpen")); QString whatsThis = i18n( "<p>Select here the filter type for your images:</p>" "<p>" "<b>Add noise</b>: add artificial noise to an image.<br/>" "<b>Antialias</b>: remove pixel aliasing.<br/>" "<b>Blur</b>: blur the image with a Gaussian operator.<br/>" "<b>Despeckle</b>: reduces the speckle noise in an image while preserving the " "edges of the original image.<br/>" "<b>Enhance</b>: apply a digital filter to enhance a noisy image.<br/>" "<b>Median</b>: apply a median filter to an image.<br/>" "<b>Noise reduction</b>: reduce noise in an image. <br/>" "<b>Sharpen</b>: sharpen the image with a Gaussian operator.<br/>" "<b>Unsharp</b>: sharpen the image with an unsharp mask operator." "</p>"); m_Type->setWhatsThis(whatsThis); //--------------------------------------------- readSettings(); listImageFiles(); slotTypeChanged(m_Type->currentIndex()); }