Messagelib

imagescaling.h
1 /*
2  SPDX-FileCopyrightText: 2012-2021 Laurent Montel <[email protected]>
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 
13 namespace MessageComposer
14 {
15 class ImageScalingPrivate;
16 /**
17  * @brief The ImageScaling class
18  * @author Laurent Montel <[email protected]>
19  */
20 class MESSAGECOMPOSER_EXPORT ImageScaling
21 {
22 public:
23  ImageScaling();
24  ~ImageScaling();
25 
26  /**
27  * @brief loadImageFromData
28  * @param data
29  * @return true if we can load image.
30  */
31  Q_REQUIRED_RESULT bool loadImageFromData(const QByteArray &data);
32 
33  /**
34  * @brief resizeImage
35  * @return true if we are able to resize image
36  */
37  Q_REQUIRED_RESULT bool resizeImage();
38 
39  /**
40  * @brief imageArray
41  * @return data from image after saving
42  */
43  Q_REQUIRED_RESULT QByteArray imageArray() const;
44 
45  /**
46  * @brief mimetype
47  * @return new image mimetype after saving.
48  */
49  Q_REQUIRED_RESULT QByteArray mimetype() const;
50  void setMimetype(const QByteArray &mimetype);
51 
52  void setName(const QString &name);
53 
54  Q_REQUIRED_RESULT QString generateNewName();
55 
56 private:
57  std::unique_ptr<ImageScalingPrivate> const d;
58 };
59 }
60 
const QLatin1String name
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
The ImageScaling class.
Definition: imagescaling.h:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.