File indexing completed on 2024-05-26 04:26:17
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2006, 2008 Jan Hambrecht <jaham@gmx.net> 0003 * SPDX-FileCopyrightText: 2006, 2007 Thorsten Zachmann <zachmann@kde.org> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KOPARAMETERTOPATHCOMMAND_H 0009 #define KOPARAMETERTOPATHCOMMAND_H 0010 0011 #include <kundo2command.h> 0012 #include <QList> 0013 0014 #include "kritaflake_export.h" 0015 0016 class KoParameterShape; 0017 class KoParameterToPathCommandPrivate; 0018 0019 /// The undo / redo command for changing a KoParameterShape into a KoPathShape 0020 class KRITAFLAKE_EXPORT KoParameterToPathCommand : public KUndo2Command 0021 { 0022 public: 0023 /** 0024 * Constructor. 0025 * @param shape the shape this command works on 0026 * @param parent the parent command if this is a compound undo command. 0027 */ 0028 explicit KoParameterToPathCommand(KoParameterShape *shape, KUndo2Command *parent = 0); 0029 /** 0030 * Constructor. 0031 * @param shapes the list of shapes this command works on 0032 * @param parent the parent command if this is a compound undo command. 0033 */ 0034 explicit KoParameterToPathCommand(const QList<KoParameterShape*> &shapes, KUndo2Command *parent = 0); 0035 ~KoParameterToPathCommand() override; 0036 0037 /// redo the command 0038 void redo() override; 0039 /// revert the actions done in redo 0040 void undo() override; 0041 private: 0042 KoParameterToPathCommandPrivate * const d; 0043 }; 0044 0045 #endif // KOPARAMETERTOPATHCOMMAND_H