File indexing completed on 2024-04-28 04:41:46

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