Style

Search for usage in LXR

#include <style.h>

Inheritance diagram for Style:

Public Types

enum  StyleType : uint {
  Light = 0 , Dark , Adaptive , Auto ,
  TrueBlack , Inverted
}
 

Properties

QColor accentColor
 
QVariant adaptiveColorSchemeSource
 
uint contentMargins
 
QString currentIconTheme
 
QFont defaultFont
 
uint defaultFontSize
 
uint defaultPadding
 
uint defaultSpacing
 
bool enableEffects
 
GroupSizesfontSizes
 
QFont h1Font
 
QFont h2Font
 
uint iconSize
 
GroupSizesiconSizes
 
bool menusHaveIcons
 
QFont monospacedFont
 
bool playSounds
 
uint radiusV
 
uint rowHeight
 
uint rowHeightAlt
 
uint scrollBarPolicy
 
GroupSizesspace
 
StyleType styleType
 
QML_ELEMENTuint toolBarHeight
 
uint toolBarHeightAlt
 
bool translucencyAvailable
 
Unitsunits
 
- Properties inherited from QObject
 objectName
 

Signals

void accentColorChanged (QColor color)
 
void adaptiveColorSchemeSourceChanged (QVariant source)
 
void colorSchemeChanged ()
 
void contentMarginsChanged ()
 
void currentIconThemeChanged (QString currentIconTheme)
 
void defaultFontChanged ()
 
void defaultPaddingChanged ()
 
void defaultSpacingChanged ()
 
void enableEffectsChanged (bool enableEffects)
 
void fontSizesChanged ()
 
void h1FontChanged ()
 
void h2FontChanged ()
 
void iconSizeChanged (uint size)
 
void monospacedFontChanged ()
 
void playSoundsChanged (bool)
 
void radiusVChanged (uint radius)
 
void scrollBarPolicyChanged (uint)
 
void styleTypeChanged (StyleType type)
 
void translucencyAvailableChanged (bool translucencyAvailable)
 

Public Slots

int mapToIconSizes (const int &size)
 

Public Member Functions

QColor accentColor () const
 
QVariant adaptiveColorSchemeSource () const
 
QString currentIconTheme () const
 
bool enableEffects () const
 
uint iconSize () const
 
bool menusHaveIcons () const
 
bool playSounds () const
 
uint scrollBarPolicy () const
 
void setAccentColor (const QColor &color)
 
void setAdaptiveColorSchemeSource (const QVariant &source)
 
void setRadiusV (const uint &radius)
 
void setStyleType (const StyleType &type)
 
void setTranslucencyAvailable (const bool &value)
 
StyleType styleType () const
 
bool translucencyAvailable () const
 
void unsetAccentColor ()
 
void unsetAdaptiveColorSchemeSource ()
 
void unsetStyeType ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
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 () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, 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
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
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_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 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
 
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 setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- 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)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- 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)
 

Detailed Description

The MauiKit Style preferences singleton object.

Definition at line 84 of file style.h.

Member Enumeration Documentation

◆ StyleType

enum Style::StyleType : uint

The different options for the color scheme style.

Enumerator
Light 

A light variant designed for Maui.

Dark 

A dark variant designed for Maui.

Adaptive 

Picks the color scheme based on an source input, such as an image.

The generated color palette determines if it is a dark or light scheme, and also its accent color.

Auto 

Picks the colors from the system palette, usually from Plasma color-scheme files.

Note
Use this type when mixing MauiKit with Kirigami controls, so both frameworks pick up the color palette from the same source.
TrueBlack 

A fully black color palette with a full white accent color.

This is might be useful as a accessibility enhance or for performance on E-Ink and AMOLED displays.

Inverted 

A fully white color palette with a true black accent color.

This is the inverted version of the TrueBlack type.

Definition at line 269 of file style.h.

Property Documentation

◆ accentColor

QColor Style::accentColor
readwrite

Sets the color to be used for highlighted, active, checked and such states of the UI elements.

By default this color is set to the global preferences via MauiMan. This can be overridden by each application to a custom color. To reset it back to the system preference set the property to undefined.

Definition at line 204 of file style.h.

◆ adaptiveColorSchemeSource

QVariant Style::adaptiveColorSchemeSource
readwrite

The source for picking up the application color palette when the style type is set to Style.Adaptive.

The source can be an image URL, and QQC2 Image, or a QQC2 Item, or even an icon name. By default the source for this is set to the MauiMan wallpaper source preference.

Definition at line 211 of file style.h.

◆ contentMargins

uint Style::contentMargins

The preferred size for the margins in the browsing views, such as the ListBrowser and GridBrowser, but also for the margins in menus.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 132 of file style.h.

◆ currentIconTheme

QString Style::currentIconTheme
read

The current system icon theme picked up by the user.

Note
This property is read-only. It can only be modified from the MauiMan global preferences.
Warning
This only works when using the Maui Shell ecosystem. There is not support for Plasma or GNOME desktops.

Definition at line 233 of file style.h.

◆ defaultFont

QFont Style::defaultFont

The preferred font for the text in labels.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 157 of file style.h.

◆ defaultFontSize

uint Style::defaultFontSize

The preferred font size for the text labels in the UI elements.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 138 of file style.h.

◆ defaultPadding

uint Style::defaultPadding

The preferred padding size for the UI elements, such a menu entries, buttons, bars, etc.

The padding refers to the outer-space around the visible background area of the elements.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 145 of file style.h.

◆ defaultSpacing

uint Style::defaultSpacing

The preferred spacing size between elements in rows or columns, etc.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 151 of file style.h.

◆ enableEffects

bool Style::enableEffects
read

Whether special effects are desired.

This can be tweaked in the MauiMan system preferences in cases where the resources need to be preserved. Consider using this property when using special effects in your applications.

Note
This property is read-only. It can only be modified from the MauiMan global preferences.

Definition at line 226 of file style.h.

◆ fontSizes

GroupSizes * Style::fontSizes

The group of different standard font sizes for the MauiKit applications.

See also
GroupSizes

Definition at line 179 of file style.h.

◆ h1Font

QFont Style::h1Font

The preferred font for titles and headers.

Definition at line 162 of file style.h.

◆ h2Font

QFont Style::h2Font

The preferred font for subtitles.

Definition at line 167 of file style.h.

◆ iconSize

uint Style::iconSize
read

The preferred size for painting the icons in places, such as menus, buttons and delegates.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 115 of file style.h.

◆ iconSizes

GroupSizes * Style::iconSizes

The group of different standard icon sizes for consistency in the MauiKit apps.

See also
GroupSizes Values are the standard: 16, 22, 32 ,48, 64, 128 [pixels]

Definition at line 192 of file style.h.

◆ menusHaveIcons

bool Style::menusHaveIcons
read

Whether the menu entries should display the icon image.

Note
This property is read-only. This is picked by from the QPA Qt Theme integration platform, so its default value will depend on the desktop shell being used.

Definition at line 239 of file style.h.

◆ monospacedFont

QFont Style::monospacedFont

The preferred mono spaced font.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 173 of file style.h.

◆ playSounds

bool Style::playSounds
read

Whether the user desires for the application to play sounds or not.

Note
This property is read-only. It can only be modified from the MauiMan global preferences.

Definition at line 251 of file style.h.

◆ radiusV

uint Style::radiusV

The preferred radius for the border corners of the UI elements.

Note
This property is read only. It can only be modified from the MauiMan global preferences.

Definition at line 109 of file style.h.

◆ rowHeight

uint Style::rowHeight

The standard size for the height of elements represented as a row.

Such as items in lists. This can be used for keeping a coherent look, when an implicit height is not desired, or as the minimum height.

Definition at line 121 of file style.h.

◆ rowHeightAlt

uint Style::rowHeightAlt

An alternative height to the rowHeight, this size is a bit smaller.

Definition at line 126 of file style.h.

◆ scrollBarPolicy

uint Style::scrollBarPolicy
read

The preferred scroll bars policy for displaying them or not.

Note
This property is read-only. This is picked by from the QPA Qt Theme integration platform, so its default value will depend on the desktop shell being used.

Definition at line 245 of file style.h.

◆ space

GroupSizes * Style::space

The group of different standard spacing values for consistency in the MauiKit apps.

See also
GroupSizes

Definition at line 185 of file style.h.

◆ styleType

StyleType Style::styleType
readwrite

The preferred style type for setting the color scheme of the application.

See also
StyleType By default this is set to the MauiMan global preference. It can be overridden by the application, and to reset it - back to the original system preference - by setting this to undefined.

Definition at line 219 of file style.h.

◆ toolBarHeight

QML_ELEMENTuint Style::toolBarHeight

The standard height size for the toolbars, such as ToolBar, TabBar, etc.

Usually this is used as the minimum height fo those bars.

Note
This property is read only.

Definition at line 96 of file style.h.

◆ toolBarHeightAlt

uint Style::toolBarHeightAlt

An alternative size for the tab bars, this is a bit smaller then the toolBarHeight.

See also
toolBarHeight

Definition at line 103 of file style.h.

◆ translucencyAvailable

bool Style::translucencyAvailable
read

Whether the application window surface should be transparent and request the compositor to blur the background area of the window surface.

By default this is set to false.

Definition at line 257 of file style.h.

◆ units

Units * Style::units

The standard units group.

See the Units documentation for more information.

Definition at line 197 of file style.h.

Member Function Documentation

◆ accentColor()

QColor Style::accentColor ( ) const

Definition at line 393 of file style.cpp.

◆ adaptiveColorSchemeSource()

QVariant Style::adaptiveColorSchemeSource ( ) const

Definition at line 369 of file style.cpp.

◆ currentIconTheme()

QString Style::currentIconTheme ( ) const

Definition at line 459 of file style.cpp.

◆ enableEffects()

bool Style::enableEffects ( ) const

Definition at line 249 of file style.cpp.

◆ iconSize()

uint Style::iconSize ( ) const

Definition at line 454 of file style.cpp.

◆ mapToIconSizes

int Style::mapToIconSizes ( const int & size)
slot

Given a size as argument this function will return the best fitted icon size from the standard icon sizes.

For example for the a size of 36, this function should return a size of 32.

Definition at line 344 of file style.cpp.

◆ menusHaveIcons()

bool Style::menusHaveIcons ( ) const

Definition at line 464 of file style.cpp.

◆ playSounds()

bool Style::playSounds ( ) const

Definition at line 475 of file style.cpp.

◆ scrollBarPolicy()

uint Style::scrollBarPolicy ( ) const

Definition at line 469 of file style.cpp.

◆ setAccentColor()

void Style::setAccentColor ( const QColor & color)

Definition at line 398 of file style.cpp.

◆ setAdaptiveColorSchemeSource()

void Style::setAdaptiveColorSchemeSource ( const QVariant & source)

Definition at line 374 of file style.cpp.

◆ setRadiusV()

void Style::setRadiusV ( const uint & radius)

Definition at line 238 of file style.cpp.

◆ setStyleType()

void Style::setStyleType ( const StyleType & type)

Definition at line 423 of file style.cpp.

◆ setTranslucencyAvailable()

void Style::setTranslucencyAvailable ( const bool & value)

Definition at line 259 of file style.cpp.

◆ styleType()

Style::StyleType Style::styleType ( ) const

Definition at line 418 of file style.cpp.

◆ translucencyAvailable()

bool Style::translucencyAvailable ( ) const

Definition at line 254 of file style.cpp.

◆ unsetAccentColor()

void Style::unsetAccentColor ( )

Definition at line 411 of file style.cpp.

◆ unsetAdaptiveColorSchemeSource()

void Style::unsetAdaptiveColorSchemeSource ( )

Definition at line 386 of file style.cpp.

◆ unsetStyeType()

void Style::unsetStyeType ( )

Definition at line 434 of file style.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:57:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.