Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_stabilized_events_sampler.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#ifndef __KIS_STABILIZED_EVENTS_SAMPLER_H
8
#define __KIS_STABILIZED_EVENTS_SAMPLER_H
9
10
#include <QScopedPointer>
11
12
#include <boost/iterator/iterator_facade.hpp>
13
14
#include "kritaui_export.h"
15
16
class
KisPaintInformation
;
17
#include <
kis_paint_information.h
>
18
19
20
class
KRITAUI_EXPORT
KisStabilizedEventsSampler
21
{
22
public
:
23
KisStabilizedEventsSampler
(
int
sampleTime = 1);
24
~KisStabilizedEventsSampler
();
25
26
void
clear();
27
void
addEvent(
const
KisPaintInformation
&pi);
28
void
addFinishingEvent(
int
numSamples);
29
30
public
:
31
class
KRITAUI_EXPORT
iterator
:
32
public
boost::iterator_facade <iterator,
33
KisPaintInformation const,
34
boost::forward_traversal_tag >
35
{
36
public
:
37
iterator
()
38
: m_sampler(0),
39
m_index(0),
40
m_alpha(0) {}
41
42
iterator
(
const
KisStabilizedEventsSampler
* sampler,
int
index, qreal alpha)
43
: m_sampler(sampler),
44
m_index(index),
45
m_alpha(alpha) {}
46
47
private
:
48
friend
class
boost::iterator_core_access;
49
50
void
increment
() {
51
m_index++;
52
}
53
54
bool
equal
(
iterator
const
& other)
const
{
55
return
m_index == other.
m_index
&&
56
m_sampler == other.
m_sampler
;
57
}
58
59
const
KisPaintInformation
& dereference()
const
;
60
61
private
:
62
const
KisStabilizedEventsSampler
*
m_sampler
;
63
int
m_index
;
64
qreal
m_alpha
;
65
};
66
67
std::pair<iterator, iterator> range()
const
;
68
69
private
:
70
struct
Private
;
71
const
QScopedPointer<Private>
m_d
;
72
};
73
74
75
#endif
/* __KIS_STABILIZED_EVENTS_SAMPLER_H */
KisPaintInformation
Definition
kis_paint_information.h:51
KisStabilizedEventsSampler::iterator
Definition
kis_stabilized_events_sampler.h:35
KisStabilizedEventsSampler::iterator::iterator
iterator()
Definition
kis_stabilized_events_sampler.h:37
KisStabilizedEventsSampler::iterator::iterator
iterator(const KisStabilizedEventsSampler *sampler, int index, qreal alpha)
Definition
kis_stabilized_events_sampler.h:42
KisStabilizedEventsSampler::iterator::m_alpha
qreal m_alpha
Definition
kis_stabilized_events_sampler.h:64
KisStabilizedEventsSampler::iterator::increment
void increment()
Definition
kis_stabilized_events_sampler.h:50
KisStabilizedEventsSampler::iterator::equal
bool equal(iterator const &other) const
Definition
kis_stabilized_events_sampler.h:54
KisStabilizedEventsSampler::iterator::m_sampler
const KisStabilizedEventsSampler * m_sampler
Definition
kis_stabilized_events_sampler.h:62
KisStabilizedEventsSampler::iterator::m_index
int m_index
Definition
kis_stabilized_events_sampler.h:63
KisStabilizedEventsSampler
Definition
kis_stabilized_events_sampler.h:21
KisStabilizedEventsSampler::m_d
const QScopedPointer< Private > m_d
Definition
kis_stabilized_events_sampler.h:71
kis_paint_information.h
Private
Definition
SvgTransformParser.cpp:20
libs
ui
tool
kis_stabilized_events_sampler.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52