Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QGenericUnixTheme Class Reference

#include <qgenericunixthemes_p.h>

+ Inheritance diagram for QGenericUnixTheme:
+ Collaboration diagram for QGenericUnixTheme:

Public Member Functions

 QGenericUnixTheme ()
 
const QFontfont (Font type) const override
 
QVariant themeHint (ThemeHint hint) const override
 
QPlatformMenuBarcreatePlatformMenuBar () const override
 
QPlatformSystemTrayIconcreatePlatformSystemTrayIcon () const override
 Factory function for QSystemTrayIcon.
 
- Public Member Functions inherited from QPlatformTheme
 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 QPlatformThemecreateUnixTheme (const QString &name)
 Creates a UNIX theme according to the detected desktop environment.
 
static QStringList themeNames ()
 
static QStringList xdgIconThemePaths ()
 
static QStringList iconFallbackPaths ()
 
- Static Public Member Functions inherited from QPlatformTheme
static QVariant defaultThemeHint (ThemeHint hint)
 
static QString defaultStandardButtonText (int button)
 
static QString removeMnemonics (const QString &original)
 

Static Public Attributes

static const char * name = "generic"
 

Additional Inherited Members

- 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
}
 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 }
 
- Protected Member Functions inherited from QPlatformTheme
 QPlatformTheme (QPlatformThemePrivate *priv)
 
- Protected Attributes inherited from QPlatformTheme
QScopedPointer< QPlatformThemePrivated_ptr
 

Detailed Description

Definition at line 40 of file qgenericunixthemes_p.h.

Constructor & Destructor Documentation

◆ QGenericUnixTheme()

QGenericUnixTheme::QGenericUnixTheme ( )

Definition at line 424 of file qgenericunixthemes.cpp.

Referenced by createUnixTheme().

+ Here is the caller graph for this function:

Member Function Documentation

◆ createPlatformMenuBar()

QPlatformMenuBar * QGenericUnixTheme::createPlatformMenuBar ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 469 of file qgenericunixthemes.cpp.

References isDBusGlobalMenuAvailable().

+ Here is the call graph for this function:

◆ createPlatformSystemTrayIcon()

QPlatformSystemTrayIcon * QGenericUnixTheme::createPlatformSystemTrayIcon ( ) const
overridevirtual

Factory function for QSystemTrayIcon.

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

Reimplemented from QPlatformTheme.

Definition at line 478 of file qgenericunixthemes.cpp.

References isDBusTrayAvailable().

+ Here is the call graph for this function:

◆ createUnixTheme()

QPlatformTheme * QGenericUnixTheme::createUnixTheme ( const QString name)
static

Creates a UNIX theme according to the detected desktop environment.

Definition at line 1299 of file qgenericunixthemes.cpp.

References QGenericUnixTheme(), name, and QGnomeTheme::name.

Referenced by QEglFSIntegration::createPlatformTheme(), QVkKhrDisplayIntegration::createPlatformTheme(), QXcbIntegration::createPlatformTheme(), and QtWaylandClient::QWaylandIntegration::createPlatformTheme().

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

◆ font()

const QFont * QGenericUnixTheme::font ( Font  type) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 429 of file qgenericunixthemes.cpp.

References d, QPlatformTheme::FixedFont, and QPlatformTheme::SystemFont.

◆ iconFallbackPaths()

QStringList QGenericUnixTheme::iconFallbackPaths ( )
static

Definition at line 458 of file qgenericunixthemes.cpp.

References QFileInfo::absoluteFilePath(), QFileInfo::isDir(), and QStringLiteral.

Referenced by themeHint().

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

◆ themeHint()

◆ themeNames()

QStringList QGenericUnixTheme::themeNames ( )
static

Definition at line 1313 of file qgenericunixthemes.cpp.

References QListSpecialMethodsBase< T >::contains(), QPlatformServices::desktopEnvironment(), QGuiApplication::desktopSettingsAware(), QString::fromLatin1(), name, QGnomeTheme::name, QGuiApplicationPrivate::platformIntegration(), QList< T >::push_back(), QStringLiteral, QPlatformIntegration::services(), and QByteArray::split().

Referenced by QXcbIntegration::themeNames(), and QtWaylandClient::QWaylandIntegration::themeNames().

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

◆ xdgIconThemePaths()

QStringList QGenericUnixTheme::xdgIconThemePaths ( )
static

Definition at line 443 of file qgenericunixthemes.cpp.

References QFileInfo::absoluteFilePath(), QStandardPaths::GenericDataLocation, QDir::homePath(), QFileInfo::isDir(), QStandardPaths::locateAll(), QStandardPaths::LocateDirectory, and QStringLiteral.

Referenced by themeHint(), and QGnomeTheme::themeHint().

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

Member Data Documentation

◆ name

const char * QGenericUnixTheme::name = "generic"
static

Definition at line 61 of file qgenericunixthemes_p.h.

Referenced by createUnixTheme(), and themeNames().


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