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 namespace KIO
15 {
16 /**
17  * @class ThumbDevicePixelRatioDependentCreator thumbdevicepixelratiodependentcreator.h <KIO/ThumbDevicePixelratioDependentCreator>
18  *
19  * @see ThumbCreator
20  *
21  * This is an extension of ThumbCreator that allows to pass to the thumbCreator
22  * a device pixel ratio to use for the output thumbnail.
23  *
24  * The dimensions are then passed to the thumbnail creator without scaling with the dpr.
25  *
26  * You also need to set the following key in the thumbcreator .desktop file
27  * \code
28  * DevicePixelRatioDependent=true;
29  * \endcode
30  *
31  * @since 5.80
32  */
33 class KIOWIDGETS_EXPORT ThumbDevicePixelRatioDependentCreator : public ThumbCreator
34 {
35 public:
39 
40  /**
41  * The device Pixel Ratio used for thumbnail creation
42  */
43  int devicePixelRatio() const;
44 
45  /**
46  * Sets device Pixel Ratio used for thumbnail creation
47  */
48  void setDevicePixelRatio(int dpr);
49 
50 private:
51  class Private;
52  Private *d;
53 };
54 
55 }
56 
57 typedef ThumbCreator *(*newCreator)();
58 
59 #endif // THUMBDEVICEPIXELRATIODEPENDENTCREATOR_H
A namespace for KIO globals.
Base class for thumbnail generator plugins.
Definition: thumbcreator.h:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Nov 29 2021 22:53:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.