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

#include <KisRecycleProjectionsJob.h>

+ Inheritance diagram for KisRecycleProjectionsJob:

Public Member Functions

QString debugName () const override
 
 KisRecycleProjectionsJob (KisSafeNodeProjectionStoreBaseWSP projectionStore)
 
int levelOfDetail () const override
 
bool overrides (const KisSpontaneousJob *otherJob) override
 
void run () override
 
- Public Member Functions inherited from KisSpontaneousJob
bool isExclusive () const
 
- Public Member Functions inherited from KisRunnable
virtual ~KisRunnable ()
 

Private Attributes

KisSafeNodeProjectionStoreBaseWSP m_projectionStore
 

Additional Inherited Members

- Protected Member Functions inherited from KisSpontaneousJob
void setExclusive (bool value)
 

Detailed Description

This is a simple job for initiating recycling of KisLayer's projections in an exclusive context. The problem is that the projection might still be used by update workers after it has been disabled. So this cleaning should run in an exclusive context.

Definition at line 23 of file KisRecycleProjectionsJob.h.

Constructor & Destructor Documentation

◆ KisRecycleProjectionsJob()

KisRecycleProjectionsJob::KisRecycleProjectionsJob ( KisSafeNodeProjectionStoreBaseWSP projectionStore)

Definition at line 10 of file KisRecycleProjectionsJob.cpp.

11 : m_projectionStore(projectionStore)
12{
13 setExclusive(true);
14}
KisSafeNodeProjectionStoreBaseWSP m_projectionStore
void setExclusive(bool value)

References KisSpontaneousJob::setExclusive().

Member Function Documentation

◆ debugName()

QString KisRecycleProjectionsJob::debugName ( ) const
overridevirtual

Implements KisRunnableWithDebugName.

Definition at line 38 of file KisRecycleProjectionsJob.cpp.

39{
40 return "KisRecycleProjectionsJob";
41}

◆ levelOfDetail()

int KisRecycleProjectionsJob::levelOfDetail ( ) const
overridevirtual

Implements KisSpontaneousJob.

Definition at line 33 of file KisRecycleProjectionsJob.cpp.

34{
35 return 0;
36}

◆ overrides()

bool KisRecycleProjectionsJob::overrides ( const KisSpontaneousJob * otherJob)
overridevirtual

Implements KisSpontaneousJob.

Definition at line 16 of file KisRecycleProjectionsJob.cpp.

17{
18 const KisRecycleProjectionsJob *otherJob =
19 dynamic_cast<const KisRecycleProjectionsJob*>(_otherJob);
20
21 return otherJob &&
23}

References m_projectionStore.

◆ run()

void KisRecycleProjectionsJob::run ( )
overridevirtual

Implements KisRunnable.

Definition at line 25 of file KisRecycleProjectionsJob.cpp.

26{
28 if (store) {
29 store->recycleProjectionsInSafety();
30 }
31}

References m_projectionStore.

Member Data Documentation

◆ m_projectionStore

KisSafeNodeProjectionStoreBaseWSP KisRecycleProjectionsJob::m_projectionStore
private

Definition at line 35 of file KisRecycleProjectionsJob.h.


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