Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_transaction_data.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2002 Patrick Julien <freak@codepimps.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_TRANSACTION_DATA_H_
8#define KIS_TRANSACTION_DATA_H_
9
10#include <kundo2command.h>
11#include "kis_types.h"
12#include <kritaimage_export.h>
13
15
25class KRITAIMAGE_EXPORT KisTransactionData : public KUndo2Command
26{
27public:
28 KisTransactionData(const KUndo2MagicString& name, KisPaintDeviceSP device, bool resetSelectionOutlineCache, KisTransactionWrapperFactory *interstrokeDataFactory, KUndo2Command* parent, bool suppressUpdates);
29 ~KisTransactionData() override;
30
31public:
32 void redo() override;
33 void undo() override;
34
35 virtual void endTransaction();
36
37protected:
38 virtual void saveSelectionOutlineCache();
39 virtual void restoreSelectionOutlineCache(bool undo);
40
41private:
42 void init(KisPaintDeviceSP device);
43 void startUpdates();
44 void possiblyNotifySelectionChanged();
45 void possiblyResetOutlineCache();
46 void possiblyFlattenSelection(KisPaintDeviceSP device);
47 void doFlattenUndoRedo(bool undo);
48
49private:
50 class Private;
51 Private * const m_d;
52};
53
54#endif /* KIS_TRANSACTION_DATA_H_ */
55
virtual void undo()
virtual void redo()
void init(QOpenGLContext *ctx)