Warning, file /graphics/krita/plugins/flake/pathshapes/ellipse/EllipseShapeConfigCommand.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2007 Jan Hambrecht <jaham@gmx.net> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef ELLIPSESHAPECONFIGCOMMAND_H 0008 #define ELLIPSESHAPECONFIGCOMMAND_H 0009 0010 #include "EllipseShape.h" 0011 #include <kundo2command.h> 0012 0013 /// The undo / redo command for configuring an ellipse shape 0014 class EllipseShapeConfigCommand : public KUndo2Command 0015 { 0016 public: 0017 /** 0018 * Configures an ellipse shape 0019 * @param ellipse the ellipse shape to configure 0020 * @param type the ellipse type 0021 * @param startAngle the start angle 0022 * @param endAngle the end angle 0023 * @param parent the optional parent command 0024 */ 0025 EllipseShapeConfigCommand(EllipseShape *ellipse, EllipseShape::EllipseType type, qreal startAngle, qreal startEndAngle, KUndo2Command *parent = 0); 0026 /// redo the command 0027 void redo() override; 0028 /// revert the actions done in redo 0029 void undo() override; 0030 0031 int id() const override; 0032 bool mergeWith(const KUndo2Command *command) override; 0033 0034 private: 0035 EllipseShape *m_ellipse; 0036 EllipseShape::EllipseType m_oldType; 0037 qreal m_oldStartAngle; 0038 qreal m_oldEndAngle; 0039 EllipseShape::EllipseType m_newType; 0040 qreal m_newStartAngle; 0041 qreal m_newEndAngle; 0042 }; 0043 0044 #endif // ELLIPSESHAPECONFIGCOMMAND_H 0045