6#ifndef _KIS_BASE_NODE_H
7#define _KIS_BASE_NODE_H
27#include "kritaimage_export.h"
59 bool isMutable {
false};
71 bool canHaveStasis {
false};
74 bool isInStasis {
false};
78 bool stateInStasis {
false};
84 Property(): isMutable( false ), isInStasis(false) { }
87 Property(
const KoID &n,
const QIcon &on,
const QIcon &off,
bool isOn )
88 : id(n.id()), name( n.name() ), isMutable( true ), onIcon( on ), offIcon( off ), state( isOn ),
89 canHaveStasis( false ), isInStasis(false) { }
92 Property(
const KoID &n,
const QIcon &on,
const QIcon &off,
bool isOn,
93 bool _isInStasis,
bool _stateInStasis =
false )
94 : id(n.id()), name(n.name()), isMutable( true ), onIcon( on ), offIcon( off ), state( isOn ),
95 canHaveStasis( true ), isInStasis( _isInStasis ), stateInStasis( _stateInStasis ) { }
99 : id(n.id()), name(n.name()), isMutable( false ), state( s ), isInStasis(false) { }
160 quint8 opacity()
const;
168 void setOpacity(quint8 val);
176 quint8 percentOpacity()
const;
183 void setPercentOpacity(quint8 val);
189 const QString& compositeOpId()
const;
195 void setCompositeOpId(
const QString& compositeOpId);
206 void setUuid(
const QUuid&
id);
223 baseNodeChangedCallback();
249 virtual PropertyList sectionModelProperties()
const;
254 virtual void setSectionModelProperties(
const PropertyList &properties);
267 void setNodeProperty(
const QString & name,
const QVariant &
value);
276 void mergeNodeProperties(
const KoProperties & properties);
313 Q_UNUSED(undoAdapter);
323 virtual QImage createThumbnail(qint32 w, qint32 h, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio);
329 virtual int thumbnailSeqNo()
const;
338 virtual QImage createThumbnailForFrame(qint32 w, qint32 h,
int time, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio);
355 virtual bool visible(
bool recursive =
false)
const;
371 virtual void setVisible(
bool visible,
bool loading =
false);
377 bool userLocked()
const;
382 bool belongsToIsolatedGroup()
const;
388 bool isIsolatedRoot()
const;
394 virtual void setUserLocked(
bool l);
402 bool isEditable(
bool checkVisibility =
true)
const;
409 bool hasEditablePaintDevice()
const;
414 virtual qint32
x()
const {
429 virtual qint32
y()
const {
460 void setCollapsed(
bool collapsed);
472 void setColorLabelIndex(
int index);
477 int colorLabelIndex()
const;
489 virtual bool supportsLodPainting()
const;
511 bool isPinnedToTimeline()
const;
516 void setPinnedToTimeline(
bool pinned);
518 bool isAnimated()
const;
519 void enableAnimation();
529 virtual bool isFakeNode()
const;
533 void setSupportsLodMoves(
bool value);
601 virtual bool supportsKeyframeChannel(
const QString &
id);
float value(const T *src, size_t ch)
KisKeyframeChannel stores and manages KisKeyframes. Maps units of time to virtual keyframe values....
KRITAIMAGE_EXPORT QDebug operator<<(QDebug dbg, const KisBaseNode::Property &prop)
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
KisSharedPtr< KisBaseNode > KisBaseNodeSP
Property(const KoID &n, const QIcon &on, const QIcon &off, bool isOn)
Constructor for a mutable property.
Property(const KoID &n, const QIcon &on, const QIcon &off, bool isOn, bool _isInStasis, bool _stateInStasis=false)
Property(const KoID &n, const QString &s)
Constructor for a nonmutable property.
bool operator==(const Property &rhs) const
virtual const KoCompositeOp * compositeOp() const =0
virtual bool accept(KisNodeVisitor &)
virtual void baseNodeInvalidateAllFramesCallback()
virtual KisPaintDeviceSP projection() const =0
virtual void accept(KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter)
QList< Property > PropertyList
virtual void baseNodeCollapsedChangedCallback()
virtual void baseNodeChangedCallback()
KisImageWSP image() const
virtual QRect exactBounds() const
QMap< QString, KisKeyframeChannel * > keyframeChannels() const
virtual KisPaintDeviceSP original() const =0
virtual void notifyParentVisibilityChanged(bool value)
virtual void setX(qint32)
virtual void setY(qint32)
void setName(const QString &name)
virtual const KoColorSpace * colorSpace() const =0
void keyframeChannelAdded(KisKeyframeChannel *channel)
bool supportsLodMoves() const
virtual QRect extent() const
void opacityChanged(quint8 value)
virtual KisPaintDeviceSP paintDevice() const =0
virtual KisBaseNodeSP parentCallback() const
virtual void updateSettings()
virtual QIcon icon() const