25 class Data :
public QSharedData {
30 Data(
const Data &other)
33 for (
int grp = 0; grp <
int(QPalette::NColorGroups); grp++) {
34 for (
int role = 0; role <
int(QPalette::NColorRoles); role++)
35 br[grp][role] = other.br[grp][role];
40 QBrush br[QPalette::NColorGroups][QPalette::NColorRoles];
41 const int ser_no = qt_palette_count++;
44 QPalettePrivate(
const QExplicitlySharedDataPointer<Data> &data)
48 : QPalettePrivate(QExplicitlySharedDataPointer<Data>(
new Data))
51 static constexpr QPalette::ResolveMask colorRoleOffset(QPalette::ColorGroup colorGroup)
54 return (qToUnderlying(QPalette::NColorRoles) - 1) * qToUnderlying(colorGroup);
57 static constexpr QPalette::ResolveMask bitPosition(QPalette::ColorGroup colorGroup,
58 QPalette::ColorRole colorRole)
61 if (colorRole == QPalette::Accent)
62 colorRole = QPalette::NoRole;
64 return colorRole + colorRoleOffset(colorGroup);
68 QPalette::ResolveMask resolveMask = {0};
69 static inline int qt_palette_count = 0;
70 static inline int qt_palette_private_count = 0;
71 int detach_no = ++qt_palette_private_count;
72 QExplicitlySharedDataPointer<Data> data;
Combined button and popup list for selecting options.
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static QString groupsToString(const QPalette &p, QPalette::ColorRole cr)
static void qt_ensure_default_accent_color(QPalette &pal)
static const int NumOldRoles
static void qt_placeholder_from_text(QPalette &pal, int alpha=50)
static constexpr QPalette::ResolveMask allResolveMask()
static QString rolesToString(const QPalette &p)
static void readV1ColorGroup(QDataStream &s, QPalette &pal, QPalette::ColorGroup grp)
static QColor qt_mix_colors(QColor a, QColor b)
static const int oldRoles[7]
static void qt_palette_from_color(QPalette &pal, const QColor &button)