Krita Source Code Documentation
Loading...
Searching...
No Matches
KisExternalLayer Class Reference

#include <kis_external_layer_iface.h>

+ Inheritance diagram for KisExternalLayer:

Public Member Functions

virtual KUndo2CommandconvertTo (const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags())
 
virtual KUndo2Commandcrop (const QRect &rect)
 
QIcon icon () const override
 
 KisExternalLayer (KisImageWSP image, const QString &name, quint8 opacity)
 
virtual void resetCache (const KoColorSpace *colorSpace=0)
 
virtual KUndo2CommandsetProfile (const KoColorProfile *profile)
 
virtual bool supportsPerspectiveTransform () const
 
virtual QRect theoreticalBoundingRect () const
 
virtual KUndo2Commandtransform (const QTransform &transform)
 
- Public Member Functions inherited from KisLayer
bool alphaChannelDisabled () const
 
void buildProjectionUpToNode (KisPaintDeviceSP projection, KisNodeSP lastNode, const QRect &rect)
 
QBitArray & channelFlags () const
 
KisFilterMaskSP colorOverlayMask () const
 
const KoColorSpacecolorSpace () const override
 returns the image's colorSpace or null, if there is no image
 
const KoCompositeOpcompositeOp () const override
 returns the layer's composite op for the colorspace of the layer's parent.
 
virtual KisLayerSP createMergedLayerTemplate (KisLayerSP prevLayer)
 
QImage createThumbnail (qint32 w, qint32 h, Qt::AspectRatioMode aspectRatioMode=Qt::IgnoreAspectRatio) override
 
QImage createThumbnailForFrame (qint32 w, qint32 h, int time, Qt::AspectRatioMode aspectRatioMode=Qt::IgnoreAspectRatio) override
 
void disableAlphaChannel (bool disable)
 
QList< KisEffectMaskSPeffectMasks () const
 
QList< KisEffectMaskSPeffectMasks (KisNodeSP lastNode) const
 
QRect exactBounds () const override
 
QRect extent () const override
 
virtual void fillMergedLayerTemplate (KisLayerSP dstLayer, KisLayerSP prevLayer, bool skipPaintingThisLayer=false)
 
bool hasClones () const
 
bool hasEffectMasks () const
 
virtual KisLayerProjectionPlaneSP internalProjectionPlane () const
 
 KisLayer (const KisLayer &rhs)
 
 KisLayer (KisImageWSP image, const QString &name, quint8 opacity)
 
KisPSDLayerStyleSP layerStyle () const
 
QRect looseUserVisibleBounds () const
 
KisMetaData::StoremetaData ()
 
virtual bool needProjection () const
 
void notifyChildMaskChanged ()
 
KisPaintDeviceSP original () const override=0
 
KisLayerSP parentLayer () const
 
QRect partialChangeRect (KisNodeSP lastNode, const QRect &rect)
 
 Private (KisLayer *q)
 
KisPaintDeviceSP projection () const override
 
KisAbstractProjectionPlaneSP projectionPlane () const override
 
void registerClone (KisCloneLayerWSP clone)
 
const QList< KisCloneLayerWSPregisteredClones () const
 
KisBaseNode::PropertyList sectionModelProperties () const override
 
virtual KisSelectionSP selection () const
 
virtual KisSelectionMaskSP selectionMask () const
 
virtual void setChannelFlags (const QBitArray &channelFlags)
 
void setImage (KisImageWSP image) override
 
void setLayerStyle (KisPSDLayerStyleSP layerStyle)
 
void setSectionModelProperties (const KisBaseNode::PropertyList &properties) override
 
void setTemporary (bool t)
 
void setX (qint32 x) override
 
void setY (qint32 y) override
 
bool temporary () const
 
int thumbnailSeqNo () const override
 
QRect tightUserVisibleBounds () const
 
void unregisterClone (KisCloneLayerWSP clone)
 
void updateClones (const QRect &rect, bool dontInvalidateFrames)
 
qint32 x () const override
 
qint32 y () const override
 
 ~KisLayer () override
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 
- Public Member Functions inherited from KisNode
bool accept (KisNodeVisitor &v) override
 
void accept (KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter) override
 
virtual bool allowAsChild (KisNodeSP) const =0
 
KisNodeSP at (quint32 index) const
 
KisBusyProgressIndicatorbusyProgressIndicator () const
 
quint32 childCount () const
 
QList< KisNodeSPchildNodes (const QStringList &nodeTypes, const KoProperties &properties) const
 
virtual KisNodeSP clone () const =0
 
const KisNodefindSymmetricClone (const KisNode *srcRoot, const KisNode *dstRoot, const KisNode *srcTarget)
 
KisNodeSP firstChild () const
 
virtual KisPaintDeviceList getLodCapableDevices () const
 
KisNodeGraphListenergraphListener () const
 
int graphSequenceNumber () const
 
void handleKeyframeChannelFrameAboutToBeRemoved (const KisKeyframeChannel *channel, int time)
 
virtual void handleKeyframeChannelFrameAdded (const KisKeyframeChannel *channel, int time)
 
virtual void handleKeyframeChannelFrameChange (const KisKeyframeChannel *channel, int time)
 
void handleKeyframeChannelFrameHasBeenRemoved (const KisKeyframeChannel *channel, int time)
 
KisFrameChangeUpdateRecipe handleKeyframeChannelUpdateImpl (const KisKeyframeChannel *channel, int time)
 
int index (const KisNodeSP node) const
 
void invalidateFrames (const KisTimeSpan &range, const QRect &rect)
 
 KisNode (const KisNode &rhs)
 
 KisNode (KisImageWSP image)
 
KisNodeSP lastChild () const
 
KisNodeSP nextSibling () const
 
KisNodeProgressProxynodeProgressProxy () const
 
KisNodeSP parent () const
 
KisNodeSP prevSibling () const
 
 Private (KisNode *node)
 
void processDuplicatedClones (const KisNode *srcDuplicationRoot, const KisNode *dstDuplicationRoot, KisNode *node)
 
virtual KisProjectionLeafSP projectionLeaf () const
 
void requestTimeSwitch (int time)
 
virtual void setDirty ()
 
void setDirty (const KisRegion &region)
 
void setDirty (const QRect &rect)
 
virtual void setDirty (const QVector< QRect > &rects)
 
void setDirtyDontResetAnimationCache ()
 
void setDirtyDontResetAnimationCache (const QRect &rect)
 
void setDirtyDontResetAnimationCache (const QVector< QRect > &rects)
 setDirtyDontResetAnimationCache does almost the same thing as usual setDirty() call, but doesn't reset the animation cache (since onion skins are not used when rendering animation.
 
void setGraphListener (KisNodeGraphListener *graphListener)
 
void setImage (KisImageWSP newImage) override
 
virtual void syncLodCache ()
 
 ~KisNode () override
 
- Public Member Functions inherited from KisBaseNode
bool belongsToIsolatedGroup () const
 
bool check (const KoProperties &properties) const
 
bool collapsed () const
 
int colorLabelIndex () const
 
virtual KisPaintDeviceSP colorSampleSourceDevice () const
 
const QString & compositeOpId () const
 
void enableAnimation ()
 
KisKeyframeChannelgetKeyframeChannel (const QString &id) const
 
KisKeyframeChannelgetKeyframeChannel (const QString &id, bool create)
 
bool hasEditablePaintDevice () const
 
KisImageWSP image () const
 
bool isAnimated () const
 
bool isEditable (bool checkVisibility=true) const
 
virtual bool isFakeNode () const
 
bool isIsolatedRoot () const
 
bool isPinnedToTimeline () const
 
QMap< QString, KisKeyframeChannel * > keyframeChannels () const
 
 KisBaseNode (const KisBaseNode &rhs)
 
 KisBaseNode (KisImageWSP image)
 
void mergeNodeProperties (const KoProperties &properties)
 
QString name () const
 
const KoPropertiesnodeProperties () const
 
quint8 opacity () const
 
virtual KisPaintDeviceSP paintDevice () const =0
 
quint8 percentOpacity () const
 
 Private (const Private &rhs)
 
 Private (KisImageWSP p_image)
 
void setCollapsed (bool collapsed)
 
void setColorLabelIndex (int index)
 
void setCompositeOpId (const QString &compositeOpId)
 
void setName (const QString &name)
 
void setNodeProperty (const QString &name, const QVariant &value)
 
void setOpacity (quint8 val)
 
void setPercentOpacity (quint8 val)
 
void setPinnedToTimeline (bool pinned)
 
virtual void setUserLocked (bool l)
 
void setUuid (const QUuid &id)
 
virtual void setVisible (bool visible, bool loading=false)
 
virtual bool supportsKeyframeChannel (const QString &id)
 
bool supportsLodMoves () const
 
virtual bool supportsLodPainting () const
 
virtual void updateSettings ()
 
bool userLocked () const
 
QUuid uuid () const
 
virtual bool visible (bool recursive=false) const
 
 ~KisBaseNode () override
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Additional Inherited Members

- Public Types inherited from KisNode
enum  PositionToFilthy { N_ABOVE_FILTHY = 0x08 , N_FILTHY_PROJECTION = 0x20 , N_FILTHY = 0x40 , N_BELOW_FILTHY = 0x80 }
 
- Public Types inherited from KisBaseNode
typedef QList< PropertyPropertyList
 
- Signals inherited from KisNode
void sigNodeChangedInternal ()
 
- Signals inherited from KisBaseNode
void keyframeChannelAdded (KisKeyframeChannel *channel)
 
void opacityChanged (quint8 value)
 
- Public Attributes inherited from KisLayer
QBitArray channelFlags
 
KisCloneLayersList clonesList
 
KisPSDLayerStyleSP layerStyle
 
KisLayerStyleProjectionPlaneSP layerStyleProjectionPlane
 
KisLayerMasksCache masksCache
 
KisMetaData::StoremetaDataStore {nullptr}
 
KisLayerProjectionPlaneSP projectionPlane
 
KisSafeNodeProjectionStoreSP safeProjection
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Public Attributes inherited from KisNode
KisBusyProgressIndicatorbusyProgressIndicator
 
std::optional< KisFrameChangeUpdateRecipeframeRemovalUpdateRecipe
 
KisNodeGraphListenergraphListener
 
KisNodeProgressProxynodeProgressProxy
 
KisSafeReadNodeList nodes
 
QReadWriteLock nodeSubgraphLock
 
KisNodeWSP parent
 
KisProjectionLeafSP projectionLeaf
 
- Public Attributes inherited from KisBaseNode
bool animated {false}
 
bool collapsed {false}
 
QString compositeOp
 
KisBaseNode::Property hack_visible
 
QUuid id
 
KisImageWSP image
 
QMap< QString, KisKeyframeChannel * > keyframeChannels
 
KisAnimatedOpacityProperty opacityProperty
 
bool pinnedToTimeline {false}
 
KoProperties properties
 
bool supportsLodMoves {false}
 
- Protected Member Functions inherited from KisLayer
virtual QRect amortizedProjectionRectForCleanupInChangePass () const
 
QRect applyMasks (const KisPaintDeviceSP source, KisPaintDeviceSP destination, const QRect &requestedRect, KisNodeSP filthyNode, KisNodeSP lastNode, KisRenderPassFlags flags) const
 
bool canMergeAndKeepBlendOptions (KisLayerSP otherLayer)
 
QRect changeRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const override
 
void childNodeChanged (KisNodeSP changedChildNode) override
 
virtual void copyOriginalToProjection (const KisPaintDeviceSP original, KisPaintDeviceSP projection, const QRect &rect) const
 
virtual QRect incomingChangeRect (const QRect &rect) const
 
QRect masksChangeRect (const QList< KisEffectMaskSP > &masks, const QRect &requestedRect, bool &rectVariesFlag) const
 
QRect masksNeedRect (const QList< KisEffectMaskSP > &masks, const QRect &changeRect, QStack< QRect > &applyRects, bool &rectVariesFlag) const
 
QRect needRectForOriginal (const QRect &rect) const
 
virtual QRect outgoingChangeRect (const QRect &rect) const
 
QList< KisEffectMaskSPsearchEffectMasks (KisNodeSP lastNode) const
 
QRect updateProjection (const QRect &rect, KisNodeSP filthyNode, KisRenderPassFlags flags)
 
- Protected Member Functions inherited from KisNode
virtual QRect accessRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const
 
void addKeyframeChannel (KisKeyframeChannel *channel) override
 
void baseNodeChangedCallback () override
 
void baseNodeCollapsedChangedCallback () override
 
void baseNodeInvalidateAllFramesCallback () override
 
virtual KisFrameChangeUpdateRecipe handleKeyframeChannelFrameAboutToBeRemovedImpl (const KisKeyframeChannel *channel, int time)
 
virtual QRect needRect (const QRect &rect, PositionToFilthy pos=N_FILTHY) const
 
void notifyParentVisibilityChanged (bool value) override
 
KisBaseNodeSP parentCallback () const override
 
- Protected Member Functions inherited from KisBaseNode
virtual KisKeyframeChannelrequestKeyframeChannel (const QString &id)
 
void setSupportsLodMoves (bool value)
 
- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 

Detailed Description

A base interface for layers that are implemented outside the Krita core.

Definition at line 25 of file kis_external_layer_iface.h.

Constructor & Destructor Documentation

◆ KisExternalLayer()

KisExternalLayer::KisExternalLayer ( KisImageWSP image,
const QString & name,
quint8 opacity )
inline

Definition at line 29 of file kis_external_layer_iface.h.

KisImageWSP image
QString name() const
quint8 opacity() const
friend class KisLayer
Definition kis_node.h:383

Member Function Documentation

◆ convertTo()

virtual KUndo2Command * KisExternalLayer::convertTo ( const KoColorSpace * dstColorSpace,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags() )
inlinevirtual

Reimplemented in KisShapeLayer, and KisReferenceImagesLayer.

Definition at line 59 of file kis_external_layer_iface.h.

62 {
63 Q_UNUSED(dstColorSpace);
64 Q_UNUSED(renderingIntent);
65 Q_UNUSED(conversionFlags);
66 return 0;
67 }

◆ crop()

virtual KUndo2Command * KisExternalLayer::crop ( const QRect & rect)
inlinevirtual

Reimplemented in KisShapeLayer, KisFileLayer, and KisDecorationsWrapperLayer.

Definition at line 38 of file kis_external_layer_iface.h.

38 {
39 Q_UNUSED(rect);
40 return 0;
41 }

◆ icon()

QIcon KisExternalLayer::icon ( ) const
inlineoverridevirtual
Returns
the icon used to represent the node type, for instance in the layerbox and in the menu.

Reimplemented from KisBaseNode.

Reimplemented in KisShapeLayer, and KisFileLayer.

Definition at line 32 of file kis_external_layer_iface.h.

32 {
33 return KisIconUtils::loadIcon("view-refresh");
34 }
QIcon loadIcon(const QString &name)

References KisIconUtils::loadIcon().

◆ resetCache()

void KisExternalLayer::resetCache ( const KoColorSpace * colorSpace = 0)
virtual

Reimplemented in KisShapeLayer, and KisFileLayer.

Definition at line 10 of file kis_external_layer_iface.cc.

11{
12 Q_UNUSED(colorSpace);
13}
const KoColorSpace * colorSpace() const override
returns the image's colorSpace or null, if there is no image
Definition kis_layer.cc:225

References KisLayer::colorSpace().

◆ setProfile()

virtual KUndo2Command * KisExternalLayer::setProfile ( const KoColorProfile * profile)
inlinevirtual

Reimplemented in KisShapeLayer, and KisReferenceImagesLayer.

Definition at line 53 of file kis_external_layer_iface.h.

53 {
54 Q_UNUSED(profile);
55 return 0;
56 }

◆ supportsPerspectiveTransform()

virtual bool KisExternalLayer::supportsPerspectiveTransform ( ) const
inlinevirtual

Reimplemented in KisDecorationsWrapperLayer.

Definition at line 48 of file kis_external_layer_iface.h.

48 {
49 return false;
50 }

◆ theoreticalBoundingRect()

QRect KisExternalLayer::theoreticalBoundingRect ( ) const
virtual

Some external layers use original() only as a projection and render some internal state into it, e.g. using KisSpontaneousProjection asynchronously. theoreticalBoundingRect() is used to get real bounding rect of a layer without relying on original().

Reimplemented in KisShapeLayer.

Definition at line 15 of file kis_external_layer_iface.cc.

16{
17 return KisLayer::exactBounds();
18}
QRect exactBounds() const override

References KisLayer::exactBounds().

◆ transform()

virtual KUndo2Command * KisExternalLayer::transform ( const QTransform & transform)
inlinevirtual

Reimplemented in KisShapeLayer, KisFileLayer, and KisDecorationsWrapperLayer.

Definition at line 43 of file kis_external_layer_iface.h.

43 {
44 Q_UNUSED(transform);
45 return 0;
46 }
virtual KUndo2Command * transform(const QTransform &transform)

The documentation for this class was generated from the following files: