Commit 0d6b2a86 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Limit Gaussian Blur filter radius to 100px when used as a mask

When used as a mask, Krita should recalculate additional
need/changeRect of the processed area of size:
actualSize + 4 * radius, which is too much of work.

In older version of Krita the test file loaded fine, because
colorize mask did update itself on loading and didn't provoke
full mask update. If you provoke full gaussian mask update
manually, you'll get the same 12-minutes recalculation process
(and it cannot run in threads, because access rects intersect
heavily).

The patch does the following:

1) When loading filter masks and filter layers: forcefully
   (and silently) limit gaussian blur size to 100 px.

2) When creating filter masks and filter layers, limit radius
   slider to 100 px.

3) When changing properties of Gaussian Blur mask, limit the
   radius slider to 100 px.

4) When applying Gaussian Blur filter directly, allow the user
   to select radius in full range: 0...1000 px

BUG:407062
parent a3a4a7bf
......@@ -131,3 +131,14 @@ bool KisFilter::needsTransparentPixels(const KisFilterConfigurationSP config, co
return false;
}
bool KisFilter::configurationAllowedForMask(KisFilterConfigurationSP config) const
{
Q_UNUSED(config);
return supportsAdjustmentLayers();
}
void KisFilter::fixLoadedFilterConfigurationForMasks(KisFilterConfigurationSP config) const
{
Q_UNUSED(config);
}
......@@ -112,6 +112,9 @@ public:
virtual bool needsTransparentPixels(const KisFilterConfigurationSP config, const KoColorSpace *cs) const;
virtual bool configurationAllowedForMask(KisFilterConfigurationSP config) const;
virtual void fixLoadedFilterConfigurationForMasks(KisFilterConfigurationSP config) const;
protected:
QString configEntryGroup() const;
......
......@@ -95,7 +95,7 @@ KisFilterConfigurationSP KisBaseProcessor::defaultConfiguration() const
return factoryConfiguration();
}
KisConfigWidget * KisBaseProcessor::createConfigurationWidget(QWidget *, const KisPaintDeviceSP) const
KisConfigWidget * KisBaseProcessor::createConfigurationWidget(QWidget *, const KisPaintDeviceSP, bool) const
{
return 0;
}
......
......@@ -108,8 +108,10 @@ public:
*
* @param parent the Qt owner widget of this widget
* @param dev the paintdevice this filter will act on
* @param useForMasks shown if the filer is going to be used in a mask. Some filters
* may provide limited options when applied as a mask (e.g. Gaussian Blur)
*/
virtual KisConfigWidget * createConfigurationWidget(QWidget * parent, const KisPaintDeviceSP dev) const;
virtual KisConfigWidget * createConfigurationWidget(QWidget * parent, const KisPaintDeviceSP dev, bool useForMasks) const;
// "Support" functions
public:
/**
......
......@@ -85,7 +85,7 @@ void KisNodeFilterInterface::setFilter(KisFilterConfigurationSP filterConfig)
{
SANITY_RELEASE_FILTER(m_filter);
Q_ASSERT(filterConfig);
KIS_SAFE_ASSERT_RECOVER_RETURN(filterConfig);
m_filter = filterConfig;
SANITY_ACQUIRE_FILTER(m_filter);
......
......@@ -225,7 +225,7 @@ void FiltersCategoryModel::filterConfigurationChanged(int index, FiltersModel* m
KisFilterConfigurationSP config;
KisFilter* filter = model->filter(index);
if (filter->showConfigurationWidget() && filter->id() != QLatin1String("colortransfer")) {
KisConfigWidget* wdg = filter->createConfigurationWidget(0, d->view->activeNode()->original());
KisConfigWidget* wdg = filter->createConfigurationWidget(0, d->view->activeNode()->original(), false);
wdg->deleteLater();
config = KisFilterConfigurationSP(KisFilterRegistry::instance()->cloneConfiguration(dynamic_cast<KisFilterConfiguration*>(wdg->configuration().data())));
}
......
......@@ -137,7 +137,7 @@ void FiltersModel::addFilter(KisFilterSP filter)
// point in time, but for now it has no side effects, as this filter's default
// config is fine anyway.
if (filter->showConfigurationWidget() && filter->id() != QLatin1String("colortransfer")) {
KisConfigWidget* wdg = filter->createConfigurationWidget(0, d->view->activeNode()->original());
KisConfigWidget* wdg = filter->createConfigurationWidget(0, d->view->activeNode()->original(), false);
wdg->deleteLater();
d->configurations << KisFilterConfigurationSP(dynamic_cast<KisFilterConfiguration*>(wdg->configuration().data()));
......@@ -169,7 +169,7 @@ QObject* FiltersModel::configuration(int index)
if (!d->configurations[index]) {
// if we have a config widget to show, reinitialise the configuration, just in case
if(d->filters[index]->showConfigurationWidget() && d->filters[index]->id() != QLatin1String("colortransfer")) {
KisConfigWidget* wdg = d->filters[index]->createConfigurationWidget(0, d->view->activeNode()->original());
KisConfigWidget* wdg = d->filters[index]->createConfigurationWidget(0, d->view->activeNode()->original(), false);
wdg->deleteLater();
d->configurations[index] = KisFilterConfigurationSP(dynamic_cast<KisFilterConfiguration*>(wdg->configuration().data()));
}
......
......@@ -89,7 +89,7 @@ KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisNodeSP node,
connect(m_layerName, SIGNAL(textChanged(QString)), this, SLOT(slotNameChanged(QString)));
if (m_currentFilter) {
m_currentConfigWidget = m_currentFilter->createConfigurationWidget(page, paintDevice);
m_currentConfigWidget = m_currentFilter->createConfigurationWidget(page, paintDevice, true);
if (m_currentConfigWidget) {
m_currentConfigWidget->setView(view);
......
......@@ -140,8 +140,11 @@ void KisDlgFilter::startApplyingFilter(KisFilterConfigurationSP config)
void KisDlgFilter::updatePreview()
{
if (!d->uiFilterDialog.filterSelection->configuration()) return;
KisFilterConfigurationSP config = d->uiFilterDialog.filterSelection->configuration();
if (!config) return;
bool maskCreationAllowed = !d->currentFilter || d->currentFilter->configurationAllowedForMask(config);
d->uiFilterDialog.pushButtonCreateMaskEffect->setEnabled(maskCreationAllowed);
if (d->uiFilterDialog.checkBoxPreview->isChecked()) {
KisFilterConfigurationSP config(d->uiFilterDialog.filterSelection->configuration());
......
......@@ -74,6 +74,7 @@
QGridLayout *widgetLayout {};
KisViewManager *view{};
bool showFilterGallery {true};
bool usedForMask {false};
};
KisFilterSelectorWidget::KisFilterSelectorWidget(QWidget* parent)
......@@ -123,6 +124,7 @@
if (d->filtersModel) delete d->filtersModel;
d->usedForMask = !showAll;
d->paintDevice = _paintDevice;
d->thumb = d->paintDevice->createThumbnailDevice(100, 100);
d->thumb->setDefaultBounds(new ThumbnailBounds());
......@@ -208,7 +210,7 @@
}
KisConfigWidget* widget =
d->currentFilter->createConfigurationWidget(d->uiFilterSelector.centralWidgetHolder, d->paintDevice);
d->currentFilter->createConfigurationWidget(d->uiFilterSelector.centralWidgetHolder, d->paintDevice, d->usedForMask);
if (!widget) { // No widget, so display a label instead
d->uiFilterSelector.comboBoxPresets->setEnabled(false);
......
......@@ -151,7 +151,7 @@ void KisWdgGenerator::slotGeneratorActivated(int row)
delete d->centralWidget;
KisConfigWidget* widget =
d->currentGenerator->createConfigurationWidget(d->uiWdgGenerators.centralWidgetHolder, d->dev);
d->currentGenerator->createConfigurationWidget(d->uiWdgGenerators.centralWidgetHolder, d->dev, true);
if (!widget) { // No widget, so display a label instead
d->centralWidget = new QLabel(i18n("No configuration options."),
......
......@@ -60,7 +60,7 @@ KoColorTransformation *KisFilterASCCDL::createTransformation(const KoColorSpace
config->getColor("power", black));
}
KisConfigWidget *KisFilterASCCDL::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget *KisFilterASCCDL::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
return new KisASCCDLConfigWidget(parent, dev->colorSpace());
}
......
......@@ -40,7 +40,7 @@ public:
return KoID("asc-cdl", i18n("Slope, Offset, Power(ASC-CDL)"));
}
KoColorTransformation *createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
KisConfigWidget *createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget *createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
bool needsTransparentPixels(const KisFilterConfigurationSP config, const KoColorSpace *cs) const override;
protected:
KisFilterConfigurationSP factoryConfiguration() const override;
......
......@@ -45,7 +45,7 @@ KisBlurFilter::KisBlurFilter() : KisFilter(id(), FiltersCategoryBlurId, i18n("&B
setColorSpaceIndependence(FULLY_INDEPENDENT);
}
KisConfigWidget * KisBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool) const
{
return new KisWdgBlur(parent);
}
......
......@@ -40,7 +40,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
};
......
......@@ -49,9 +49,9 @@ KisGaussianBlurFilter::KisGaussianBlurFilter() : KisFilter(id(), FiltersCategory
setColorSpaceIndependence(FULLY_INDEPENDENT);
}
KisConfigWidget * KisGaussianBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisGaussianBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool usedForMasks) const
{
return new KisWdgGaussianBlur(parent);
return new KisWdgGaussianBlur(usedForMasks, parent);
}
KisFilterConfigurationSP KisGaussianBlurFilter::factoryConfiguration() const
......@@ -121,3 +121,28 @@ QRect KisGaussianBlurFilter::changedRect(const QRect & rect, const KisFilterConf
return rect.adjusted( -halfWidth, -halfHeight, halfWidth, halfHeight);
}
bool KisGaussianBlurFilter::configurationAllowedForMask(KisFilterConfigurationSP config) const
{
ENTER_FUNCTION() << config->getFloat("horizRadius", 5.0) << config->getFloat("vertRadius", 5.0);
const float maxRadiusForMask = 100.0;
return config->getFloat("horizRadius", 5.0) <= maxRadiusForMask &&
config->getFloat("vertRadius", 5.0) <= maxRadiusForMask;
}
void KisGaussianBlurFilter::fixLoadedFilterConfigurationForMasks(KisFilterConfigurationSP config) const
{
ENTER_FUNCTION();
const float maxRadiusForMask = 100.0;
if (config->getFloat("horizRadius", 5.0) > maxRadiusForMask) {
config->setProperty("horizRadius", maxRadiusForMask);
}
if (config->getFloat("vertRadius", 5.0) > maxRadiusForMask) {
config->setProperty("vertRadius", maxRadiusForMask);
}
}
......@@ -42,9 +42,12 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
bool configurationAllowedForMask(KisFilterConfigurationSP config) const override;
void fixLoadedFilterConfigurationForMasks(KisFilterConfigurationSP config) const override;
};
#endif
......@@ -50,7 +50,7 @@ KisLensBlurFilter::KisLensBlurFilter() : KisFilter(id(), FiltersCategoryBlurId,
setColorSpaceIndependence(FULLY_INDEPENDENT);
}
KisConfigWidget * KisLensBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisLensBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool) const
{
return new KisWdgLensBlur(parent);
}
......
......@@ -50,7 +50,7 @@ public:
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
private:
static QPolygonF getIrisPolygon(const KisFilterConfigurationSP config, int lod);
......
......@@ -50,7 +50,7 @@ KisMotionBlurFilter::KisMotionBlurFilter() : KisFilter(id(), FiltersCategoryBlur
setColorSpaceIndependence(FULLY_INDEPENDENT);
}
KisConfigWidget * KisMotionBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisMotionBlurFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool) const
{
return new KisWdgMotionBlur(parent);
}
......
......@@ -44,7 +44,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
};
......
......@@ -31,14 +31,16 @@
#include "ui_wdg_gaussian_blur.h"
KisWdgGaussianBlur::KisWdgGaussianBlur(QWidget * parent) : KisConfigWidget(parent)
KisWdgGaussianBlur::KisWdgGaussianBlur(bool usedForMasks, QWidget * parent) : KisConfigWidget(parent)
{
m_widget = new Ui_WdgGaussianBlur();
m_widget->setupUi(this);
m_widget->aspectButton->setKeepAspectRatio(false);
m_widget->horizontalRadius->setRange(0.0, 1000.0, 2);
const qreal maxRadius = usedForMasks ? 100.0 : 1000.0;
m_widget->horizontalRadius->setRange(0.0, maxRadius, 2);
m_widget->horizontalRadius->setSingleStep(0.2);
m_widget->horizontalRadius->setValue(0.5);
m_widget->horizontalRadius->setExponentRatio(3.0);
......@@ -46,7 +48,7 @@ KisWdgGaussianBlur::KisWdgGaussianBlur(QWidget * parent) : KisConfigWidget(paren
connect(m_widget->horizontalRadius, SIGNAL(valueChanged(qreal)), this, SLOT(horizontalRadiusChanged(qreal)));
m_widget->verticalRadius->setRange(0.0, 1000.0, 2);
m_widget->verticalRadius->setRange(0.0, maxRadius, 2);
m_widget->verticalRadius->setSingleStep(0.2);
m_widget->verticalRadius->setValue(0.5);
m_widget->verticalRadius->setExponentRatio(3.0);
......
......@@ -29,7 +29,7 @@ class KisWdgGaussianBlur : public KisConfigWidget
{
Q_OBJECT
public:
KisWdgGaussianBlur(QWidget * parent);
KisWdgGaussianBlur(bool useForMasks, QWidget * parent);
~KisWdgGaussianBlur() override;
inline const Ui_WdgGaussianBlur* widget() const {
return m_widget;
......
......@@ -47,7 +47,7 @@ KisFilterColorToAlpha::KisFilterColorToAlpha()
setColorSpaceIndependence(FULLY_INDEPENDENT);
}
KisConfigWidget * KisFilterColorToAlpha::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisFilterColorToAlpha::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool) const
{
return new KisWdgColorToAlpha(parent);
}
......
......@@ -42,7 +42,7 @@ public:
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KisFilterConfigurationSP factoryConfiguration() const override;
};
......
......@@ -31,7 +31,7 @@ KisColorBalanceFilter::KisColorBalanceFilter()
setSupportsPainting(true);
}
KisConfigWidget * KisColorBalanceFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisColorBalanceFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisColorBalanceConfigWidget(parent);
......
......@@ -45,7 +45,7 @@ public:
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
......
......@@ -221,7 +221,7 @@ KisCrossChannelFilter::KisCrossChannelFilter() : KisMultiChannelFilter(id(), i18
KisCrossChannelFilter::~KisCrossChannelFilter()
{}
KisConfigWidget * KisCrossChannelFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisCrossChannelFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
return new KisCrossChannelConfigWidget(parent, dev);
}
......
......@@ -44,7 +44,7 @@ public:
KisCrossChannelFilter();
~KisCrossChannelFilter() override;
KisConfigWidget * createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KisFilterConfigurationSP factoryConfiguration() const override;
KoColorTransformation* createTransformation(const KoColorSpace *cs, const KisFilterConfigurationSP config) const override;
......
......@@ -66,7 +66,7 @@ KisDesaturateFilter::~KisDesaturateFilter()
{
}
KisConfigWidget *KisDesaturateFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget *KisDesaturateFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisDesaturateConfigWidget(parent);
......
......@@ -38,7 +38,7 @@ public:
~KisDesaturateFilter() override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
......
......@@ -97,7 +97,7 @@ KisHSVAdjustmentFilter::KisHSVAdjustmentFilter()
setSupportsPainting(true);
}
KisConfigWidget * KisHSVAdjustmentFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisHSVAdjustmentFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisHSVConfigWidget(parent);
......
......@@ -43,7 +43,7 @@ public:
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
......
......@@ -149,7 +149,7 @@ KisPerChannelFilter::KisPerChannelFilter() : KisMultiChannelFilter(id(), i18n("&
setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
}
KisConfigWidget * KisPerChannelFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisPerChannelFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
return new KisPerChannelConfigWidget(parent, dev);
}
......
......@@ -52,7 +52,7 @@ class KisPerChannelFilter : public KisMultiChannelFilter
public:
KisPerChannelFilter();
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KisFilterConfigurationSP factoryConfiguration() const override;
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
......
......@@ -135,7 +135,7 @@ KisFilterConfigurationSP KisConvertHeightToNormalMapFilter::factoryConfiguration
return config;
}
KisConfigWidget *KisConvertHeightToNormalMapFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget *KisConvertHeightToNormalMapFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
return new KisWdgConvertHeightToNormalMap(parent, dev->colorSpace());
}
......
......@@ -43,7 +43,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
};
......
......@@ -28,7 +28,7 @@ KisFilterDodgeBurn::KisFilterDodgeBurn(const QString& id, const QString& prefix,
setSupportsPainting(true);
}
KisConfigWidget * KisFilterDodgeBurn::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisFilterDodgeBurn::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisDodgeBurnConfigWidget(parent, id());
......
......@@ -35,7 +35,7 @@ public:
public:
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
private:
QString m_prefix;
};
......
......@@ -123,7 +123,7 @@ KisFilterConfigurationSP KisEdgeDetectionFilter::factoryConfiguration() const
return config;
}
KisConfigWidget *KisEdgeDetectionFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget *KisEdgeDetectionFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisWdgEdgeDetection(parent);
......
......@@ -45,7 +45,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
QRect neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
QRect changedRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const override;
};
......
......@@ -148,7 +148,7 @@ int KisEmbossFilter::Lim_Max(int Now, int Up, int Max) const
return (Up);
}
KisConfigWidget * KisEmbossFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisEmbossFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
......
......@@ -40,7 +40,7 @@ public:
}
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
protected:
KisFilterConfigurationSP factoryConfiguration() const override;
......
......@@ -66,7 +66,7 @@ KisFilterFastColorTransfer::KisFilterFastColorTransfer() : KisFilter(id(), Filte
}
KisConfigWidget * KisFilterFastColorTransfer::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisFilterFastColorTransfer::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
return new KisWdgFastColorTransfer(parent);
......
......@@ -48,7 +48,7 @@ public:
}
public:
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
KisFilterConfigurationSP factoryConfiguration() const override;
};
......
......@@ -97,7 +97,7 @@ KisFilterConfigurationSP KritaFilterGradientMap::factoryConfiguration() const
return config;
}
KisConfigWidget * KritaFilterGradientMap::createConfigurationWidget(QWidget * parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KritaFilterGradientMap::createConfigurationWidget(QWidget * parent, const KisPaintDeviceSP dev, bool) const
{
return new KritaGradientMapConfigWidget(parent, dev);
}
......
......@@ -46,7 +46,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
KisConfigWidget* createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget* createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
};
#endif
......@@ -192,7 +192,7 @@ KisFilterConfigurationSP KisHalftoneFilter::factoryConfiguration() const
return config;
}
KisConfigWidget *KisHalftoneFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const
KisConfigWidget *KisHalftoneFilter::createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool) const
{
return new KisHalftoneConfigWidget(parent, dev);
}
......
......@@ -79,7 +79,7 @@ public:
KisFilterConfigurationSP factoryConfiguration() const override;
KisConfigWidget *createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget *createConfigurationWidget(QWidget *parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
private:
QPolygonF m_gridPoints;
......
......@@ -48,7 +48,7 @@ KisSimpleNoiseReducer::~KisSimpleNoiseReducer()
{
}
KisConfigWidget * KisSimpleNoiseReducer::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisSimpleNoiseReducer::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
vKisIntegerWidgetParam param;
......
......@@ -36,7 +36,7 @@ public:
const KisFilterConfigurationSP config,
KoUpdater* progressUpdater
) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
static inline KoID id() {
return KoID("gaussiannoisereducer", i18n("Gaussian Noise Reducer"));
......
......@@ -46,7 +46,7 @@ KisWaveletNoiseReduction::~KisWaveletNoiseReduction()
{
}
KisConfigWidget * KisWaveletNoiseReduction::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP) const
KisConfigWidget * KisWaveletNoiseReduction::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP, bool) const
{
vKisDoubleWidgetParam param;
param.push_back(KisDoubleWidgetParam(0.0, 256.0, BEST_WAVELET_THRESHOLD_VALUE, i18n("Threshold"), "threshold"));
......
......@@ -43,7 +43,7 @@ public:
const KisFilterConfigurationSP config,
KoUpdater* progressUpdater
) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
static inline KoID id() {
return KoID("waveletnoisereducer", i18n("Wavelet Noise Reducer"));
......
......@@ -74,7 +74,7 @@ KoColorTransformation* KisFilterIndexColors::createTransformation(const KoColorS
return new KisIndexColorTransformation(pal, cs, config->getInt("alphaSteps"));
}
KisConfigWidget* KisFilterIndexColors::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget* KisFilterIndexColors::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
Q_UNUSED(dev);
KisWdgIndexColors* w = new KisWdgIndexColors(parent);
......
......@@ -45,7 +45,7 @@ public:
KisFilterIndexColors();
public:
KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override;
KisConfigWidget* createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget* createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;
static inline KoID id() {
return KoID("indexcolors", i18n("Index Colors"));
}
......
......@@ -56,7 +56,7 @@ KisLevelFilter::~KisLevelFilter()
{
}
KisConfigWidget * KisLevelFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const
KisConfigWidget * KisLevelFilter::createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool) const
{
return new KisLevelConfigWidget(parent, dev);
}
......
......@@ -44,7 +44,7 @@ public:
public:
// virtual KisFilterConfigurationSP factoryConfiguration() const;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override;
KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev, bool useForMasks) const override;