Kirigami::Platform::PlatformThemeChangeTracker Class

class Kirigami::Platform::PlatformThemeChangeTracker

A class that tracks changes to PlatformTheme properties and emits signals at the right moment. More...

Header: #include <Kirigami/Platform/PlatformTheme>
CMake: find_package(KF6 REQUIRED COMPONENTS KirigamiPlatform)
target_link_libraries(mytarget PRIVATE KF6::KirigamiPlatform)
Since: 6.7

Public Types

enum class PropertyChange { None, ColorSet, ColorGroup, Color, Palette, …, All }
flags PropertyChanges

Detailed Description

This should be used by PlatformTheme implementations to ensure that multiple changes to a PlatformTheme's properties do not emit multiple change signals, instead batching all of them into a single signal emission. This then ensures things making use of PlatformTheme aren't needlessly redrawn or redrawn in a partially changed state.

Member Type Documentation

enum class PlatformThemeChangeTracker::PropertyChange
flags PlatformThemeChangeTracker::PropertyChanges

Flags used to indicate changes made to certain properties.

ConstantValue
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::None0
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::ColorSet1 << 0
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::ColorGroup1 << 1
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Color1 << 2
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Palette1 << 3
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Font1 << 4
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Data1 << 5
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::AllColorSet | ColorGroup | Color | Palette | Font | Data

The PropertyChanges type is a typedef for QFlags<PropertyChange>. It stores an OR combination of PropertyChange values.