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
QPlatformTheme Class Reference

The QPlatformTheme class allows customizing the UI based on themes. More...

#include <qplatformtheme.h>

+ Inheritance diagram for QPlatformTheme:
+ Collaboration diagram for QPlatformTheme:

Public Types

enum  ThemeHint {
  CursorFlashTime , KeyboardInputInterval , MouseDoubleClickInterval , StartDragDistance ,
  StartDragTime , KeyboardAutoRepeatRate , PasswordMaskDelay , StartDragVelocity ,
  TextCursorWidth , DropShadow , MaximumScrollBarDragDistance , ToolButtonStyle ,
  ToolBarIconSize , ItemViewActivateItemOnSingleClick , SystemIconThemeName , SystemIconFallbackThemeName ,
  IconThemeSearchPaths , StyleNames , WindowAutoPlacement , DialogButtonBoxLayout ,
  DialogButtonBoxButtonsHaveIcons , UseFullScreenForPopupMenu , KeyboardScheme , UiEffects ,
  SpellCheckUnderlineStyle , TabFocusBehavior , IconPixmapSizes , PasswordMaskCharacter ,
  DialogSnapToDefaultButton , ContextMenuOnMouseRelease , MousePressAndHoldInterval , MouseDoubleClickDistance ,
  WheelScrollLines , TouchDoubleTapDistance , ShowShortcutsInContextMenus , IconFallbackSearchPaths ,
  MouseQuickSelectionThreshold , InteractiveResizeAcrossScreens , ShowDirectoriesFirst , PreselectFirstFileInDirectory ,
  ButtonPressKeys , SetFocusOnTouchRelease , FlickStartDistance , FlickMaximumVelocity ,
  FlickDeceleration , MenuBarFocusOnAltPressRelease , MouseCursorTheme , MouseCursorSize ,
  UnderlineShortcut
}
 This enum describes the available theme hints. More...
 
enum  DialogType { FileDialog , ColorDialog , FontDialog , MessageDialog }
 
enum  Palette {
  SystemPalette , ToolTipPalette , ToolButtonPalette , ButtonPalette ,
  CheckBoxPalette , RadioButtonPalette , HeaderPalette , ComboBoxPalette ,
  ItemViewPalette , MessageBoxLabelPelette , MessageBoxLabelPalette = MessageBoxLabelPelette , TabBarPalette ,
  LabelPalette , GroupBoxPalette , MenuPalette , MenuBarPalette ,
  TextEditPalette , TextLineEditPalette , NPalettes
}
 
enum  Font {
  SystemFont , MenuFont , MenuBarFont , MenuItemFont ,
  MessageBoxFont , LabelFont , TipLabelFont , StatusBarFont ,
  TitleBarFont , MdiSubWindowTitleFont , DockWidgetTitleFont , PushButtonFont ,
  CheckBoxFont , RadioButtonFont , ToolButtonFont , ItemViewFont ,
  ListViewFont , HeaderViewFont , ListBoxFont , ComboMenuItemFont ,
  ComboLineEditFont , SmallFont , MiniFont , FixedFont ,
  GroupBoxTitleFont , TabButtonFont , EditorFont , NFonts
}
 
enum  StandardPixmap {
  TitleBarMenuButton , TitleBarMinButton , TitleBarMaxButton , TitleBarCloseButton ,
  TitleBarNormalButton , TitleBarShadeButton , TitleBarUnshadeButton , TitleBarContextHelpButton ,
  DockWidgetCloseButton , MessageBoxInformation , MessageBoxWarning , MessageBoxCritical ,
  MessageBoxQuestion , DesktopIcon , TrashIcon , ComputerIcon ,
  DriveFDIcon , DriveHDIcon , DriveCDIcon , DriveDVDIcon ,
  DriveNetIcon , DirOpenIcon , DirClosedIcon , DirLinkIcon ,
  DirLinkOpenIcon , FileIcon , FileLinkIcon , ToolBarHorizontalExtensionButton ,
  ToolBarVerticalExtensionButton , FileDialogStart , FileDialogEnd , FileDialogToParent ,
  FileDialogNewFolder , FileDialogDetailedView , FileDialogInfoView , FileDialogContentsView ,
  FileDialogListView , FileDialogBack , DirIcon , DialogOkButton ,
  DialogCancelButton , DialogHelpButton , DialogOpenButton , DialogSaveButton ,
  DialogCloseButton , DialogApplyButton , DialogResetButton , DialogDiscardButton ,
  DialogYesButton , DialogNoButton , ArrowUp , ArrowDown ,
  ArrowLeft , ArrowRight , ArrowBack , ArrowForward ,
  DirHomeIcon , CommandLink , VistaShield , BrowserReload ,
  BrowserStop , MediaPlay , MediaStop , MediaPause ,
  MediaSkipForward , MediaSkipBackward , MediaSeekForward , MediaSeekBackward ,
  MediaVolume , MediaVolumeMuted , LineEditClearButton , DialogYesToAllButton ,
  DialogNoToAllButton , DialogSaveAllButton , DialogAbortButton , DialogRetryButton ,
  DialogIgnoreButton , RestoreDefaultsButton , TabCloseButton , NStandardPixmap ,
  CustomBase = 0xf0000000
}
 
enum  KeyboardSchemes {
  WindowsKeyboardScheme , MacKeyboardScheme , X11KeyboardScheme , KdeKeyboardScheme ,
  GnomeKeyboardScheme , CdeKeyboardScheme
}
 
enum  UiEffect {
  GeneralUiEffect = 0x1 , AnimateMenuUiEffect = 0x2 , FadeMenuUiEffect = 0x4 , AnimateComboUiEffect = 0x8 ,
  AnimateTooltipUiEffect = 0x10 , FadeTooltipUiEffect = 0x20 , AnimateToolBoxUiEffect = 0x40 , HoverEffect = 0x80
}
 
enum  IconOption { DontUseCustomDirectoryIcons = 0x01 }
 

Public Member Functions

 Q_ENUM (DialogType)
 
 QPlatformTheme ()
 
virtual ~QPlatformTheme ()
 
virtual QPlatformMenuItemcreatePlatformMenuItem () const
 
virtual QPlatformMenucreatePlatformMenu () const
 
virtual QPlatformMenuBarcreatePlatformMenuBar () const
 
virtual void showPlatformMenuBar ()
 
virtual bool usePlatformNativeDialog (DialogType type) const
 
virtual QPlatformDialogHelpercreatePlatformDialogHelper (DialogType type) const
 
virtual QPlatformSystemTrayIconcreatePlatformSystemTrayIcon () const
 Factory function for QSystemTrayIcon.
 
virtual Qt::ColorScheme colorScheme () const
 
virtual const QPalettepalette (Palette type=SystemPalette) const
 
virtual const QFontfont (Font type=SystemFont) const
 
virtual QVariant themeHint (ThemeHint hint) const
 
virtual QPixmap standardPixmap (StandardPixmap sp, const QSizeF &size) const
 
virtual QIcon fileIcon (const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions={ }) const
 Return an icon for fileInfo, observing iconOptions.
 
virtual QIconEnginecreateIconEngine (const QString &iconName) const
 Factory function for the QIconEngine used by QIcon::fromTheme().
 
virtual QString standardButtonText (int button) const
 Returns the text of a standard button.
 
QString name () const
 

Static Public Member Functions

static QVariant defaultThemeHint (ThemeHint hint)
 
static QString defaultStandardButtonText (int button)
 
static QString removeMnemonics (const QString &original)
 

Protected Member Functions

 QPlatformTheme (QPlatformThemePrivate *priv)
 

Protected Attributes

QScopedPointer< QPlatformThemePrivated_ptr
 

Friends

class QPlatformThemeFactory
 

Detailed Description

The QPlatformTheme class allows customizing the UI based on themes.

Since
5.0

\preliminary

See the init_platform function in qguiapplication.cpp for the complete platform initialization process.

Definition at line 42 of file qplatformtheme.h.

Member Enumeration Documentation

◆ DialogType

Enumerator
FileDialog 
ColorDialog 
FontDialog 
MessageDialog 

Definition at line 103 of file qplatformtheme.h.

◆ Font

Enumerator
SystemFont 
MenuFont 
MenuBarFont 
MenuItemFont 
MessageBoxFont 
LabelFont 
TipLabelFont 
StatusBarFont 
TitleBarFont 
MdiSubWindowTitleFont 
DockWidgetTitleFont 
PushButtonFont 
CheckBoxFont 
RadioButtonFont 
ToolButtonFont 
ItemViewFont 
ListViewFont 
HeaderViewFont 
ListBoxFont 
ComboMenuItemFont 
ComboLineEditFont 
SmallFont 
MiniFont 
FixedFont 
GroupBoxTitleFont 
TabButtonFont 
EditorFont 
NFonts 

Definition at line 134 of file qplatformtheme.h.

◆ IconOption

Enumerator
DontUseCustomDirectoryIcons 

Definition at line 277 of file qplatformtheme.h.

◆ KeyboardSchemes

Enumerator
WindowsKeyboardScheme 
MacKeyboardScheme 
X11KeyboardScheme 
KdeKeyboardScheme 
GnomeKeyboardScheme 
CdeKeyboardScheme 

Definition at line 253 of file qplatformtheme.h.

◆ Palette

Enumerator
SystemPalette 
ToolTipPalette 
ToolButtonPalette 
ButtonPalette 
CheckBoxPalette 
RadioButtonPalette 
HeaderPalette 
ComboBoxPalette 
ItemViewPalette 
MessageBoxLabelPelette 
MessageBoxLabelPalette 
TabBarPalette 
LabelPalette 
GroupBoxPalette 
MenuPalette 
MenuBarPalette 
TextEditPalette 
TextLineEditPalette 
NPalettes 

Definition at line 111 of file qplatformtheme.h.

◆ StandardPixmap

Enumerator
TitleBarMenuButton 
TitleBarMinButton 
TitleBarMaxButton 
TitleBarCloseButton 
TitleBarNormalButton 
TitleBarShadeButton 
TitleBarUnshadeButton 
TitleBarContextHelpButton 
DockWidgetCloseButton 
MessageBoxInformation 
MessageBoxWarning 
MessageBoxCritical 
MessageBoxQuestion 
DesktopIcon 
TrashIcon 
ComputerIcon 
DriveFDIcon 
DriveHDIcon 
DriveCDIcon 
DriveDVDIcon 
DriveNetIcon 
DirOpenIcon 
DirClosedIcon 
DirLinkIcon 
DirLinkOpenIcon 
FileIcon 
FileLinkIcon 
ToolBarHorizontalExtensionButton 
ToolBarVerticalExtensionButton 
FileDialogStart 
FileDialogEnd 
FileDialogToParent 
FileDialogNewFolder 
FileDialogDetailedView 
FileDialogInfoView 
FileDialogContentsView 
FileDialogListView 
FileDialogBack 
DirIcon 
DialogOkButton 
DialogCancelButton 
DialogHelpButton 
DialogOpenButton 
DialogSaveButton 
DialogCloseButton 
DialogApplyButton 
DialogResetButton 
DialogDiscardButton 
DialogYesButton 
DialogNoButton 
ArrowUp 
ArrowDown 
ArrowLeft 
ArrowRight 
ArrowBack 
ArrowForward 
DirHomeIcon 
CommandLink 
VistaShield 
BrowserReload 
BrowserStop 
MediaPlay 
MediaStop 
MediaPause 
MediaSkipForward 
MediaSkipBackward 
MediaSeekForward 
MediaSeekBackward 
MediaVolume 
MediaVolumeMuted 
LineEditClearButton 
DialogYesToAllButton 
DialogNoToAllButton 
DialogSaveAllButton 
DialogAbortButton 
DialogRetryButton 
DialogIgnoreButton 
RestoreDefaultsButton 
TabCloseButton 
NStandardPixmap 
CustomBase 

Definition at line 166 of file qplatformtheme.h.

◆ ThemeHint

This enum describes the available theme hints.

\value CursorFlashTime (int) Cursor flash time in ms, overriding QPlatformIntegration::styleHint.

\value KeyboardInputInterval (int) Keyboard input interval in ms, overriding QPlatformIntegration::styleHint.

\value MouseDoubleClickInterval (int) Mouse double click interval in ms, overriding QPlatformIntegration::styleHint.

\value MouseDoubleClickDistance (int) The maximum distance in logical pixels which the mouse can travel between clicks in order for the click sequence to be handled as a double click. The default value is 5 logical pixels.

\value MousePressAndHoldInterval (int) Mouse press and hold interval in ms, overriding QPlatformIntegration::styleHint.

\value StartDragDistance (int) Start drag distance, overriding QPlatformIntegration::styleHint.

\value StartDragTime (int) Start drag time in ms, overriding QPlatformIntegration::styleHint.

\value WheelScrollLines (int) The number of lines to scroll a widget, when the mouse wheel is rotated. The default value is 3.

See also
QApplication::wheelScrollLines()

\value KeyboardAutoRepeatRate (int) Keyboard auto repeat rate, overriding QPlatformIntegration::styleHint.

\value PasswordMaskDelay (int) Pass word mask delay in ms, overriding QPlatformIntegration::styleHint.

\value StartDragVelocity (int) Velocity of a drag, overriding QPlatformIntegration::styleHint.

\value TextCursorWidth (int) Determines the width of the text cursor.

\value DropShadow (bool) Determines whether the drop shadow effect for tooltips or whatsthis is enabled.

\value MaximumScrollBarDragDistance (int) Determines the value returned by QStyle::pixelMetric(PM_MaximumDragDistance)

\value ToolButtonStyle (int) A value representing a Qt::ToolButtonStyle.

\value ToolBarIconSize Icon size for tool bars.

\value SystemIconThemeName (QString) Name of the icon theme.

\value SystemIconFallbackThemeName (QString) Name of the fallback icon theme.

\value IconThemeSearchPaths (QStringList) Search paths for icons.

\value ItemViewActivateItemOnSingleClick (bool) Activate items by single click.

\value StyleNames (QStringList) A list of preferred style names.

\value WindowAutoPlacement (bool) A boolean value indicating whether Windows (particularly dialogs) are placed by the system (see _NET_WM_FULL_PLACEMENT in X11).

\value DialogButtonBoxLayout (int) An integer representing a QDialogButtonBox::ButtonLayout value.

\value DialogButtonBoxButtonsHaveIcons (bool) A boolean value indicating whether the buttons of a QDialogButtonBox should have icons.

\value UseFullScreenForPopupMenu (bool) Pop menus can cover the full screen including task bar.

\value KeyboardScheme (int) An integer value (enum KeyboardSchemes) specifying the keyboard scheme.

\value UiEffects (int) A flag value consisting of UiEffect values specifying the enabled UI animations.

\value SpellCheckUnderlineStyle (int) A QTextCharFormat::UnderlineStyle specifying the underline style used misspelled words when spell checking.

\value TabFocusBehavior (int) A Qt::TabFocusBehavior specifying the behavior of focus change when tab key was pressed. This enum value was added in Qt 5.5.

\value DialogSnapToDefaultButton (bool) Whether the mouse should snap to the default button when a dialog becomes visible.

\value ContextMenuOnMouseRelease (bool) Whether the context menu should be shown on mouse release.

\value TouchDoubleTapDistance (int) The maximum distance in logical pixels which a touchpoint can travel between taps in order for the tap sequence to be handled as a double tap. The default value is double the MouseDoubleClickDistance, or 10 logical pixels if that is not specified.

\value ShowShortcutsInContextMenus (bool) Whether to display shortcut key sequences in context menus.

\value InteractiveResizeAcrossScreens (bool) Whether using the whole virtual geometry of all the screens as basis for the resize. This enum value has been added in Qt 6.2.

\value ShowDirectoriesFirst (bool) Whether directories should be shown first (before files) in file dialogs. This enum value was added in Qt 6.3.

\value PreselectFirstFileInDirectory (bool) Whether the first file in a directory should be automatically selected when a file dialog opens. This enum value was added in Qt 6.3.

\value ButtonPressKeys (QList<Qt::Key>) A list of keys that can be used to press buttons via keyboard input.

\value SetFocusOnTouchRelease (bool) Whether focus objects (line edits etc) should receive input focus after a touch/mouse release. This enum value has been added in Qt 6.5.

\value MouseCursorTheme (QString) Name of the mouse cursor theme. This enum value has been added in Qt 6.5.

\value MouseCursorSize (QSize) Size of the mouse cursor. This enum value has been added in Qt 6.5.

See also
themeHint(), QStyle::pixelMetric()
Enumerator
CursorFlashTime 
KeyboardInputInterval 
MouseDoubleClickInterval 
StartDragDistance 
StartDragTime 
KeyboardAutoRepeatRate 
PasswordMaskDelay 
StartDragVelocity 
TextCursorWidth 
DropShadow 
MaximumScrollBarDragDistance 
ToolButtonStyle 
ToolBarIconSize 
ItemViewActivateItemOnSingleClick 
SystemIconThemeName 
SystemIconFallbackThemeName 
IconThemeSearchPaths 
StyleNames 
WindowAutoPlacement 
DialogButtonBoxLayout 
DialogButtonBoxButtonsHaveIcons 
UseFullScreenForPopupMenu 
KeyboardScheme 
UiEffects 
SpellCheckUnderlineStyle 
TabFocusBehavior 
IconPixmapSizes 
PasswordMaskCharacter 
DialogSnapToDefaultButton 
ContextMenuOnMouseRelease 
MousePressAndHoldInterval 
MouseDoubleClickDistance 
WheelScrollLines 
TouchDoubleTapDistance 
ShowShortcutsInContextMenus 
IconFallbackSearchPaths 
MouseQuickSelectionThreshold 
InteractiveResizeAcrossScreens 
ShowDirectoriesFirst 
PreselectFirstFileInDirectory 
ButtonPressKeys 
SetFocusOnTouchRelease 
FlickStartDistance 
FlickMaximumVelocity 
FlickDeceleration 
MenuBarFocusOnAltPressRelease 
MouseCursorTheme 
MouseCursorSize 
UnderlineShortcut 

Definition at line 50 of file qplatformtheme.h.

◆ UiEffect

Enumerator
GeneralUiEffect 
AnimateMenuUiEffect 
FadeMenuUiEffect 
AnimateComboUiEffect 
AnimateTooltipUiEffect 
FadeTooltipUiEffect 
AnimateToolBoxUiEffect 
HoverEffect 

Definition at line 264 of file qplatformtheme.h.

Constructor & Destructor Documentation

◆ QPlatformTheme() [1/2]

QPlatformTheme::QPlatformTheme ( )
explicit

Definition at line 418 of file qplatformtheme.cpp.

Referenced by QXdgDesktopPortalTheme::QXdgDesktopPortalTheme().

+ Here is the caller graph for this function:

◆ ~QPlatformTheme()

QPlatformTheme::~QPlatformTheme ( )
virtual

Definition at line 428 of file qplatformtheme.cpp.

◆ QPlatformTheme() [2/2]

QPlatformTheme::QPlatformTheme ( QPlatformThemePrivate * priv)
explicitprotected

Definition at line 424 of file qplatformtheme.cpp.

Member Function Documentation

◆ colorScheme()

Qt::ColorScheme QPlatformTheme::colorScheme ( ) const
virtual

◆ createIconEngine()

QIconEngine * QPlatformTheme::createIconEngine ( const QString & iconName) const
virtual

Factory function for the QIconEngine used by QIcon::fromTheme().

By default this function returns a QIconLoaderEngine, but subclasses can reimplement it to provide their own.

It is especially useful to benefit from some platform specific facilities or optimizations like an inter-process cache in systems mostly built with Qt.

Since
5.1

Reimplemented in QAndroidPlatformTheme, QCocoaTheme, QIOSTheme, QWindowsTheme, and QXdgDesktopPortalTheme.

Definition at line 691 of file qplatformtheme.cpp.

◆ createPlatformDialogHelper()

QPlatformDialogHelper * QPlatformTheme::createPlatformDialogHelper ( DialogType type) const
virtual

Reimplemented in QCocoaTheme, QAndroidPlatformTheme, QIOSTheme, QWindowsTheme, QGtk3Theme, and QXdgDesktopPortalTheme.

Definition at line 439 of file qplatformtheme.cpp.

References Q_UNUSED.

◆ createPlatformMenu()

QPlatformMenu * QPlatformTheme::createPlatformMenu ( ) const
virtual

◆ createPlatformMenuBar()

QPlatformMenuBar * QPlatformTheme::createPlatformMenuBar ( ) const
virtual

◆ createPlatformMenuItem()

QPlatformMenuItem * QPlatformTheme::createPlatformMenuItem ( ) const
virtual

◆ createPlatformSystemTrayIcon()

QPlatformSystemTrayIcon * QPlatformTheme::createPlatformSystemTrayIcon ( ) const
virtual

Factory function for QSystemTrayIcon.

This function will return 0 if the platform integration does not support creating any system tray icon.

Reimplemented in QGenericUnixTheme, QGnomeTheme, QCocoaTheme, and QXdgDesktopPortalTheme.

Definition at line 675 of file qplatformtheme.cpp.

◆ defaultStandardButtonText()

QString QPlatformTheme::defaultStandardButtonText ( int button)
static

◆ defaultThemeHint()

QVariant QPlatformTheme::defaultThemeHint ( ThemeHint hint)
static

Definition at line 541 of file qplatformtheme.cpp.

References ButtonPressKeys, ContextMenuOnMouseRelease, CursorFlashTime, defaultThemeHint(), DialogButtonBoxButtonsHaveIcons, DialogButtonBoxLayout, DialogSnapToDefaultButton, dist(), DropShadow, FlickDeceleration, FlickMaximumVelocity, FlickStartDistance, QVariant::fromValue(), hint(), IconFallbackSearchPaths, IconPixmapSizes, IconThemeSearchPaths, InteractiveResizeAcrossScreens, ItemViewActivateItemOnSingleClick, Qt::Key_Select, Qt::Key_Space, KeyboardAutoRepeatRate, KeyboardInputInterval, KeyboardScheme, MaximumScrollBarDragDistance, MenuBarFocusOnAltPressRelease, MouseCursorSize, MouseCursorTheme, MouseDoubleClickDistance, MouseDoubleClickInterval, MousePressAndHoldInterval, MouseQuickSelectionThreshold, ok, PasswordMaskCharacter, PasswordMaskDelay, PreselectFirstFileInDirectory, qEnvironmentVariableIntValue(), SetFocusOnTouchRelease, ShowDirectoriesFirst, ShowShortcutsInContextMenus, SpellCheckUnderlineStyle, StartDragDistance, StartDragTime, StartDragVelocity, StyleNames, SystemIconFallbackThemeName, SystemIconThemeName, Qt::TabFocusAllControls, TabFocusBehavior, TextCursorWidth, ToolBarIconSize, Qt::ToolButtonIconOnly, ToolButtonStyle, TouchDoubleTapDistance, UiEffects, UnderlineShortcut, UseFullScreenForPopupMenu, QTextCharFormat::WaveUnderline, WheelScrollLines, WindowAutoPlacement, and WindowsKeyboardScheme.

Referenced by defaultThemeHint(), QPlatformIntegration::styleHint(), QCommonStyle::styleHint(), QQC2::QCommonStyle::styleHint(), themeableHint(), and themeHint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileIcon()

QIcon QPlatformTheme::fileIcon ( const QFileInfo & fileInfo,
QPlatformTheme::IconOptions iconOptions = { } ) const
virtual

Return an icon for fileInfo, observing iconOptions.

This function is queried by QFileIconProvider and similar classes to obtain an icon for a file. If it does not return a non-null icon, fileIconPixmap() is queried for a specific size.

Since
5.8

Reimplemented in QGtk3Theme, QXdgDesktopPortalTheme, QWindowsTheme, QCocoaTheme, and QGnomeTheme.

Definition at line 485 of file qplatformtheme.cpp.

References Q_UNUSED.

◆ font()

const QFont * QPlatformTheme::font ( Font type = SystemFont) const
virtual

Reimplemented in QGenericUnixTheme, QGnomeTheme, QWasmTheme, QAndroidPlatformTheme, QCocoaTheme, QIOSTheme, OffscreenTheme, QWindowsTheme, QGtk3Theme, and QXdgDesktopPortalTheme.

Definition at line 461 of file qplatformtheme.cpp.

References Q_UNUSED.

Referenced by QtWaylandClient::QWaylandAdwaitaDecoration::QWaylandAdwaitaDecoration(), and QApplicationPrivate::initializeWidgetFontHash().

+ Here is the caller graph for this function:

◆ name()

QString QPlatformTheme::name ( ) const

Definition at line 869 of file qplatformtheme.cpp.

Referenced by Q_GLOBAL_STATIC_WITH_ARGS().

+ Here is the caller graph for this function:

◆ palette()

const QPalette * QPlatformTheme::palette ( Palette type = SystemPalette) const
virtual

Reimplemented in QAndroidPlatformTheme, QCocoaTheme, QIOSTheme, QWindowsTheme, QGtk3Theme, and QXdgDesktopPortalTheme.

Definition at line 450 of file qplatformtheme.cpp.

References d, d_ptr, QPlatformThemePrivate::initializeSystemPalette(), and SystemPalette.

+ Here is the call graph for this function:

◆ Q_ENUM()

QPlatformTheme::Q_ENUM ( DialogType )

◆ removeMnemonics()

QString QPlatformTheme::removeMnemonics ( const QString & original)
static

Definition at line 817 of file qplatformtheme.cpp.

References QString::endsWith(), QString::first(), QString::front(), QString::isEmpty(), Q_ASSERT, QString::size(), QString::sliced(), QString::startsWith(), text, and QString::truncate().

Referenced by QQuickDialogButtonBoxPrivate::buttonText(), qt_mac_removeAmpersandEscapes(), QIOSMenuItem::setText(), QCocoaMessageDialog::show(), strippedText(), QCocoaMenuItem::sync(), and QTornOffMenu::updateWindowTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPlatformMenuBar()

virtual void QPlatformTheme::showPlatformMenuBar ( )
inlinevirtual

Reimplemented in QAndroidPlatformTheme, QWindowsTheme, and QXdgDesktopPortalTheme.

Definition at line 288 of file qplatformtheme.h.

◆ standardButtonText()

QString QPlatformTheme::standardButtonText ( int button) const
virtual

Returns the text of a standard button.

Since
5.3
See also
QPlatformDialogHelper::StandardButton

Reimplemented in QGnomeTheme, QAndroidPlatformTheme, QCocoaTheme, and QXdgDesktopPortalTheme.

Definition at line 752 of file qplatformtheme.cpp.

References button, and defaultStandardButtonText().

Referenced by QGnomeTheme::standardButtonText(), QAndroidPlatformTheme::standardButtonText(), and QCocoaTheme::standardButtonText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ standardPixmap()

QPixmap QPlatformTheme::standardPixmap ( StandardPixmap sp,
const QSizeF & size ) const
virtual

Reimplemented in QCocoaTheme, QWindowsTheme, QGtk3Theme, and QXdgDesktopPortalTheme.

Definition at line 467 of file qplatformtheme.cpp.

References Q_UNUSED, and sp.

Referenced by QCocoaTheme::standardPixmap(), and QWindowsTheme::standardPixmap().

+ Here is the caller graph for this function:

◆ themeHint()

QVariant QPlatformTheme::themeHint ( ThemeHint hint) const
virtual

Reimplemented in OffscreenTheme, QGenericUnixTheme, QGnomeTheme, QAndroidPlatformTheme, QCocoaTheme, QIOSTheme, QWasmTheme, QGtk3Theme, QXdgDesktopPortalTheme, and QWindowsTheme.

Definition at line 493 of file qplatformtheme.cpp.

References QPlatformIntegration::CursorFlashTime, CursorFlashTime, defaultThemeHint(), QPlatformIntegration::FlickDeceleration, FlickDeceleration, QPlatformIntegration::FlickMaximumVelocity, FlickMaximumVelocity, QPlatformIntegration::FlickStartDistance, FlickStartDistance, hint(), QPlatformIntegration::ItemViewActivateItemOnSingleClick, ItemViewActivateItemOnSingleClick, QPlatformIntegration::KeyboardAutoRepeatRate, KeyboardAutoRepeatRate, QPlatformIntegration::KeyboardInputInterval, KeyboardInputInterval, QPlatformIntegration::MouseDoubleClickInterval, MouseDoubleClickInterval, QPlatformIntegration::MousePressAndHoldInterval, MousePressAndHoldInterval, QPlatformIntegration::PasswordMaskCharacter, PasswordMaskCharacter, QPlatformIntegration::PasswordMaskDelay, PasswordMaskDelay, QGuiApplicationPrivate::platformIntegration(), QPlatformIntegration::SetFocusOnTouchRelease, SetFocusOnTouchRelease, QPlatformIntegration::ShowShortcutsInContextMenus, ShowShortcutsInContextMenus, QPlatformIntegration::StartDragDistance, StartDragDistance, QPlatformIntegration::StartDragTime, StartDragTime, QPlatformIntegration::StartDragVelocity, StartDragVelocity, QPlatformIntegration::UiEffects, UiEffects, QPlatformIntegration::UnderlineShortcut, and UnderlineShortcut.

Referenced by drawTextItemDecoration(), QDialogPrivate::setVisible(), QCommonStyle::styleHint(), QQC2::QCommonStyle::styleHint(), OffscreenTheme::themeHint(), QGenericUnixTheme::themeHint(), QGnomeTheme::themeHint(), QAndroidPlatformTheme::themeHint(), QCocoaTheme::themeHint(), QIOSTheme::themeHint(), QWasmTheme::themeHint(), and QWindowsTheme::themeHint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usePlatformNativeDialog()

bool QPlatformTheme::usePlatformNativeDialog ( DialogType type) const
virtual

Reimplemented in QCocoaTheme, QAndroidPlatformTheme, QIOSTheme, QWindowsTheme, QGtk3Theme, and QXdgDesktopPortalTheme.

Definition at line 433 of file qplatformtheme.cpp.

References Q_UNUSED.

Friends And Related Symbol Documentation

◆ QPlatformThemeFactory

friend class QPlatformThemeFactory
friend

Definition at line 329 of file qplatformtheme.h.

Member Data Documentation

◆ d_ptr

QScopedPointer<QPlatformThemePrivate> QPlatformTheme::d_ptr
protected

Definition at line 326 of file qplatformtheme.h.

Referenced by palette().


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