Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_generator_layer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2008 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_GENERATOR_LAYER_H_
7#define KIS_GENERATOR_LAYER_H_
8
9#include <boost/none.hpp>
10
12#include <kritaimage_export.h>
14
15#include <QScopedPointer>
16
18
29class KRITAIMAGE_EXPORT KisGeneratorLayer
32{
33 Q_OBJECT
34
35public:
41 KisGeneratorLayer(KisImageWSP image, const QString &name, KisFilterConfigurationSP kfc, KisSelectionSP selection);
43 ~KisGeneratorLayer() override;
44
45 KisNodeSP clone() const override {
46 return KisNodeSP(new KisGeneratorLayer(*this));
47 }
48
49 void setFilter(KisFilterConfigurationSP filterConfig, bool checkCompareConfig = true) override;
53 void setFilterWithoutUpdate(KisFilterConfigurationSP filterConfig, bool checkCompareConfig = true);
54
55 bool accept(KisNodeVisitor &) override;
56 void accept(KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter) override;
57
58 QIcon icon() const override;
60
65 void update();
70 QWeakPointer<boost::none_t> previewWithStroke(const KisStrokeId stroke);
71
73 void setDirty(const QVector<QRect> &rects) override;
77 void setDirtyWithoutUpdate(const QVector<QRect> &rects);
78 void setX(qint32 x) override;
79 void setY(qint32 y) override;
80
81 void resetCache(const KoColorSpace *colorSpace) override;
82
83 void forceUpdateTimedNode() override;
84 bool hasPendingTimedUpdates() const override;
85
86private Q_SLOTS:
87 void slotDelayedStaticUpdate();
88
89private:
93 void requestUpdateJobsWithStroke(const KisStrokeId stroke, const KisFilterConfigurationSP configuration);
97 void resetCacheWithoutUpdate(const KoColorSpace *colorSpace);
98
99public:
100 // KisIndirectPaintingSupport
102 return this;
103 }
104
105private:
106 struct Private;
107 const QScopedPointer<Private> m_d;
108};
109
110#endif
111
The KisDelayedUpdateNodeInterface class is an interface for nodes that delay their real updates with ...
virtual void forceUpdateTimedNode()=0
forceUpdateTimedNode forces the node to regenerate its project. The update might be asynchronous,...
virtual bool hasPendingTimedUpdates() const =0
virtual void setFilter(KisFilterConfigurationSP filterConfig, bool checkCompareConfig=true)
KisSharedPtr< KisNode > KisNodeSP
Definition kis_types.h:86
virtual QIcon icon() const
const QScopedPointer< Private > m_d
KisNodeSP clone() const override
KisBaseNode::PropertyList sectionModelProperties() const override
Definition kis_layer.cc:272
bool accept(KisNodeVisitor &v) override
Definition kis_node.cpp:269
Describes base behaviour for selection base classes like KisAdjustmentLayer and KisGeneratorLayer....
virtual void resetCache(const KoColorSpace *colorSpace)