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

#include <KisSelectionUpdateCompressor.h>

+ Inheritance diagram for KisSelectionUpdateCompressor:

Public Slots

void requestUpdate (const QRect &updateRect)
 
void tryProcessStalledUpdate ()
 

Public Member Functions

 KisSelectionUpdateCompressor (KisSelection *selection)
 
 ~KisSelectionUpdateCompressor ()
 

Private Slots

void startUpdateJob ()
 

Private Attributes

bool m_fullUpdateRequested {false}
 
bool m_hasStalledUpdate {false}
 
KisSelectionm_parentSelection {0}
 
QRect m_updateRect
 
KisThreadSafeSignalCompressorm_updateSignalCompressor {0}
 

Detailed Description

Definition at line 17 of file KisSelectionUpdateCompressor.h.

Constructor & Destructor Documentation

◆ KisSelectionUpdateCompressor()

KisSelectionUpdateCompressor::KisSelectionUpdateCompressor ( KisSelection * selection)

Definition at line 15 of file KisSelectionUpdateCompressor.cpp.

16 : m_parentSelection(selection)
18{
19 connect(m_updateSignalCompressor, SIGNAL(timeout()), this, SLOT(startUpdateJob()));
20
21 this->moveToThread(m_updateSignalCompressor->thread());
22}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisThreadSafeSignalCompressor * m_updateSignalCompressor

References connect(), m_updateSignalCompressor, and startUpdateJob().

◆ ~KisSelectionUpdateCompressor()

KisSelectionUpdateCompressor::~KisSelectionUpdateCompressor ( )

Definition at line 24 of file KisSelectionUpdateCompressor.cpp.

25{
26 m_updateSignalCompressor->deleteLater();
27}

References m_updateSignalCompressor.

Member Function Documentation

◆ requestUpdate

◆ startUpdateJob

void KisSelectionUpdateCompressor::startUpdateJob ( )
privateslot

Definition at line 43 of file KisSelectionUpdateCompressor.cpp.

44{
46 if (!parentNode) {
47 m_hasStalledUpdate = true;
48 return;
49 }
50
51 // FIXME: we cannot use parentNode->image() here because masks don't
52 // have the pointer initialized for some reason.
54 if (!image) {
55 m_hasStalledUpdate = true;
56 return;
57 }
58
59 if (image) {
61 }
62 m_updateRect = QRect();
64 m_hasStalledUpdate = false;
65}
void addSpontaneousJob(KisSpontaneousJob *spontaneousJob)
KisImageSP findImageByHierarchy(KisNodeSP node)
KisNodeWSP parentNode

References KisImage::addSpontaneousJob(), KisLayerUtils::findImageByHierarchy(), m_fullUpdateRequested, m_hasStalledUpdate, m_parentSelection, m_updateRect, and KisSelection::parentNode.

◆ tryProcessStalledUpdate

void KisSelectionUpdateCompressor::tryProcessStalledUpdate ( )
slot

Member Data Documentation

◆ m_fullUpdateRequested

bool KisSelectionUpdateCompressor::m_fullUpdateRequested {false}
private

Definition at line 35 of file KisSelectionUpdateCompressor.h.

35{false};

◆ m_hasStalledUpdate

bool KisSelectionUpdateCompressor::m_hasStalledUpdate {false}
private

Definition at line 37 of file KisSelectionUpdateCompressor.h.

37{false};

◆ m_parentSelection

KisSelection* KisSelectionUpdateCompressor::m_parentSelection {0}
private

Definition at line 32 of file KisSelectionUpdateCompressor.h.

32{0};

◆ m_updateRect

QRect KisSelectionUpdateCompressor::m_updateRect
private

Definition at line 34 of file KisSelectionUpdateCompressor.h.

◆ m_updateSignalCompressor

KisThreadSafeSignalCompressor* KisSelectionUpdateCompressor::m_updateSignalCompressor {0}
private

Definition at line 33 of file KisSelectionUpdateCompressor.h.

33{0};

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