File indexing completed on 2024-05-19 04:24:18
0001 /* 0002 * SPDX-FileCopyrightText: 2023 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef KISCUMULATIVEUNDODATA_H 0007 #define KISCUMULATIVEUNDODATA_H 0008 0009 #include <boost/operators.hpp> 0010 #include "kritacommand_export.h" 0011 0012 class KConfigGroup; 0013 class QDebug; 0014 0015 struct KRITACOMMAND_EXPORT KisCumulativeUndoData : boost::equality_comparable<KisCumulativeUndoData> 0016 { 0017 inline friend bool operator==(const KisCumulativeUndoData &lhs, const KisCumulativeUndoData &rhs) { 0018 return lhs.excludeFromMerge == rhs.excludeFromMerge && 0019 lhs.mergeTimeout == rhs.mergeTimeout && 0020 lhs.maxGroupSeparation == rhs.maxGroupSeparation && 0021 lhs.maxGroupDuration == rhs.maxGroupDuration; 0022 } 0023 0024 int excludeFromMerge {10}; 0025 int mergeTimeout {5000}; 0026 int maxGroupSeparation {1000}; 0027 int maxGroupDuration {5000}; 0028 0029 bool read(const KConfigGroup *config); 0030 void write(KConfigGroup *config) const; 0031 0032 static const KisCumulativeUndoData defaultValue; 0033 }; 0034 0035 QDebug KRITACOMMAND_EXPORT operator<<(QDebug dbg, const KisCumulativeUndoData &data); 0036 0037 #endif // KISCUMULATIVEUNDODATA_H