File indexing completed on 2024-09-29 04:13:50

0001 /* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu>
0002  * SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com>
0003  * SPDX-License-Identifier: LGPL-2.1-or-later
0004  */
0005 
0006 #pragma once
0007 
0008 #include "undocommand.h"
0009 
0010 #include <QImage>
0011 #include <QRect>
0012 
0013 /**
0014  * @brief ResizeCommand that resizes the current image.
0015  */
0016 class ResizeCommand : public UndoCommand
0017 {
0018 public:
0019     /**
0020      * Contructor
0021      */
0022     ResizeCommand(const QSize &resizeSize);
0023     ~ResizeCommand() override = default;
0024 
0025     virtual QImage redo(QImage image) override;
0026 
0027     virtual QImage undo(QImage image) override;
0028 
0029 private:
0030     QImage m_image;
0031     QSize m_resizeSize;
0032 };