Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLayerUtils::CreateMergedLayer Struct Reference
+ Inheritance diagram for KisLayerUtils::CreateMergedLayer:

Public Member Functions

 CreateMergedLayer (MergeDownInfoSP info)
 
void populateChildCommands () override
 
- Public Member Functions inherited from KisCommandUtils::AggregateCommand
 AggregateCommand (const KUndo2MagicString &text, KUndo2Command *parent=0)
 
 AggregateCommand (KUndo2Command *parent=0)
 
void redo () override
 
void undo () override
 
- Public Member Functions inherited from KUndo2Command
QString actionText () const
 
virtual bool canAnnihilateWith (const KUndo2Command *other) const
 
const KUndo2Commandchild (int index) const
 
int childCount () const
 
virtual QTime endTime () const
 
KUndo2CommandExtraDataextraData () const
 
bool hasParent () const
 
virtual int id () const
 
virtual bool isMerged () const
 
 KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0)
 
 KUndo2Command (KUndo2Command *parent=0)
 
virtual QVector< KUndo2Command * > mergeCommandsVector () const
 
virtual bool mergeWith (const KUndo2Command *other)
 
virtual void redoMergedCommands ()
 
void setEndTime ()
 
virtual void setEndTime (const QTime &time)
 
void setExtraData (KUndo2CommandExtraData *data)
 
void setText (const KUndo2MagicString &text)
 
void setTime ()
 
virtual void setTime (const QTime &time)
 
virtual void setTimedID (int timedID)
 
KUndo2MagicString text () const
 
virtual QTime time () const
 
virtual int timedId () const
 
virtual bool timedMergeWith (KUndo2Command *other)
 
virtual void undoMergedCommands ()
 
virtual ~KUndo2Command ()
 

Private Attributes

MergeDownInfoSP m_info
 

Additional Inherited Members

- Protected Member Functions inherited from KisCommandUtils::AggregateCommand
void addCommand (KUndo2Command *cmd)
 

Detailed Description

Definition at line 593 of file kis_layer_utils.cpp.

Constructor & Destructor Documentation

◆ CreateMergedLayer()

KisLayerUtils::CreateMergedLayer::CreateMergedLayer ( MergeDownInfoSP info)
inline

Definition at line 594 of file kis_layer_utils.cpp.

594: m_info(info) {}

Member Function Documentation

◆ populateChildCommands()

void KisLayerUtils::CreateMergedLayer::populateChildCommands ( )
inlineoverridevirtual

Implements KisCommandUtils::AggregateCommand.

Definition at line 596 of file kis_layer_utils.cpp.

596 {
597 // actual merging done by KisLayer::createMergedLayer (or specialized descendant)
598 m_info->dstNode = m_info->currLayer->createMergedLayerTemplate(m_info->prevLayer);
599
600 if (m_info->frames.size() > 0) {
601 m_info->dstNode->enableAnimation();
602 m_info->dstNode->getKeyframeChannel(KisKeyframeChannel::Raster.id(), true);
603 }
604
605 m_info->dstNode->setPinnedToTimeline(m_info->pinnedToTimeline);
606 m_info->dstNode->setColorLabelIndex(m_info->allSrcNodes().first()->colorLabelIndex());
607
608 KisPaintLayer *dstPaintLayer = qobject_cast<KisPaintLayer*>(m_info->dstNode.data());
609 if (dstPaintLayer) {
610 dstPaintLayer->setOnionSkinEnabled(m_info->enableOnionSkins);
611 }
612 }
static const KoID Raster
void setOnionSkinEnabled(bool state)

References m_info, KisKeyframeChannel::Raster, and KisPaintLayer::setOnionSkinEnabled().

Member Data Documentation

◆ m_info

MergeDownInfoSP KisLayerUtils::CreateMergedLayer::m_info
private

Definition at line 615 of file kis_layer_utils.cpp.


The documentation for this struct was generated from the following file: