Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
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
 

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 293 of file qquickpaletteproviderprivatebase_p.h.

References palette.

◆ palette()

template<class I , class Impl >
QQuickPalette * QQuickPaletteProviderPrivateBase< I, Impl >::palette ( ) const
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.

◆ 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().

+ Here is the call graph for this function:

◆ providesPalette()

template<class I , class Impl >
bool QQuickPaletteProviderPrivateBase< I, Impl >::providesPalette ( ) const
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.

◆ 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.

◆ setCurrentColorGroup()

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

Definition at line 306 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 QQuickWindowPrivate, and QQuickPopupItemPrivate.

Definition at line 177 of file qquickpaletteproviderprivatebase_p.h.

References palette.

Referenced by QQuickWindowPrivate::updateWindowPalette().

+ 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 320 of file qquickpaletteproviderprivatebase_p.h.

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

+ Here is the call graph for this function:

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