Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
const QPalettepalette (Palette type=SystemPalette) const override
 
const QFontfont (Font type=SystemFont) const override
 
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
 
- 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 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
}
 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 30 of file qandroidplatformtheme.h.

Constructor & Destructor Documentation

◆ ~QAndroidPlatformTheme()

QAndroidPlatformTheme::~QAndroidPlatformTheme ( )

Definition at line 331 of file qandroidplatformtheme.cpp.

Member Function Documentation

◆ colorScheme()

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

Reimplemented from QPlatformTheme.

Definition at line 421 of file qandroidplatformtheme.cpp.

References QAndroidPlatformIntegration::colorScheme().

Referenced by updateStyle().

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

◆ createPlatformDialogHelper()

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

Reimplemented from QPlatformTheme.

Definition at line 554 of file qandroidplatformtheme.cpp.

References QPlatformTheme::FileDialog, and QPlatformTheme::MessageDialog.

◆ createPlatformMenu()

QPlatformMenu * QAndroidPlatformTheme::createPlatformMenu ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 406 of file qandroidplatformtheme.cpp.

◆ createPlatformMenuBar()

QPlatformMenuBar * QAndroidPlatformTheme::createPlatformMenuBar ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 401 of file qandroidplatformtheme.cpp.

◆ createPlatformMenuItem()

QPlatformMenuItem * QAndroidPlatformTheme::createPlatformMenuItem ( ) const
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 411 of file qandroidplatformtheme.cpp.

◆ font()

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

Reimplemented from QPlatformTheme.

Definition at line 478 of file qandroidplatformtheme.cpp.

References fontType(), it, and QPlatformTheme::SystemFont.

+ Here is the call graph for this function:

◆ instance()

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

Definition at line 312 of file qandroidplatformtheme.cpp.

Referenced by QAndroidPlatformIntegration::createPlatformTheme(), and QAndroidPlatformIntegration::setColorScheme().

+ Here is the caller graph for this function:

◆ palette()

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

Reimplemented from QPlatformTheme.

Definition at line 454 of file qandroidplatformtheme.cpp.

References it, and paletteType().

+ Here is the call graph for this function:

◆ showPlatformMenuBar()

void QAndroidPlatformTheme::showPlatformMenuBar ( )
overridevirtual

Reimplemented from QPlatformTheme.

Definition at line 416 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 530 of file qandroidplatformtheme.cpp.

References button, QPlatformDialogHelper::No, QPlatformDialogHelper::NoToAll, QPlatformTheme::standardButtonText(), QCoreApplication::translate(), QPlatformDialogHelper::Yes, and QPlatformDialogHelper::YesToAll.

+ Here is the call graph for this function:

◆ themeHint()

QVariant QAndroidPlatformTheme::themeHint ( ThemeHint  hint) const
overridevirtual

◆ updateColorScheme()

void QAndroidPlatformTheme::updateColorScheme ( )

Definition at line 336 of file qandroidplatformtheme.cpp.

References QWindowSystemInterface::handleThemeChange(), and updateStyle().

Referenced by QAndroidPlatformIntegration::setColorScheme().

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

◆ updateStyle()

void QAndroidPlatformTheme::updateStyle ( )

Definition at line 342 of file qandroidplatformtheme.cpp.

References QPalette::Active, base, QPalette::Base, Qt::black, button, QPalette::Button, QPalette::ButtonText, colorScheme(), Qt::Dark, QPalette::Dark, QColor::darker(), QPalette::Disabled, QPalette::Highlight, QPalette::HighlightedText, QPalette::Inactive, QColor::lighter(), loadAndroidStyle(), QPalette::Midlight, QPalette::setBrush(), QPalette::Shadow, text, QPalette::Text, and QPalette::WindowText.

Referenced by updateColorScheme().

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

◆ usePlatformNativeDialog()

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

Reimplemented from QPlatformTheme.

Definition at line 545 of file qandroidplatformtheme.cpp.

References QPlatformTheme::FileDialog, QPlatformTheme::MessageDialog, and qEnvironmentVariableIntValue().

+ Here is the call graph for this function:

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