Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCumulativeUndoData.cpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2023 Dmitry Kazakov <dimula73@gmail.com>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
#include "
KisCumulativeUndoData.h
"
7
8
#include <kconfiggroup.h>
9
#include <
kis_debug.h
>
10
11
const
KisCumulativeUndoData
KisCumulativeUndoData::defaultValue
;
12
13
bool
KisCumulativeUndoData::read
(
const
KConfigGroup *config)
14
{
15
excludeFromMerge
= config->readEntry(
"cumulativeUndoExcludeFromMerge"
,
16
defaultValue
.
excludeFromMerge
);
17
mergeTimeout
= config->readEntry(
"cumulativeUndoMergeTimeout"
,
18
defaultValue
.
mergeTimeout
);
19
maxGroupSeparation
= config->readEntry(
"cumulativeUndoMaxGroupSeparation"
,
20
defaultValue
.
maxGroupSeparation
);
21
maxGroupDuration
= config->readEntry(
"cumulativeUndoMaxGroupDuration"
,
22
defaultValue
.
maxGroupDuration
);
23
24
return
true
;
25
}
26
27
void
KisCumulativeUndoData::write
(KConfigGroup *config)
const
28
{
29
config->writeEntry(
"cumulativeUndoExcludeFromMerge"
,
excludeFromMerge
);
30
config->writeEntry(
"cumulativeUndoMergeTimeout"
,
mergeTimeout
);
31
config->writeEntry(
"cumulativeUndoMaxGroupSeparation"
,
maxGroupSeparation
);
32
config->writeEntry(
"cumulativeUndoMaxGroupDuration"
,
maxGroupDuration
);
33
}
34
35
QDebug KRITACOMMAND_EXPORT
operator<<
(QDebug dbg,
const
KisCumulativeUndoData
&data)
36
{
37
dbg.nospace() <<
"KisCumulativeUndoData("
;
38
dbg.space() <<
ppVar
(data.
excludeFromMerge
);
39
dbg.space() <<
ppVar
(data.
mergeTimeout
);
40
dbg.space() <<
ppVar
(data.
maxGroupSeparation
);
41
dbg.space() <<
ppVar
(data.
maxGroupDuration
);
42
dbg.nospace() <<
")"
;
43
44
return
dbg.nospace();
45
}
operator<<
QDebug KRITACOMMAND_EXPORT operator<<(QDebug dbg, const KisCumulativeUndoData &data)
Definition
KisCumulativeUndoData.cpp:35
KisCumulativeUndoData.h
kis_debug.h
ppVar
#define ppVar(var)
Definition
kis_debug.h:155
KisCumulativeUndoData
Definition
KisCumulativeUndoData.h:16
KisCumulativeUndoData::maxGroupSeparation
int maxGroupSeparation
Definition
KisCumulativeUndoData.h:26
KisCumulativeUndoData::defaultValue
static const KisCumulativeUndoData defaultValue
Definition
KisCumulativeUndoData.h:32
KisCumulativeUndoData::maxGroupDuration
int maxGroupDuration
Definition
KisCumulativeUndoData.h:27
KisCumulativeUndoData::excludeFromMerge
int excludeFromMerge
Definition
KisCumulativeUndoData.h:24
KisCumulativeUndoData::mergeTimeout
int mergeTimeout
Definition
KisCumulativeUndoData.h:25
KisCumulativeUndoData::read
bool read(const KConfigGroup *config)
Definition
KisCumulativeUndoData.cpp:13
KisCumulativeUndoData::write
void write(KConfigGroup *config) const
Definition
KisCumulativeUndoData.cpp:27
libs
command
KisCumulativeUndoData.cpp
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52