|
Krita Source Code Documentation
|
#include <KisAsynchronousStrokeUpdateHelper.h>
Inheritance diagram for KisAsynchronousStrokeUpdateHelper:Classes | |
| class | UpdateData |
Public Types | |
| using | UpdateDataFactory = std::function<KisStrokeJobData*(bool)> |
Public Member Functions | |
| void | cancelUpdateStream () |
| void | endUpdateStream () |
| void | initUpdateStreamLowLevel (KisStrokesFacade *strokesFacade, KisStrokeId strokeId) |
| bool | isActive () const |
| KisAsynchronousStrokeUpdateHelper () | |
| void | setCustomUpdateDataFactory (UpdateDataFactory factory) |
| void | startUpdateStream (KisStrokesFacade *strokesFacade, KisStrokeId strokeId) |
| void | startUpdateStreamLowLevel () |
| ~KisAsynchronousStrokeUpdateHelper () | |
Private Slots | |
| void | slotAsyncUpdateCame (bool forceUpdate=false) |
Private Attributes | |
| UpdateDataFactory | m_customUpdateFactory |
| KisStrokeId | m_strokeId |
| KisStrokesFacade * | m_strokesFacade |
| QTimer | m_updateThresholdTimer |
Definition at line 20 of file KisAsynchronousStrokeUpdateHelper.h.
| using KisAsynchronousStrokeUpdateHelper::UpdateDataFactory = std::function<KisStrokeJobData*(bool)> |
Definition at line 49 of file KisAsynchronousStrokeUpdateHelper.h.
| KisAsynchronousStrokeUpdateHelper::KisAsynchronousStrokeUpdateHelper | ( | ) |
Definition at line 10 of file KisAsynchronousStrokeUpdateHelper.cpp.
References connect(), m_updateThresholdTimer, and slotAsyncUpdateCame().
| KisAsynchronousStrokeUpdateHelper::~KisAsynchronousStrokeUpdateHelper | ( | ) |
Definition at line 18 of file KisAsynchronousStrokeUpdateHelper.cpp.
| void KisAsynchronousStrokeUpdateHelper::cancelUpdateStream | ( | ) |
Definition at line 51 of file KisAsynchronousStrokeUpdateHelper.cpp.
References isActive(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_strokeId, m_strokesFacade, and m_updateThresholdTimer.
| void KisAsynchronousStrokeUpdateHelper::endUpdateStream | ( | ) |
Definition at line 43 of file KisAsynchronousStrokeUpdateHelper.cpp.
References cancelUpdateStream(), isActive(), KIS_SAFE_ASSERT_RECOVER_RETURN, and slotAsyncUpdateCame().
| void KisAsynchronousStrokeUpdateHelper::initUpdateStreamLowLevel | ( | KisStrokesFacade * | strokesFacade, |
| KisStrokeId | strokeId ) |
A low-level version of startUpdateStream(...), initializes the helper but doesn't start the stream of update events. That is needed for the tool to issue endUpdateStream() signals, when the action has been ended before the stroke actually managed to initialize itself.
Definition at line 23 of file KisAsynchronousStrokeUpdateHelper.cpp.
References m_strokeId, and m_strokesFacade.
| bool KisAsynchronousStrokeUpdateHelper::isActive | ( | ) | const |
Definition at line 60 of file KisAsynchronousStrokeUpdateHelper.cpp.
References m_strokeId.
| void KisAsynchronousStrokeUpdateHelper::setCustomUpdateDataFactory | ( | KisAsynchronousStrokeUpdateHelper::UpdateDataFactory | factory | ) |
Definition at line 65 of file KisAsynchronousStrokeUpdateHelper.cpp.
References m_customUpdateFactory.
|
privateslot |
Definition at line 70 of file KisAsynchronousStrokeUpdateHelper.cpp.
References KisStrokesFacade::addJob(), m_customUpdateFactory, m_strokeId, and m_strokesFacade.
| void KisAsynchronousStrokeUpdateHelper::startUpdateStream | ( | KisStrokesFacade * | strokesFacade, |
| KisStrokeId | strokeId ) |
Initialize the update helper and start the steam of the update events. This is just a simple combination of initUpdateStreamLowLevel() and startUpdateStreamLowLevel().
Definition at line 37 of file KisAsynchronousStrokeUpdateHelper.cpp.
References initUpdateStreamLowLevel(), and startUpdateStreamLowLevel().
| void KisAsynchronousStrokeUpdateHelper::startUpdateStreamLowLevel | ( | ) |
Start the stream of the update events on already initialized helper. One should call initUpdateStreamWithoutStart() before calling startUpdateStream().
Definition at line 29 of file KisAsynchronousStrokeUpdateHelper.cpp.
References KIS_SAFE_ASSERT_RECOVER_RETURN, m_strokeId, m_strokesFacade, and m_updateThresholdTimer.
|
private |
Definition at line 93 of file KisAsynchronousStrokeUpdateHelper.h.
|
private |
Definition at line 92 of file KisAsynchronousStrokeUpdateHelper.h.
|
private |
Definition at line 90 of file KisAsynchronousStrokeUpdateHelper.h.
|
private |
Definition at line 91 of file KisAsynchronousStrokeUpdateHelper.h.