Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpalette.cpp File Reference

(82967a885f14aeca80ffa1a3589c12b1672aec0b)

#include "qpalette_p.h"
#include "qguiapplication_p.h"
#include "qdatastream.h"
#include "qvariant.h"
#include "qdebug.h"
#include <QtCore/qmetaobject.h>
#include "moc_qpalette.cpp"
Include dependency graph for qpalette.cpp:

Go to the source code of this file.

Functions

static QColor qt_mix_colors (QColor a, QColor b)
static void qt_placeholder_from_text (QPalette &pal, int alpha=50)
static void qt_ensure_default_accent_color (QPalette &pal)
static void qt_palette_from_color (QPalette &pal, const QColor &button)
static constexpr QPalette::ResolveMask allResolveMask ()
static void readV1ColorGroup (QDataStream &s, QPalette &pal, QPalette::ColorGroup grp)
static QString groupsToString (const QPalette &p, QPalette::ColorRole cr)
static QString rolesToString (const QPalette &p)
QDebug operator<< (QDebug dbg, const QPalette &p)

Variables

static const int NumOldRoles = 7
static const int oldRoles [7]

Function Documentation

◆ allResolveMask()

constexpr QPalette::ResolveMask allResolveMask ( )
staticconstexpr

Definition at line 950 of file qpalette.cpp.

◆ groupsToString()

QString groupsToString ( const QPalette & p,
QPalette::ColorRole cr )
static

Definition at line 1233 of file qpalette.cpp.

◆ operator<<()

QDebug operator<< ( QDebug dbg,
const QPalette & p )

Definition at line 1270 of file qpalette.cpp.

◆ qt_ensure_default_accent_color()

void qt_ensure_default_accent_color ( QPalette & pal)
static

Definition at line 57 of file qpalette.cpp.

◆ qt_mix_colors()

QColor qt_mix_colors ( QColor a,
QColor b )
static

Definition at line 23 of file qpalette.cpp.

◆ qt_palette_from_color()

void qt_palette_from_color ( QPalette & pal,
const QColor & button )
static

Definition at line 75 of file qpalette.cpp.

◆ qt_placeholder_from_text()

void qt_placeholder_from_text ( QPalette & pal,
int alpha = 50 )
static

Derive undefined \l PlaceholderText colors from \l Text colors. Unless already set, PlaceholderText colors will be derived from their Text pendents. Colors of existing PlaceHolderText brushes will not be replaced.

alpha represents the dim factor as a percentage. By default, a PlaceHolderText color becomes a 50% more transparent version of the corresponding Text color.

Definition at line 39 of file qpalette.cpp.

◆ readV1ColorGroup()

void readV1ColorGroup ( QDataStream & s,
QPalette & pal,
QPalette::ColorGroup grp )
static

Definition at line 1073 of file qpalette.cpp.

References NumOldRoles.

◆ rolesToString()

QString rolesToString ( const QPalette & p)
static

Definition at line 1252 of file qpalette.cpp.

Variable Documentation

◆ NumOldRoles

const int NumOldRoles = 7
static

Definition at line 1035 of file qpalette.cpp.

Referenced by QPalette::operator<<, and readV1ColorGroup().

◆ oldRoles

const int oldRoles
static