Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAsynchronousStrokeUpdateHelper.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
9
11 : m_strokesFacade(0)
12{
13 m_updateThresholdTimer.setSingleShot(false);
14 m_updateThresholdTimer.setInterval(80 /* ms */);
15 connect(&m_updateThresholdTimer, SIGNAL(timeout()), SLOT(slotAsyncUpdateCame()));
16}
17
22
24{
25 m_strokesFacade = strokesFacade;
26 m_strokeId = strokeId;
27}
28
36
42
50
59
61{
62 return bool(m_strokeId);
63}
64
69
71{
72 if (!m_strokeId || !m_strokesFacade) return;
75 m_customUpdateFactory(forceUpdate) :
76 new UpdateData(forceUpdate));
77}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void setCustomUpdateDataFactory(UpdateDataFactory factory)
void initUpdateStreamLowLevel(KisStrokesFacade *strokesFacade, KisStrokeId strokeId)
std::function< KisStrokeJobData *(bool)> UpdateDataFactory
void startUpdateStream(KisStrokesFacade *strokesFacade, KisStrokeId strokeId)
virtual void addJob(KisStrokeId id, KisStrokeJobData *data)=0
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128