Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_memento_manager.cc File Reference
#include <QtGlobal>
#include "kis_memento_manager.h"
#include "kis_memento.h"

Go to the source code of this file.

Macros

#define blockRegistration()   (m_registrationBlocked = true)
 
#define DEBUG_DUMP_MESSAGE(action)
 
#define DEBUG_LOG_SIMPLE_ACTION(action)
 
#define DEBUG_LOG_TILE_ACTION(action, tile, col, row)
 
#define forEachReversed(iter, list)    for(iter=list.end(); iter-- != list.begin();)
 
#define namedTransactionInProgress()   ((bool)m_currentMemento)
 
#define registrationBlocked()   (m_registrationBlocked)
 
#define unblockRegistration()   (m_registrationBlocked = false)
 

Macro Definition Documentation

◆ blockRegistration

#define blockRegistration ( )    (m_registrationBlocked = true)

The class is supposed to store the changes of the paint device it is associated with. The history of changes is presented in form of transactions (revisions). If you purge the history of one transaction (revision) with purgeHistory() we won't be able to undo the changes made by this transactions.

The Memento Manager can be in two states:

  • Named Transaction is in progress - it means the caller has explicitly requested creation of a new transaction. The handle for the transaction is stored on a side of the caller. And the history will be automatically purged when the handler dies.
  • Anonymous Transaction is in progress - the caller isn't bothered about transactions at all. We pretend as we do not support any versioning and do not have any historical information. The history of such transactions is not purged automatically, but it is free'd when younger named transaction is purged.

Definition at line 58 of file kis_memento_manager.cc.

◆ DEBUG_DUMP_MESSAGE

#define DEBUG_DUMP_MESSAGE ( action)

Definition at line 33 of file kis_memento_manager.cc.

◆ DEBUG_LOG_SIMPLE_ACTION

#define DEBUG_LOG_SIMPLE_ACTION ( action)

Definition at line 32 of file kis_memento_manager.cc.

◆ DEBUG_LOG_TILE_ACTION

#define DEBUG_LOG_TILE_ACTION ( action,
tile,
col,
row )

Definition at line 31 of file kis_memento_manager.cc.

◆ forEachReversed

#define forEachReversed ( iter,
list )    for(iter=list.end(); iter-- != list.begin();)

Definition at line 261 of file kis_memento_manager.cc.

261#define forEachReversed(iter, list) \
262 for(iter=list.end(); iter-- != list.begin();)

◆ namedTransactionInProgress

#define namedTransactionInProgress ( )    ((bool)m_currentMemento)

Definition at line 62 of file kis_memento_manager.cc.

◆ registrationBlocked

#define registrationBlocked ( )    (m_registrationBlocked)

Definition at line 60 of file kis_memento_manager.cc.

◆ unblockRegistration

#define unblockRegistration ( )    (m_registrationBlocked = false)

Definition at line 59 of file kis_memento_manager.cc.