KQuickImageEditor

resizecommand.h
1 /* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <[email protected]>
2  * SPDX-FileCopyrightText: 2021 Noah Davis <[email protected]>
3  * SPDX-License-Identifier: LGPL-2.1-or-later
4  */
5 
6 #pragma once
7 
8 #include "undocommand.h"
9 
10 #include <QImage>
11 #include <QRect>
12 
13 /**
14  * @brief ResizeCommand that resizes the current image.
15  */
16 class ResizeCommand : public UndoCommand
17 {
18 public:
19  /**
20  * Contructor
21  */
22  ResizeCommand(const QSize &resizeSize);
23  ~ResizeCommand() override = default;
24 
25  virtual QImage redo(QImage image) override;
26 
27  virtual QImage undo(QImage image) override;
28 
29 private:
30  QImage m_image;
31  QSize m_resizeSize;
32 };
ResizeCommand(const QSize &resizeSize)
Contructor.
ResizeCommand that resizes the current image.
Definition: resizecommand.h:16
virtual QImage redo(QImage image) override
Applies the change to the document.
A class implementing the command pattern.
Definition: undocommand.h:14
virtual QImage undo(QImage image) override
Revert a change to the document.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 18 2021 23:08:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.