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

#include <KoShapeBulkActionLock.h>

+ Inheritance diagram for KoShapeBulkActionLock:

Public Types

using BaseClass = KisAdaptedLock<KoShapeBulkActionLockAdapter>
 

Public Member Functions

template<typename T , typename = std::enable_if_t<std::is_base_of_v<KoShape, T>>>
 KoShapeBulkActionLock (T *shape)
 
UpdatesList unlock ()
 
 ~KoShapeBulkActionLock ()
 

Static Public Member Functions

static void bulkShapesUpdate (const UpdatesList &updates)
 

Additional Inherited Members

- Protected Types inherited from KoShapeBulkActionLockAdapter
using Update = std::pair<KoShape*, QRectF>
 
using UpdatesList = std::vector<Update>
 
- Protected Member Functions inherited from KisAdaptedLock< KoShapeBulkActionLockAdapter >
 KisAdaptedLock (KisAdaptedLock &&rhs)
 
 KisAdaptedLock (Object object)
 
 KisAdaptedLock (Object object, std::adopt_lock_t t)
 
 KisAdaptedLock (Object object, std::defer_lock_t t)
 
 KisAdaptedLock (Object object, std::try_to_lock_t t)
 
KisAdaptedLockoperator= (KisAdaptedLock &&rhs)
 
- Protected Member Functions inherited from KoShapeBulkActionLockAdapter
 KoShapeBulkActionLockAdapter (const QList< KoShape * > &shapes)
 
void lock ()
 
UpdatesList takeFinalUpdatesList ()
 
void unlock ()
 

Detailed Description

Definition at line 40 of file KoShapeBulkActionLock.h.

Member Typedef Documentation

◆ BaseClass

Constructor & Destructor Documentation

◆ KoShapeBulkActionLock()

template<typename T , typename = std::enable_if_t<std::is_base_of_v<KoShape, T>>>
KoShapeBulkActionLock::KoShapeBulkActionLock ( T * shape)
inline

Definition at line 47 of file KoShapeBulkActionLock.h.

49 {}
KisAdaptedLock< KoShapeBulkActionLockAdapter > BaseClass

◆ ~KoShapeBulkActionLock()

KoShapeBulkActionLock::~KoShapeBulkActionLock ( )

Definition at line 88 of file KoShapeBulkActionLock.cpp.

89{
90 if (owns_lock()) {
91 qWarning() << "WARNING: KoShapeBulkActionLock is destroyed while being locked. Update rect will be lost!";
92 }
93}

Member Function Documentation

◆ bulkShapesUpdate()

void KoShapeBulkActionLock::bulkShapesUpdate ( const UpdatesList & updates)
static

Definition at line 95 of file KoShapeBulkActionLock.cpp.

96{
97 // TODO: implement optimization for shape managers merging
98 for (auto it = updates.begin(); it != updates.end(); ++it) {
99 it->first->updateAbsolute(it->second);
100 }
101}

◆ unlock()


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