Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_callback_based_paintop_property_impl.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_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H
8
#define __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H
9
10
#include <functional>
11
12
template
<
class
ParentClass>
13
KisCallbackBasedPaintopProperty<ParentClass>::KisCallbackBasedPaintopProperty
(
typename
ParentClass::Type type,
14
typename
ParentClass::SubType subType,
15
const
KoID
&
id
,
16
KisPaintOpSettingsRestrictedSP
settings,
17
QObject *parent)
18
: ParentClass(type, subType, id, settings, parent)
19
{
20
}
21
22
template
<
class
ParentClass>
23
KisCallbackBasedPaintopProperty<ParentClass>::KisCallbackBasedPaintopProperty
(
typename
ParentClass::Type type,
24
const
KoID
&
id
,
25
KisPaintOpSettingsRestrictedSP
settings,
26
QObject *parent)
27
: ParentClass(type, id, settings, parent)
28
{
29
}
30
31
template
<
class
ParentClass>
32
KisCallbackBasedPaintopProperty<ParentClass>::KisCallbackBasedPaintopProperty
(
const
KoID
&
id
,
KisPaintOpSettingsRestrictedSP
settings, QObject *parent)
33
: ParentClass(id, settings, parent)
34
{
35
}
36
37
template
<
class
ParentClass>
38
void
KisCallbackBasedPaintopProperty<ParentClass>::setReadCallback
(Callback func)
39
{
40
m_readFunc = func;
41
}
42
43
template
<
class
ParentClass>
44
void
KisCallbackBasedPaintopProperty<ParentClass>::setWriteCallback
(Callback func)
45
{
46
m_writeFunc = func;
47
}
48
49
template
<
class
ParentClass>
50
void
KisCallbackBasedPaintopProperty<ParentClass>::setIsVisibleCallback
(VisibleCallback func)
51
{
52
m_visibleFunc = func;
53
}
54
55
template
<
class
ParentClass>
56
void
KisCallbackBasedPaintopProperty<ParentClass>::readValueImpl
()
57
{
58
if
(m_readFunc) m_readFunc(
this
);
59
}
60
61
template
<
class
ParentClass>
62
void
KisCallbackBasedPaintopProperty<ParentClass>::writeValueImpl
()
63
{
64
if
(m_writeFunc) m_writeFunc(
this
);
65
}
66
67
template
<
class
ParentClass>
68
bool
KisCallbackBasedPaintopProperty<ParentClass>::isVisible
()
const
69
{
70
return
m_visibleFunc ? m_visibleFunc(
this
) :
true
;
71
}
72
73
#endif
/* __KIS_CALLBACK_BASED_PAINTOP_PROPERTY_IMPL_H */
KisCallbackBasedPaintopProperty::isVisible
bool isVisible() const override
Definition
kis_callback_based_paintop_property_impl.h:68
KisCallbackBasedPaintopProperty::setWriteCallback
void setWriteCallback(Callback func)
Definition
kis_callback_based_paintop_property_impl.h:44
KisCallbackBasedPaintopProperty::setReadCallback
void setReadCallback(Callback func)
Definition
kis_callback_based_paintop_property_impl.h:38
KisCallbackBasedPaintopProperty::setIsVisibleCallback
void setIsVisibleCallback(VisibleCallback func)
Definition
kis_callback_based_paintop_property_impl.h:50
KisCallbackBasedPaintopProperty::writeValueImpl
void writeValueImpl() override
Definition
kis_callback_based_paintop_property_impl.h:62
KisCallbackBasedPaintopProperty::KisCallbackBasedPaintopProperty
KisCallbackBasedPaintopProperty(typename ParentClass::Type type, typename ParentClass::SubType subType, const KoID &id, KisPaintOpSettingsRestrictedSP settings, QObject *parent)
Definition
kis_callback_based_paintop_property_impl.h:13
KisCallbackBasedPaintopProperty::readValueImpl
void readValueImpl() override
Definition
kis_callback_based_paintop_property_impl.h:56
KisRestrictedSharedPtr
Definition
kis_restricted_shared_ptr.h:21
KoID
Definition
KoID.h:30
libs
image
brushengine
kis_callback_based_paintop_property_impl.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52