Messagelib

imagescaling.h
1/*
2 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messagecomposer_export.h"
10#include <QByteArray>
11#include <memory>
12
13namespace MessageComposer
14{
15class ImageScalingPrivate;
16/**
17 * @brief The ImageScaling class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class MESSAGECOMPOSER_EXPORT ImageScaling
21{
22public:
25
26 /**
27 * @brief loadImageFromData
28 * @param data
29 * @return true if we can load image.
30 */
31 [[nodiscard]] bool loadImageFromData(const QByteArray &data);
32
33 /**
34 * @brief resizeImage
35 * @return true if we are able to resize image
36 */
37 [[nodiscard]] bool resizeImage();
38
39 /**
40 * @brief imageArray
41 * @return data from image after saving
42 */
43 [[nodiscard]] QByteArray imageArray() const;
44
45 /**
46 * @brief mimetype
47 * @return new image mimetype after saving.
48 */
49 [[nodiscard]] QByteArray mimetype() const;
50 void setMimetype(const QByteArray &mimetype);
51
52 void setName(const QString &name);
53
54 [[nodiscard]] QString generateNewName();
55
56private:
57 std::unique_ptr<ImageScalingPrivate> const d;
58};
59}
The ImageScaling class.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.