File indexing completed on 2024-05-26 04:26:20
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KOSHAPESHADOWCOMMAND_H 0008 #define KOSHAPESHADOWCOMMAND_H 0009 0010 #include "kritaflake_export.h" 0011 #include <kundo2command.h> 0012 #include <QList> 0013 0014 class KoShape; 0015 class KoShapeShadow; 0016 0017 /// The undo / redo command for setting the shape shadow 0018 class KRITAFLAKE_EXPORT KoShapeShadowCommand : public KUndo2Command 0019 { 0020 public: 0021 /** 0022 * Command to set a new shape shadow. 0023 * @param shapes a set of all the shapes that should get the new shadow. 0024 * @param shadow the new shadow, the same for all given shapes 0025 * @param parent the parent command used for macro commands 0026 */ 0027 KoShapeShadowCommand(const QList<KoShape*> & shapes, KoShapeShadow *shadow, KUndo2Command *parent = 0); 0028 0029 /** 0030 * Command to set new shape shadows. 0031 * @param shapes a set of all the shapes that should get a new shadow. 0032 * @param shadows the new shadows, one for each shape 0033 * @param parent the parent command used for macro commands 0034 */ 0035 KoShapeShadowCommand(const QList<KoShape*> &shapes, const QList<KoShapeShadow*> &shadows, KUndo2Command *parent = 0); 0036 0037 /** 0038 * Command to set a new shape shadow. 0039 * @param shape a single shape that should get the new shadow. 0040 * @param shadow the new shadow 0041 * @param parent the parent command used for macro commands 0042 */ 0043 KoShapeShadowCommand(KoShape *shape, KoShapeShadow *shadow, KUndo2Command *parent = 0); 0044 0045 ~KoShapeShadowCommand() override; 0046 /// redo the command 0047 void redo() override; 0048 /// revert the actions done in redo 0049 void undo() override; 0050 private: 0051 class Private; 0052 Private * const d; 0053 }; 0054 0055 #endif // KOSHAPESHADOWCOMMAND_H