KIO::ThumbnailRequest

Search for usage in LXR

KIO::ThumbnailRequest Class Reference

#include <thumbnailcreator.h>

Public Member Functions

 ThumbnailRequest (const QUrl &url, const QSize &targetSize, const QString &mimeType, qreal dpr, float sequenceIndex)
 
 ThumbnailRequest (const ThumbnailRequest &)
 
qreal devicePixelRatio () const
 
QString mimeType () const
 
ThumbnailRequestoperator= (const ThumbnailRequest &)
 
float sequenceIndex () const
 
QSize targetSize () const
 
QUrl url () const
 

Detailed Description

Encapsulates the input data for a thumbnail request.

This includes the URL of the target file as well as additional data such as the target size

Since
5.100

Definition at line 37 of file thumbnailcreator.h.

Constructor & Destructor Documentation

◆ ThumbnailRequest() [1/2]

KIO::ThumbnailRequest::ThumbnailRequest ( const QUrl & url,
const QSize & targetSize,
const QString & mimeType,
qreal dpr,
float sequenceIndex )
explicit

Contruct a new ThumbnailRequest for a given file.

Parameters
urlURL of the relevant file.
targetSizeA size hint for the result image. The actual result size may be different. This already accounts for highdpi scaling, i.e. if a 500x500px thumbnail with a DPR of 2 is requested 1000x1000 is passed here.
mimeTypeThe MIME type of the target file.
dprThe device pixle ratio for this request. This can be used to adjust the level of detail rendered. For example a thumbnail for text of size 1000x1000 and DPR 1 should have the name number of text lines as for a request of size 2000x2000 and DPR 2.
sequenceIndexIf the thumbnailer supports sequences this determines which sequence frame is used. Pass 0 otherwise.

Definition at line 40 of file thumbnailcreator.cpp.

◆ ThumbnailRequest() [2/2]

KIO::ThumbnailRequest::ThumbnailRequest ( const ThumbnailRequest & other)

Definition at line 28 of file thumbnailcreator.cpp.

Member Function Documentation

◆ devicePixelRatio()

qreal KIO::ThumbnailRequest::devicePixelRatio ( ) const

The device Pixel Ratio used for thumbnail creation.

Definition at line 65 of file thumbnailcreator.cpp.

◆ mimeType()

QString KIO::ThumbnailRequest::mimeType ( ) const

The target file's MIME type.

Definition at line 60 of file thumbnailcreator.cpp.

◆ operator=()

ThumbnailRequest & KIO::ThumbnailRequest::operator= ( const ThumbnailRequest & other)

Definition at line 33 of file thumbnailcreator.cpp.

◆ sequenceIndex()

float KIO::ThumbnailRequest::sequenceIndex ( ) const

If the thumb-creator can create a sequence of thumbnails, it should use this to decide what sequence item to use.

If the value is zero, the standard thumbnail should be created.

This can be used for example to create thumbnails for different timeframes in videos(For example 0m, 10m, 20m, ...).

If the thumb-creator supports a high granularity, like a video, the sub-integer precision coming from the float should be respected.

If the end of the sequence is reached, the sequence should start from the beginning.

Definition at line 70 of file thumbnailcreator.cpp.

◆ targetSize()

QSize KIO::ThumbnailRequest::targetSize ( ) const

The target thumbnail size.

Definition at line 55 of file thumbnailcreator.cpp.

◆ url()

QUrl KIO::ThumbnailRequest::url ( ) const

URL of the relevant file.

Definition at line 50 of file thumbnailcreator.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.