KIO

thumbdevicepixelratiodependentcreator.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2020 Méven Car <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 #ifndef THUMBDEVICEPIXELRATIODEPENDENTCREATOR_H
8 #define THUMBDEVICEPIXELRATIODEPENDENTCREATOR_H
9 
10 #include "thumbcreator.h"
11 
12 #include <qglobal.h>
13 
14 #if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 101)
15 
16 namespace KIO
17 {
18 /**
19  * @class ThumbDevicePixelRatioDependentCreator thumbdevicepixelratiodependentcreator.h <KIO/ThumbDevicePixelratioDependentCreator>
20  *
21  * @see ThumbCreator
22  *
23  * This is an extension of ThumbCreator that allows to pass to the thumbCreator
24  * a device pixel ratio to use for the output thumbnail.
25  *
26  * The dimensions are then passed to the thumbnail creator without scaling with the dpr.
27  *
28  * You also need to set the following key in the thumbcreator .desktop file
29  * \code
30  * DevicePixelRatioDependent=true;
31  * \endcode
32  *
33  * @since 5.80
34  *
35  * @deprecated since 5.101, use KIO::ThumbnailCreator instead
36  */
37 class KIOWIDGETS_EXPORT ThumbDevicePixelRatioDependentCreator : public ThumbCreator
38 {
39 public:
41 
42  /**
43  * @deprecated since 5.101, use KIO::ThumbnailCreator instead
44  */
45  KIOWIDGETS_DEPRECATED_VERSION(5, 101, "Use KIO::ThumbnailCreator instead")
48 
49  /**
50  * The device Pixel Ratio used for thumbnail creation
51  */
52  int devicePixelRatio() const;
53 
54  /**
55  * Sets device Pixel Ratio used for thumbnail creation
56  */
57  void setDevicePixelRatio(int dpr);
58 
59 private:
60  class Private;
61  Private *d;
62 };
63 
64 }
65 
66 typedef ThumbCreator *(*newCreator)();
67 
68 #endif
69 
70 #endif // THUMBDEVICEPIXELRATIODEPENDENTCREATOR_H
A namespace for KIO globals.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:55:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.