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

#include <qgtk3theme.h>

Inheritance diagram for QGtk3Theme:
Collaboration diagram for QGtk3Theme:

Public Member Functions

 QGtk3Theme ()
virtual QVariant themeHint (ThemeHint hint) const override
virtual QString gtkFontName () const override
Qt::ColorScheme colorScheme () const override
void requestColorScheme (Qt::ColorScheme scheme) override
bool usePlatformNativeDialog (DialogType type) const override
QPlatformDialogHelpercreatePlatformDialogHelper (DialogType type) const override
const QPalettepalette (Palette type=SystemPalette) const override
 Return a color palette for type type.
const QFontfont (Font type=SystemFont) const override
QPixmap standardPixmap (StandardPixmap sp, const QSizeF &size) const override
 Return a pixmap for standardPixmap, at the given size.
QIcon fileIcon (const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions={ }) const override
 Return an icon for fileInfo, observing iconOptions.
Public Member Functions inherited from QGnomeTheme
 QGnomeTheme ()
QString standardButtonText (int button) const override
 Returns the text of a standard button.
Public Member Functions inherited from QGenericUnixTheme
 QGenericUnixTheme ()
Public Member Functions inherited from QPlatformTheme
 QPlatformTheme ()
virtual ~QPlatformTheme ()
virtual QPlatformMenuItemcreatePlatformMenuItem () const
virtual QPlatformMenucreatePlatformMenu () const
virtual QPlatformMenuBarcreatePlatformMenuBar () const
virtual void showPlatformMenuBar ()
virtual QPlatformSystemTrayIconcreatePlatformSystemTrayIcon () const
 Factory function for QSystemTrayIcon.
virtual QIconEnginecreateIconEngine (const QString &iconName) const
 Factory function for the QIconEngine used by QIcon::fromTheme().
virtual Qt::ContrastPreference contrastPreference () const
QString name () const

Static Public Attributes

static const char * name = "gtk3"
Static Public Attributes inherited from QGnomeTheme
static const char * name = "gnome"
Static Public Attributes inherited from QGenericUnixTheme
static const char * name = "generic"
static constexpr char defaultSystemFontNameC [] = "Sans Serif"
static constexpr char defaultFixedFontNameC [] = "monospace"

Additional Inherited Members

Public Types inherited from QGenericUnixTheme
enum  { defaultSystemFontSize = 9 }
Public Types inherited from QPlatformTheme
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 , ShowIconsInMenus , PreferFileIconFromTheme , MenuSelectionWraps ,
  ScrollSingleStepDistance
}
 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 }
Static Public Member Functions inherited from QGenericUnixTheme
static QStringList xdgIconThemePaths ()
static QPlatformThemecreateUnixTheme (const QString &name)
 Creates a UNIX theme according to the given theme name.
static QStringList themeNames ()
Static Public Member Functions inherited from QPlatformTheme
static QVariant defaultThemeHint (ThemeHint hint)
static QString defaultStandardButtonText (int button)
static QString removeMnemonics (const QString &original)
Protected Member Functions inherited from QGenericUnixTheme
 QGenericUnixTheme (QGenericUnixThemePrivate *p)
Protected Member Functions inherited from QPlatformTheme
 QPlatformTheme (QPlatformThemePrivate *priv)
Static Protected Member Functions inherited from QGenericUnixTheme
static QStringList iconFallbackPaths ()
static bool isDBusGlobalMenuAvailable ()
static QString mouseCursorTheme ()
static QSize mouseCursorSize ()
static QList< QSizeavailableXdgFileIconSizes ()
Protected Attributes inherited from QPlatformTheme
QScopedPointer< QPlatformThemePrivated_ptr

Detailed Description

Definition at line 14 of file qgtk3theme.h.

Constructor & Destructor Documentation

◆ QGtk3Theme()

QGtk3Theme::QGtk3Theme ( )

Definition at line 55 of file qgtk3theme.cpp.

Member Function Documentation

◆ colorScheme()

Qt::ColorScheme QGtk3Theme::colorScheme ( ) const
overridevirtual

Reimplemented from QGnomeTheme.

Definition at line 167 of file qgtk3theme.cpp.

◆ createPlatformDialogHelper()

QPlatformDialogHelper * QGtk3Theme::createPlatformDialogHelper ( DialogType type) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 211 of file qgtk3theme.cpp.

◆ fileIcon()

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

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 from QGnomeTheme.

Definition at line 273 of file qgtk3theme.cpp.

◆ font()

const QFont * QGtk3Theme::font ( Font type = SystemFont) const
overridevirtual

Reimplemented from QGnomeTheme.

Definition at line 267 of file qgtk3theme.cpp.

◆ gtkFontName()

QString QGtk3Theme::gtkFontName ( ) const
overridevirtual

Reimplemented from QGnomeTheme.

Definition at line 159 of file qgtk3theme.cpp.

◆ palette()

const QPalette * QGtk3Theme::palette ( Palette type = SystemPalette) const
overridevirtual

Return a color palette for type type.

When relying on system color palette keep in mind that it is lazily initialized and cached. If it needs to be updated (i.e. due to ColorScheme changes), it's up to the caller to take care of it. See requestColorScheme.

Reimplemented from QPlatformTheme.

Definition at line 240 of file qgtk3theme.cpp.

◆ requestColorScheme()

void QGtk3Theme::requestColorScheme ( Qt::ColorScheme scheme)
overridevirtual

Reimplemented from QGnomeTheme.

Definition at line 185 of file qgtk3theme.cpp.

◆ standardPixmap()

QPixmap QGtk3Theme::standardPixmap ( StandardPixmap standardPixmap,
const QSizeF & size ) const
overridevirtual

Return a pixmap for standardPixmap, at the given size.

The implementation should not take system DPR into account, and always return a pixmap with a DPR of 1. It's up to the consumer to account for DPR and request a pixmap of the right size.

Reimplemented from QPlatformTheme.

Definition at line 261 of file qgtk3theme.cpp.

◆ themeHint()

QVariant QGtk3Theme::themeHint ( QPlatformTheme::ThemeHint hint) const
overridevirtual

Reimplemented from QGnomeTheme.

Definition at line 120 of file qgtk3theme.cpp.

◆ usePlatformNativeDialog()

bool QGtk3Theme::usePlatformNativeDialog ( DialogType type) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 197 of file qgtk3theme.cpp.

Member Data Documentation

◆ name

const char * QGtk3Theme::name = "gtk3"
static

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