Kirigami::Platform::PlatformPluginFactory Class

class Kirigami::Platform::PlatformPluginFactory

This class is reimplemented by plugins to provide different implementations of PlatformTheme. More...

Header: #include <Kirigami/Platform/PlatformPluginFactory>
CMake: find_package(KF6 REQUIRED COMPONENTS KirigamiPlatform)
target_link_libraries(mytarget PRIVATE KF6::KirigamiPlatform)
Inherits: QObject

Public Functions

virtual Kirigami::Platform::PlatformTheme *createPlatformTheme(QObject *parent) = 0
virtual Kirigami::Platform::Units *createUnits(QObject *parent) = 0

Static Public Members

Kirigami::Platform::PlatformPluginFactory *findPlugin(const QString &pluginName = {})

Detailed Description

Member Function Documentation

[pure virtual] Kirigami::Platform::PlatformTheme *PlatformPluginFactory::createPlatformTheme(QObject *parent)

Creates an instance of PlatformTheme which can come out from an implementation provided by a plugin

If this returns nullptr the PlatformTheme will use a fallback implementation that loads a theme definition from a QML file.

parent the parent object of the created PlatformTheme

[pure virtual] Kirigami::Platform::Units *PlatformPluginFactory::createUnits(QObject *parent)

Creates an instance of Units which can come from an implementation provided by a plugin

parent the parent of the units object

[static] Kirigami::Platform::PlatformPluginFactory *PlatformPluginFactory::findPlugin(const QString &pluginName = {})

Finds the plugin providing units and platformtheme for the current style The plugin pointer is cached, so only the first call is a potentially heavy operation

pluginName The name we want to search for, if empty the name of the current QtQuickControls style will be searched

Returns pointer to the PlatformPluginFactory of the current style