Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QQuickPaletteProviderPrivateBase< I, Impl > Class Template Reference

#include <qquickpaletteproviderprivatebase_p.h>

+ Inheritance diagram for QQuickPaletteProviderPrivateBase< I, Impl >:
+ Collaboration diagram for QQuickPaletteProviderPrivateBase< I, Impl >:

Public Member Functions

virtual ~QQuickPaletteProviderPrivateBase ()=default
 
virtual QQuickPalettepalette () const
 
virtual void setPalette (QQuickPalette *p)
 
virtual void resetPalette ()
 
virtual bool providesPalette () const
 
QPalette defaultPalette () const override
 
QPalette parentPalette (const QPalette &fallbackPalette) const override
 
void inheritPalette (const QPalette &parentPalette)
 
virtual void updateChildrenPalettes (const QPalette &parentPalette)
 
- Public Member Functions inherited from QQuickAbstractPaletteProvider
virtual ~QQuickAbstractPaletteProvider ()=default
 
virtual QPalette defaultPalette () const =0
 
virtual QPalette parentPalette (const QPalette &fallbackPalette) const
 

Protected Member Functions

void setCurrentColorGroup ()
 

Detailed Description

template<class I, class Impl>
class QQuickPaletteProviderPrivateBase< I, Impl >

Implements all required operations with palette.

I – is interface class (e.g. QQuickItem). Impl – is implementation class (e.g. QQuickItemPrivate).

To use this class you need to inherit implementation class from it.

Definition at line 43 of file qquickpaletteproviderprivatebase_p.h.

Constructor & Destructor Documentation

◆ ~QQuickPaletteProviderPrivateBase()

template<class I , class Impl >
virtual QQuickPaletteProviderPrivateBase< I, Impl >::~QQuickPaletteProviderPrivateBase ( )
virtualdefault

Member Function Documentation

◆ defaultPalette()

◆ inheritPalette()

template<class I , class Impl >
void QQuickPaletteProviderPrivateBase< I, Impl >::inheritPalette ( const QPalette parentPalette)

Inherit from parentPalette. This function is also called when either parent or window of this item is changed.

Definition at line 290 of file qquickpaletteproviderprivatebase_p.h.

References palette.

Referenced by QQuickWindowPrivate::updateChildrenPalettes().

+ Here is the caller graph for this function:

◆ palette()

template<class I , class Impl >
QQuickPalette * QQuickPaletteProviderPrivateBase< I, Impl >::palette
virtual

Get current palette.

Note
Palette might be lazily allocated. Signal paletteCreated() will be emitted by an object of interface class in this case.
This function doesn't ask an object of interface class to emit paletteChanged() signal in order to avoid problems with property bindigns.

Reimplemented in QQuickPopupItemPrivate.

Definition at line 148 of file qquickpaletteproviderprivatebase_p.h.

References Q_EMIT.

Referenced by QQuickStyleItem::initStyleOptionBase(), QQuickFusionDial::paint(), QQuickFusionKnob::paint(), and QQuickPopupItemPrivate::palette().

+ Here is the caller graph for this function:

◆ parentPalette()

template<class I , class Impl >
QPalette QQuickPaletteProviderPrivateBase< I, Impl >::parentPalette ( const QPalette fallbackPalette) const
overridevirtual

The parent palette for this component. Can be null.

Reimplemented from QQuickAbstractPaletteProvider.

Reimplemented in QQuickPopupItemPrivate.

Definition at line 257 of file qquickpaletteproviderprivatebase_p.h.

References getPrivate().

Referenced by QQuickPopupItemPrivate::parentPalette().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ providesPalette()

template<class I , class Impl >
bool QQuickPaletteProviderPrivateBase< I, Impl >::providesPalette
virtual

Check if everything is internally allocated and palette exists.

Use before call palette() to avoid unnecessary allocations.

Reimplemented in QQuickPopupItemPrivate.

Definition at line 191 of file qquickpaletteproviderprivatebase_p.h.

Referenced by QQuickPopupItemPrivate::providesPalette().

+ Here is the caller graph for this function:

◆ resetPalette()

template<class I , class Impl >
void QQuickPaletteProviderPrivateBase< I, Impl >::resetPalette
virtual

Reset palette to the default one.

Reimplemented in QQuickPopupItemPrivate.

Definition at line 185 of file qquickpaletteproviderprivatebase_p.h.

Referenced by QQuickPopupItemPrivate::resetPalette().

+ Here is the caller graph for this function:

◆ setCurrentColorGroup()

template<class I , class Impl >
void QQuickPaletteProviderPrivateBase< I, Impl >::setCurrentColorGroup
protected

Definition at line 303 of file qquickpaletteproviderprivatebase_p.h.

References QPalette::Active, QPalette::Disabled, QPalette::Inactive, palette, and window().

+ Here is the call graph for this function:

◆ setPalette()

template<class I , class Impl >
void QQuickPaletteProviderPrivateBase< I, Impl >::setPalette ( QQuickPalette p)
virtual

Set new palette. Doesn't transfer ownership.

Reimplemented in QQuickPopupItemPrivate.

Definition at line 177 of file qquickpaletteproviderprivatebase_p.h.

References palette.

Referenced by QQuickPopupItemPrivate::setPalette().

+ Here is the caller graph for this function:

◆ updateChildrenPalettes()

template<class I , class Impl >
void QQuickPaletteProviderPrivateBase< I, Impl >::updateChildrenPalettes ( const QPalette parentPalette)
virtual

Updates children palettes. The default implementation invokes inheritPalette for all visual children.

This function is also called when palette is changed (signal changed() is emitted).

Reimplemented in QQuickWindowPrivate, and QQuickApplicationWindowPrivate.

Definition at line 317 of file qquickpaletteproviderprivatebase_p.h.

References child, getPrivate(), Q_LIKELY, and rootItem().

Referenced by QQuickPopupPrivate::updateContentPalettes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: