Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCumulativeUndoData.h
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#ifndef KISCUMULATIVEUNDODATA_H
7#define KISCUMULATIVEUNDODATA_H
8
9#include <boost/operators.hpp>
10#include "kritacommand_export.h"
11
12class KConfigGroup;
13class QDebug;
14
15struct KRITACOMMAND_EXPORT KisCumulativeUndoData : boost::equality_comparable<KisCumulativeUndoData>
16{
17 inline friend bool operator==(const KisCumulativeUndoData &lhs, const KisCumulativeUndoData &rhs) {
18 return lhs.excludeFromMerge == rhs.excludeFromMerge &&
19 lhs.mergeTimeout == rhs.mergeTimeout &&
22 }
23
24 int excludeFromMerge {10};
25 int mergeTimeout {5000};
26 int maxGroupSeparation {1000};
27 int maxGroupDuration {5000};
28
29 bool read(const KConfigGroup *config);
30 void write(KConfigGroup *config) const;
31
33};
34
35QDebug KRITACOMMAND_EXPORT operator<<(QDebug dbg, const KisCumulativeUndoData &data);
36
37#endif // KISCUMULATIVEUNDODATA_H
QDebug KRITACOMMAND_EXPORT operator<<(QDebug dbg, const KisCumulativeUndoData &data)
static const KisCumulativeUndoData defaultValue
friend bool operator==(const KisCumulativeUndoData &lhs, const KisCumulativeUndoData &rhs)