14#include <klocalizedstring.h>
15#include <kstandardguiitem.h>
28#define UPDATE_DELAY 100
34 , isEditing(layer && previousConfig)
42 configBefore = previousConfig->cloneWithResourcesSnapshot();
47 dlgWidget.btnBox->button(QDialogButtonBox::Ok)->setDefault(
true);
48 KGuiItem::assign(
dlgWidget.btnBox->button(QDialogButtonBox::Ok), KStandardGuiItem::ok());
49 KGuiItem::assign(
dlgWidget.btnBox->button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel());
58 dlgWidget.filterGalleryToggle->setChecked(
true);
70 restoreGeometry(
KisConfig(
true).readEntry(
"generatordialog/geometry", QByteArray()));
84 Q_ASSERT(configAfter);
86 QString xmlAfter = configAfter->toXML();
88 if (xmlBefore != xmlAfter) {
92 configAfter->cloneWithResourcesSnapshot());
147 dlgWidget.wdgGenerator->setConfiguration(config);
154 return dlgWidget.wdgGenerator->configuration();
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void writeEntry(const QString &name, const T &value)
KisFilterConfigurationSP configuration() const
void setConfiguration(const KisFilterConfigurationSP config)
KisGeneratorLayerSP layer
KisThreadSafeSignalCompressor m_compressor
void slotDelayedPreviewGenerator()
QString layerName() const
QWeakPointer< boost::none_t > m_updateCookie
Ui_WdgDlgGeneratorLayer dlgWidget
void slotNameChanged(const QString &)
KisDlgGeneratorLayer(const QString &defaultLayerName, KisViewManager *arg_view, QWidget *parent, KisGeneratorLayerSP glayer, const KisFilterConfigurationSP previousConfig, const KisStrokeId stroke)
KisFilterConfigurationSP configBefore
~KisDlgGeneratorLayer() override
void setModified(bool _mod)
virtual void addCommand(KUndo2Command *cmd)=0
KisDocument * document() const
KisUndoAdapter * undoAdapter()
The undo adapter is used to add commands to the undo stack.
#define KIS_ASSERT_RECOVER_RETURN(cond)
QIcon loadIcon(const QString &name)
void setName(const QString &name)
void setFilterWithoutUpdate(KisFilterConfigurationSP filterConfig, bool checkCompareConfig=true)
QWeakPointer< boost::none_t > previewWithStroke(const KisStrokeId stroke)
void setFilter(KisFilterConfigurationSP filterConfig, bool checkCompareConfig=true) override