Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Nemo QML Plugins Thumbnailer

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

Thumbnail QML Type

Generates and displays a cached thumbnail of the source image or video. More...

Import Statement: import Nemo.Thumbnailer 1.0
  • List of all members, including inherited members

Properties

  • fillMode : enumeration
  • mimeType : string
  • priority. : NemoThumbnailItem::Priority
  • source : url
  • sourceSize : QSize
  • status : enumeration

Detailed Description

Thumbnail element can be used instead of Qt Quick Image element for displaying images and video thumbnails. Thumbnailer provides additional API for prioritising requests and quering status of the thumbnail generation. Loaded thumbnails are stored into a local disk cache, which speeds up subsquent loading of the thumbnails, especially if the original source image or video was large.

 import QtQuick 2.0
 import Nemo.Thumbnailer 1.0

 Thumbnail {
     source: "photo.jpg"
     width: thumbnailWidth
     height: thumbnailHeight
     sourceSize.width: width
     sourceSize.height: height
     priority: {
         if (visibleRangeStart <= index && index < visibleRangeEnd) {
             return Thumbnail.HighPriority
         } else {
             return Thumbnail.LowPriority
         }
     }
 }

Property Documentation

fillMode : enumeration

Set this property to define what happens when the source image has a different aspect ratio than the item.

  • Thumbnail.PreserveAspectFit - the image is scaled uniformly to fit without cropping
  • Thumbnail.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary. This is the default behavior.

mimeType : string

Mime type of the thumbnail, which helps the thumbnailer detect the file type correctly.


priority. : NemoThumbnailItem::Priority

With priority system you can prioritise images currently visible on the screen higher. For example it is good idea to prioritise currently visible items when user is scrolling quickly through multiple large photos.

The priority parameter may be one of:

  • Thumbnail.HighPriority
  • Thumbnail.NormalPriority
  • Thumbnail.LowPriority

source : url

Set the location of the image to source property, either as an absolute or relative url.


sourceSize : QSize

This property holds the actual width and height of the cached and displayed thumbnail. The source size should always be defined.


status : enumeration

This property holds the status of the thumbnail loading. It can be one of:

  • Thumbnail.Null - no image has been set
  • Thumbnail.Ready - the thumbnail has been loaded
  • Thumbnail.Loading - the thumbnail is currently being loaded
  • Thumbnail.Error - an error occurred while generating the thumbnail

  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn