Kirigami::PlatformTheme

Search for usage in LXR

#include <Kirigami/PlatformTheme>

Inheritance diagram for Kirigami::PlatformTheme:

Public Types

enum  ColorGroup {
  Disabled = QPalette::Disabled, Active = QPalette::Active, Inactive = QPalette::Inactive, Normal = QPalette::Normal,
  ColorGroupCount
}
 
enum  ColorSet {
  View = 0, Window, Button, Selection,
  Tooltip, Complementary, Header, ColorSetCount
}
 

Properties

QColor activeBackgroundColor
 
QColor activeTextColor
 
QColor alternateBackgroundColor
 
QColor backgroundColor
 
ColorGroup colorGroup
 
ColorSet colorSet
 
QFont defaultFont
 
QColor disabledTextColor
 
QColor focusColor
 
QColor highlightColor
 
QColor highlightedTextColor
 
QColor hoverColor
 
bool inherit
 
QColor linkBackgroundColor
 
QColor linkColor
 
QColor negativeBackgroundColor
 
QColor negativeTextColor
 
QColor neutralBackgroundColor
 
QColor neutralTextColor
 
QPalette palette
 
QColor positiveBackgroundColor
 
QColor positiveTextColor
 
QFont smallFont
 
QColor textColor
 
QColor visitedLinkBackgroundColor
 
QColor visitedLinkColor
 
- Properties inherited from QObject
 objectName
 

Signals

void colorGroupChanged (Kirigami::PlatformTheme::ColorGroup colorGroup)
 
void colorsChanged ()
 
void colorSetChanged (Kirigami::PlatformTheme::ColorSet colorSet)
 
void defaultFontChanged (const QFont &font)
 
void inheritChanged (bool inherit)
 
void paletteChanged (const QPalette &pal)
 
void smallFontChanged (const QFont &font)
 

Public Member Functions

 PlatformTheme (QObject *parent=nullptr)
 
QColor activeBackgroundColor () const
 
QColor activeTextColor () const
 
QColor alternateBackgroundColor () const
 
QColor backgroundColor () const
 
PlatformTheme::ColorGroup colorGroup () const
 
PlatformTheme::ColorSet colorSet () const
 
QFont defaultFont () const
 
QColor disabledTextColor () const
 
QColor focusColor () const
 
QColor highlightColor () const
 
QColor highlightedTextColor () const
 
QColor hoverColor () const
 
virtual Q_INVOKABLE QIcon iconFromTheme (const QString &name, const QColor &customColor=Qt::transparent)
 
bool inherit () const
 
QColor linkBackgroundColor () const
 
QColor linkColor () const
 
QColor negativeBackgroundColor () const
 
QColor negativeTextColor () const
 
QColor neutralBackgroundColor () const
 
QColor neutralTextColor () const
 
QPalette palette () const
 
QColor positiveBackgroundColor () const
 
QColor positiveTextColor () const
 
void setColorGroup (PlatformTheme::ColorGroup)
 
void setColorSet (PlatformTheme::ColorSet)
 
void setCustomActiveBackgroundColor (const QColor &color=QColor())
 
void setCustomActiveTextColor (const QColor &color=QColor())
 
void setCustomAlternateBackgroundColor (const QColor &color=QColor())
 
void setCustomBackgroundColor (const QColor &color=QColor())
 
void setCustomDisabledTextColor (const QColor &color=QColor())
 
void setCustomFocusColor (const QColor &color=QColor())
 
void setCustomHighlightColor (const QColor &color=QColor())
 
void setCustomHighlightedTextColor (const QColor &color=QColor())
 
void setCustomHoverColor (const QColor &color=QColor())
 
void setCustomLinkBackgroundColor (const QColor &color=QColor())
 
void setCustomLinkColor (const QColor &color=QColor())
 
void setCustomNegativeBackgroundColor (const QColor &color=QColor())
 
void setCustomNegativeTextColor (const QColor &color=QColor())
 
void setCustomNeutralBackgroundColor (const QColor &color=QColor())
 
void setCustomNeutralTextColor (const QColor &color=QColor())
 
void setCustomPositiveBackgroundColor (const QColor &color=QColor())
 
void setCustomPositiveTextColor (const QColor &color=QColor())
 
void setCustomTextColor (const QColor &color=QColor())
 
void setCustomVisitedLinkBackgroundColor (const QColor &color=QColor())
 
void setCustomVisitedLinkColor (const QColor &color=QColor())
 
void setInherit (bool inherit)
 
QFont smallFont () const
 
bool supportsIconColoring () const
 
QColor textColor () const
 
QColor visitedLinkBackgroundColor () const
 
QColor visitedLinkColor () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static PlatformThemeqmlAttachedProperties (QObject *object)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Member Functions

bool event (QEvent *event) override
 
void setActiveBackgroundColor (const QColor &color)
 
void setActiveTextColor (const QColor &color)
 
void setAlternateBackgroundColor (const QColor &color)
 
void setBackgroundColor (const QColor &color)
 
void setDefaultFont (const QFont &defaultFont)
 
void setDisabledTextColor (const QColor &color)
 
void setFocusColor (const QColor &color)
 
void setHighlightColor (const QColor &color)
 
void setHighlightedTextColor (const QColor &color)
 
void setHoverColor (const QColor &color)
 
void setLinkBackgroundColor (const QColor &color)
 
void setLinkColor (const QColor &color)
 
void setNegativeBackgroundColor (const QColor &color)
 
void setNegativeTextColor (const QColor &color)
 
void setNeutralBackgroundColor (const QColor &color)
 
void setNeutralTextColor (const QColor &color)
 
void setPositiveBackgroundColor (const QColor &color)
 
void setPositiveTextColor (const QColor &color)
 
void setSmallFont (const QFont &smallFont)
 
void setSupportsIconColoring (bool support)
 
void setTextColor (const QColor &color)
 
void setVisitedLinkBackgroundColor (const QColor &color)
 
void setVisitedLinkColor (const QColor &color)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

This class is the base for color management in Kirigami, different platforms can reimplement this class to integrate with system platform colors of a given platform

See also
Colors and Themes in Kirigami
Human Interface Guidelines on Colors

Definition at line 33 of file platformtheme.h.

Member Enumeration Documentation

◆ ColorSet

Enumerator
Window 

Color set for item views, usually the lightest of all.

Button 

Default Color set for windows and "chrome" areas.

Selection 

Color set used by buttons.

Tooltip 

Color set used by selectged areas.

Complementary 

Color set used by tooltips.

Header 

Color set meant to be complementary to Window: usually is a dark theme for light themes.

ColorSetCount 

Color set to be used by heading areas of applications, such as toolbars.

Definition at line 187 of file platformtheme.h.

Property Documentation

◆ activeBackgroundColor

QColor Kirigami::PlatformTheme::activeBackgroundColor
readwrite

Background for areas that are active or requesting attention.

Definition at line 135 of file platformtheme.h.

◆ activeTextColor

QColor Kirigami::PlatformTheme::activeTextColor
readwrite

Foreground for areas that are active or requesting attention.

Definition at line 84 of file platformtheme.h.

◆ alternateBackgroundColor

QColor Kirigami::PlatformTheme::alternateBackgroundColor
readwrite

The generic background color Alternate background; for example, for use in lists.

This color may be the same as BackgroundNormal, especially in sets other than View and Window.

Definition at line 124 of file platformtheme.h.

◆ backgroundColor

QColor Kirigami::PlatformTheme::backgroundColor
readwrite

The generic background color.

Definition at line 115 of file platformtheme.h.

◆ colorGroup

PlatformTheme::ColorGroup Kirigami::PlatformTheme::colorGroup
readwrite

This enumeration describes the color group used to generate the colors.

The enum value is based upon QPalette::ColorGroup and has the same values.

It's redefined here in order to make it work with QML

Since
KDE Frameworks 4.43

Definition at line 53 of file platformtheme.h.

◆ colorSet

PlatformTheme::ColorSet Kirigami::PlatformTheme::colorSet
readwrite

This enumeration describes the color set for which a color is being selected.

Color sets define a color "environment", suitable for drawing all parts of a given region. Colors from different sets should not be combined.

Definition at line 43 of file platformtheme.h.

◆ disabledTextColor

QColor Kirigami::PlatformTheme::disabledTextColor
readwrite

Foreground color for disabled areas, usually a mid-gray.

Definition at line 73 of file platformtheme.h.

◆ focusColor

QColor Kirigami::PlatformTheme::focusColor
readwrite

A decoration color that indicates active focus.

Definition at line 170 of file platformtheme.h.

◆ highlightColor

QColor Kirigami::PlatformTheme::highlightColor
readwrite

The background color for selected areas.

Definition at line 129 of file platformtheme.h.

◆ highlightedTextColor

QColor Kirigami::PlatformTheme::highlightedTextColor
readwrite

Color for text that has been highlighted, often is a light color while normal text is dark.

Definition at line 79 of file platformtheme.h.

◆ hoverColor

QColor Kirigami::PlatformTheme::hoverColor
readwrite

A decoration color that indicates mouse hovering.

Definition at line 175 of file platformtheme.h.

◆ inherit

bool Kirigami::PlatformTheme::inherit
readwrite

If true, the ::colorSet will be inherited from the colorset of a theme of one of the ancestor items.

default: true

Definition at line 61 of file platformtheme.h.

◆ linkBackgroundColor

QColor Kirigami::PlatformTheme::linkBackgroundColor
readwrite

Background color for links.

Definition at line 140 of file platformtheme.h.

◆ linkColor

QColor Kirigami::PlatformTheme::linkColor
readwrite

Color for links.

Definition at line 89 of file platformtheme.h.

◆ negativeBackgroundColor

QColor Kirigami::PlatformTheme::negativeBackgroundColor
readwrite

Background color for negative areas, such as critical errors and destructive actions.

Definition at line 152 of file platformtheme.h.

◆ negativeTextColor

QColor Kirigami::PlatformTheme::negativeTextColor
readwrite

Foreground color for negative areas, such as critical error text.

Definition at line 99 of file platformtheme.h.

◆ neutralBackgroundColor

QColor Kirigami::PlatformTheme::neutralBackgroundColor
readwrite

Background color for neutral areas, such as warnings (but not critical)

Definition at line 158 of file platformtheme.h.

◆ neutralTextColor

QColor Kirigami::PlatformTheme::neutralTextColor
readwrite

Foreground color for neutral areas, such as warning texts (but not critical)

Definition at line 104 of file platformtheme.h.

◆ positiveBackgroundColor

QColor Kirigami::PlatformTheme::positiveBackgroundColor
readwrite

Background color for positive areas, such as success messages and trusted content.

Definition at line 164 of file platformtheme.h.

◆ positiveTextColor

QColor Kirigami::PlatformTheme::positiveTextColor
readwrite

Success messages, trusted content.

Definition at line 109 of file platformtheme.h.

◆ textColor

QColor Kirigami::PlatformTheme::textColor
readwrite

Color for normal foregrounds, usually text, but not limited to it, anything that should be painted with a clear contrast should use this color.

Definition at line 68 of file platformtheme.h.

◆ visitedLinkBackgroundColor

QColor Kirigami::PlatformTheme::visitedLinkBackgroundColor
readwrite

Background color for visited links, usually a bit darker than linkBackgroundColor.

Definition at line 146 of file platformtheme.h.

◆ visitedLinkColor

QColor Kirigami::PlatformTheme::visitedLinkColor
readwrite

Color for visited links, usually a bit darker than linkColor.

Definition at line 94 of file platformtheme.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:00:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.