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

API Documentation

Documentation for developing SailfishOS applications
  • 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

  • Public Types
  • Public Functions
  • Detailed Description

ThemeIconResolver Class

Allows to request theme icons. More...

Header: #include <silicathemeiconresolver.h>
  • List of all members, including inherited members

Public Types

enum InitFlags { NoContent, LoadDefaultTheme }

Public Functions

ThemeIconResolver()
ThemeIconResolver(InitFlags initFlags)
virtual ~ThemeIconResolver()
void addIconRoot(const QString &path)
IconInfo resolveIcon(const QString &id) const
IconInfo resolveIcon(const QString &id, Silica::Theme::ColorScheme colorScheme) const
QString resolvePath(const QString &id) const
QString resolvePath(const QString &id, Silica::Theme::ColorScheme colorScheme) const

Detailed Description

Allows to request theme icons.

Member Type Documentation

enum ThemeIconResolver::InitFlags

ConstantValueDescription
ThemeIconResolver::NoContent0x0Used to instantiate the ImageProvider with no content loaded
ThemeIconResolver::LoadDefaultTheme0x1Used to instantiate the ImageProvider with default theme loaded

Member Function Documentation

ThemeIconResolver::ThemeIconResolver()

Default constructs an instance of ThemeIconResolver.

ThemeIconResolver::ThemeIconResolver(InitFlags initFlags)

Default constructs an instance of ThemeIconResolver.

[virtual] ThemeIconResolver::~ThemeIconResolver()

Destroys the instance of ThemeIconResolver. The destructor is virtual.

void ThemeIconResolver::addIconRoot(const QString &path)

addIconRoot Add an icon root to be used for icon lookups.

This can include multiple 'zN.M' subdirectories where N.M signify the pixel ratio using two decimals, or one if last is zero. The root and the pixel ratio subdirectories can contain 'icons' and 'icons-monochrome' directories for the icon content. path Path of the icon root.

IconInfo ThemeIconResolver::resolveIcon(const QString &id) const

resolveIcon Resolves icon info from an icon id. id Identifier of the image.

Returns info object for the lookup result. If icon is not found, it has an empty path.

IconInfo ThemeIconResolver::resolveIcon(const QString &id, Silica::Theme::ColorScheme colorScheme) const

resolveIcon Resolves icon info from an icon id using given color schme id Identifier of the image. colorScheme Color scheme to be used

Returns info object for the lookup result. If icon is not found, it has an empty path.

QString ThemeIconResolver::resolvePath(const QString &id) const

resolvePath Resolves absolute path of an icon id. id Identifier of the image.

Returns absolute path of the id. If icon is not found an empty string is returned.

QString ThemeIconResolver::resolvePath(const QString &id, Silica::Theme::ColorScheme colorScheme) const

resolvePath Resolves absolute path of an icon id using a given color scheme id Identifier of the image. colorScheme Color scheme to use

Returns absolute path of the id. If icon is not found an empty string is returned.

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn