KQuickImageEditor

resizecommand.h
1/* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu>
2 * SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com>
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 */
17{
18public:
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
29private:
30 QImage m_image;
31 QSize m_resizeSize;
32};
ResizeCommand that resizes the current image.
virtual QImage undo(QImage image) override
Revert a change to the document.
virtual QImage redo(QImage image) override
Applies the change to the document.
ResizeCommand(const QSize &resizeSize)
Contructor.
A class implementing the command pattern.
Definition undocommand.h:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.