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

#include <qandroidplatformtheme.h>

Inheritance diagram for QAndroidPlatformTheme:
Collaboration diagram for QAndroidPlatformTheme:

Public Member Functions

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

Static Public Member Functions

static QAndroidPlatformThemeinstance (QAndroidPlatformNativeInterface *androidPlatformNativeInterface=nullptr)
Static Public Member Functions inherited from QPlatformTheme
static QVariant defaultThemeHint (ThemeHint hint)
static QString defaultStandardButtonText (int button)
static QString removeMnemonics (const QString &original)

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

Detailed Description

Definition at line 32 of file qandroidplatformtheme.h.

Constructor & Destructor Documentation

◆ ~QAndroidPlatformTheme()

QAndroidPlatformTheme::~QAndroidPlatformTheme ( )

Definition at line 334 of file qandroidplatformtheme.cpp.

Member Function Documentation

◆ colorScheme()

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

Reimplemented from QPlatformTheme.

Definition at line 431 of file qandroidplatformtheme.cpp.

◆ colorSchemeOverride()

Qt::ColorScheme QAndroidPlatformTheme::colorSchemeOverride ( ) const
inline

Definition at line 43 of file qandroidplatformtheme.h.

◆ contrastPreference()

Qt::ContrastPreference QAndroidPlatformTheme::contrastPreference ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 469 of file qandroidplatformtheme.cpp.

◆ createIconEngine()

QIconEngine * QAndroidPlatformTheme::createIconEngine ( const QString & iconName) const
overridevirtual

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

Definition at line 547 of file qandroidplatformtheme.cpp.

◆ createPlatformDialogHelper()

QPlatformDialogHelper * QAndroidPlatformTheme::createPlatformDialogHelper ( QPlatformTheme::DialogType type) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 634 of file qandroidplatformtheme.cpp.

◆ createPlatformMenu()

QPlatformMenu * QAndroidPlatformTheme::createPlatformMenu ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 411 of file qandroidplatformtheme.cpp.

◆ createPlatformMenuBar()

QPlatformMenuBar * QAndroidPlatformTheme::createPlatformMenuBar ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 404 of file qandroidplatformtheme.cpp.

◆ createPlatformMenuItem()

QPlatformMenuItem * QAndroidPlatformTheme::createPlatformMenuItem ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 418 of file qandroidplatformtheme.cpp.

◆ fileIcon()

QIcon QAndroidPlatformTheme::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 QPlatformTheme.

Definition at line 552 of file qandroidplatformtheme.cpp.

◆ font()

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

Reimplemented from QPlatformTheme.

Definition at line 534 of file qandroidplatformtheme.cpp.

◆ instance()

QAndroidPlatformTheme * QAndroidPlatformTheme::instance ( QAndroidPlatformNativeInterface * androidPlatformNativeInterface = nullptr)
static

Definition at line 315 of file qandroidplatformtheme.cpp.

Referenced by QAndroidPlatformIntegration::createPlatformTheme(), and AndroidStyle::loadStyleData().

Here is the caller graph for this function:

◆ palette()

const QPalette * QAndroidPlatformTheme::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 510 of file qandroidplatformtheme.cpp.

◆ requestColorScheme()

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

Reimplemented from QPlatformTheme.

Definition at line 438 of file qandroidplatformtheme.cpp.

◆ showPlatformMenuBar()

void QAndroidPlatformTheme::showPlatformMenuBar ( )
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 425 of file qandroidplatformtheme.cpp.

References QtAndroidMenu::openOptionsMenu().

Here is the call graph for this function:

◆ standardButtonText()

QString QAndroidPlatformTheme::standardButtonText ( int button) const
overridevirtual

Returns the text of a standard button.

Since
5.3
See also
QPlatformDialogHelper::StandardButton

Reimplemented from QPlatformTheme.

Definition at line 610 of file qandroidplatformtheme.cpp.

◆ themeHint()

QVariant QAndroidPlatformTheme::themeHint ( ThemeHint hint) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 569 of file qandroidplatformtheme.cpp.

References QAndroidPlatformIntegration::screen().

Here is the call graph for this function:

◆ updateColorScheme()

void QAndroidPlatformTheme::updateColorScheme ( )

Definition at line 339 of file qandroidplatformtheme.cpp.

References updateStyle().

Here is the call graph for this function:

◆ updateStyle()

void QAndroidPlatformTheme::updateStyle ( )

Definition at line 345 of file qandroidplatformtheme.cpp.

Referenced by updateColorScheme().

Here is the caller graph for this function:

◆ usePlatformNativeDialog()

bool QAndroidPlatformTheme::usePlatformNativeDialog ( QPlatformTheme::DialogType type) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 625 of file qandroidplatformtheme.cpp.


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