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

#include <kis_post_execution_undo_adapter.h>

Public Member Functions

void addCommand (KUndo2CommandSP command)
 
void addMacro (KisSavedMacroCommand *macro)
 
KisSavedMacroCommandcreateMacro (const KUndo2MagicString &macroName)
 
 KisPostExecutionUndoAdapter (KisUndoStore *undoStore, KisStrokesFacade *strokesFacade)
 
void setUndoStore (KisUndoStore *undoStore)
 
KisStrokesFacadestrokesFacade () const
 

Private Attributes

KisStrokesFacadem_strokesFacade
 
KisUndoStorem_undoStore
 

Detailed Description

KisPostExecutionUndoAdapter – used by the strokes. It doesn't call redo() when you add a command. It is assumed, that you have already executed the command yourself and now just notify the system about it. Warning: it doesn't inherit KisUndoAdapter because it doesn't fit the contract of this class. And, more important, KisTransaction should work differently with this class.

Definition at line 27 of file kis_post_execution_undo_adapter.h.

Constructor & Destructor Documentation

◆ KisPostExecutionUndoAdapter()

KisPostExecutionUndoAdapter::KisPostExecutionUndoAdapter ( KisUndoStore * undoStore,
KisStrokesFacade * strokesFacade )

Member Function Documentation

◆ addCommand()

void KisPostExecutionUndoAdapter::addCommand ( KUndo2CommandSP command)

Definition at line 21 of file kis_post_execution_undo_adapter.cpp.

22{
23 if(!command) return;
25
27}
virtual void addCommand(KUndo2Command *cmd)=0

References KisUndoStore::addCommand(), m_strokesFacade, and m_undoStore.

◆ addMacro()

void KisPostExecutionUndoAdapter::addMacro ( KisSavedMacroCommand * macro)

Definition at line 34 of file kis_post_execution_undo_adapter.cpp.

35{
36 m_undoStore->addCommand(macro);
37}

References KisUndoStore::addCommand(), and m_undoStore.

◆ createMacro()

KisSavedMacroCommand * KisPostExecutionUndoAdapter::createMacro ( const KUndo2MagicString & macroName)

Definition at line 29 of file kis_post_execution_undo_adapter.cpp.

References m_strokesFacade.

◆ setUndoStore()

void KisPostExecutionUndoAdapter::setUndoStore ( KisUndoStore * undoStore)

Definition at line 39 of file kis_post_execution_undo_adapter.cpp.

40{
41 m_undoStore = undoStore;
42}

References m_undoStore.

◆ strokesFacade()

KisStrokesFacade * KisPostExecutionUndoAdapter::strokesFacade ( ) const

Definition at line 44 of file kis_post_execution_undo_adapter.cpp.

45{
46 return m_strokesFacade;
47}

References m_strokesFacade.

Member Data Documentation

◆ m_strokesFacade

KisStrokesFacade* KisPostExecutionUndoAdapter::m_strokesFacade
private

Definition at line 42 of file kis_post_execution_undo_adapter.h.

◆ m_undoStore

KisUndoStore* KisPostExecutionUndoAdapter::m_undoStore
private

Definition at line 41 of file kis_post_execution_undo_adapter.h.


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