Kirigami::Platform::PlatformThemeChangeTracker Class
class Kirigami::Platform::PlatformThemeChangeTrackerA 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.
| Constant | Value |
|---|---|
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::None | 0 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::ColorSet | 1 << 0 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::ColorGroup | 1 << 1 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Color | 1 << 2 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Palette | 1 << 3 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Font | 1 << 4 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::Data | 1 << 5 |
Kirigami::Platform::PlatformThemeChangeTracker::PropertyChange::All | ColorSet | ColorGroup | Color | Palette | Font | Data |
The PropertyChanges type is a typedef for QFlags<PropertyChange>. It stores an OR combination of PropertyChange values.