File indexing completed on 2025-02-23 04:05:44

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KOMULTIPATHPOINTMERGECOMMAND_H
0008 #define KOMULTIPATHPOINTMERGECOMMAND_H
0009 
0010 #include <kundo2command.h>
0011 
0012 #include "kritaflake_export.h"
0013 #include <QScopedPointer>
0014 
0015 class KoSelection;
0016 class KoPathShape;
0017 class KoPathPointData;
0018 class KoShapeControllerBase;
0019 
0020 
0021 class KRITAFLAKE_EXPORT KoMultiPathPointMergeCommand : public KUndo2Command
0022 {
0023 public:
0024     KoMultiPathPointMergeCommand(const KoPathPointData &pointData1,
0025                                  const KoPathPointData &pointData2,
0026                                  KoShapeControllerBase *controller,
0027                                  KoSelection *selection,
0028                                  KUndo2Command *parent = 0);
0029     ~KoMultiPathPointMergeCommand() override;
0030 
0031     void undo() override;
0032     void redo() override;
0033 
0034     KoPathShape *testingCombinedPath() const;
0035 
0036 protected:
0037     virtual KUndo2Command *createMergeCommand(const KoPathPointData &pointData1,
0038                                               const KoPathPointData &pointData2);
0039 private:
0040     struct Private;
0041     const QScopedPointer<Private> m_d;
0042 };
0043 
0044 #endif // KOMULTIPATHPOINTMERGECOMMAND_H