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 */
7
8#include <kconfiggroup.h>
9#include <kis_debug.h>
10
12
13bool KisCumulativeUndoData::read(const KConfigGroup *config)
14{
15 excludeFromMerge = config->readEntry("cumulativeUndoExcludeFromMerge",
17 mergeTimeout = config->readEntry("cumulativeUndoMergeTimeout",
19 maxGroupSeparation = config->readEntry("cumulativeUndoMaxGroupSeparation",
21 maxGroupDuration = config->readEntry("cumulativeUndoMaxGroupDuration",
23
24 return true;
25}
26
27void 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
35QDebug 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}
QDebug KRITACOMMAND_EXPORT operator<<(QDebug dbg, const KisCumulativeUndoData &data)
#define ppVar(var)
Definition kis_debug.h:155
static const KisCumulativeUndoData defaultValue
bool read(const KConfigGroup *config)
void write(KConfigGroup *config) const