CopperSpice API  1.7.2
QPlatformTheme Class Reference

Allows customizing the UI based on themes. More...

Public Types

enum  DialogType
enum  ThemeHint

Public Methods

virtual ~QPlatformTheme ()
virtual QIconEnginecreateIconEngine (const QString &iconName) const
virtual QPlatformDialogHelpercreatePlatformDialogHelper (DialogType type) const
virtual QPlatformMenucreatePlatformMenu () const
virtual QPlatformMenuBarcreatePlatformMenuBar () const
virtual QPlatformMenuItemcreatePlatformMenuItem () const
virtual QPlatformSystemTrayIconcreatePlatformSystemTrayIcon () const
virtual QPixmap fileIconPixmap (const QFileInfo &fileInfo, const QSizeF &size, QPlatformTheme::IconOptions iconOptions=Qt::EmptyFlag) const
virtual const QFontfont (Font type=SystemFont) const
virtual QList< QKeySequencekeyBindings (QKeySequence::StandardKey key) const
virtual const QPalettepalette (Palette type=SystemPalette) const
virtual void showPlatformMenuBar ()
virtual QString standardButtonText (int button) const
virtual QPixmap standardPixmap (StandardPixmap sp, const QSizeF &size) const
virtual QVariant themeHint (ThemeHint hint) const
virtual bool usePlatformNativeDialog (DialogType type) const

Static Public Methods

static QString defaultStandardButtonText (int button)
static QVariant defaultThemeHint (ThemeHint hint)

Detailed Description

The QPlatformTheme class allows customizing the UI based on themes.

Member Enumeration Documentation

FileDialog ColorDialog FontDialog MessageDialog

This enum describes the available theme hints.

QPlatformTheme::CursorFlashTime 0 (int) Cursor flash time in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::KeyboardInputInterval 1 (int) Keyboard input interval in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::MouseDoubleClickInterval 2 (int) Mouse double click interval in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::MouseDoubleClickDistance 31 (int) 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, default value is 5 logical pixels
QPlatformTheme::MousePressAndHoldInterval 30 (int) Mouse press and hold interval in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::StartDragDistance 3 Start drag distance, overriding QPlatformIntegration::styleHint
QPlatformTheme::StartDragTime 4 (int) Start drag time in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::WheelScrollLines 32 (int) Number of lines to scroll a widget, when the mouse wheel is rotated, default value is 3. Refer to QApplication::wheelScrollLines()
QPlatformTheme::KeyboardAutoRepeatRate 5 (int) Keyboard auto repeat rate, overriding QPlatformIntegration::styleHint
QPlatformTheme::PasswordMaskDelay 6 (int) Pass word mask delay in ms, overriding QPlatformIntegration::styleHint
QPlatformTheme::StartDragVelocity 7 Velocity of a drag, overriding QPlatformIntegration::styleHint
QPlatformTheme::TextCursorWidth 8 (int) Determines the width of the text cursor
QPlatformTheme::DropShadow 9 (bool) Determines whether the drop shadow effect for tooltips or whatsthis is enabled
QPlatformTheme::MaximumScrollBarDragDistance 10 (int) Determines the value returned by QStyle::pixelMetric(PM_MaximumDragDistance)
QPlatformTheme::ToolButtonStyle 11 (int) A value representing a Qt::ToolButtonStyle
QPlatformTheme::ToolBarIconSize 12 Icon size for tool bars
QPlatformTheme::SystemIconThemeName 14 (QString) Name of the icon theme
QPlatformTheme::SystemIconFallbackThemeName 15 (QString) Name of the fallback icon theme
QPlatformTheme::IconThemeSearchPaths 16 (QStringList) Search paths for icons
QPlatformTheme::ItemViewActivateItemOnSingleClick 13 (bool) Activate items by single click
QPlatformTheme::StyleNames 17 QStringList) A list of preferred style names
QPlatformTheme::WindowAutoPlacement 18 (bool) A boolean value indicating whether Windows (particularly dialogs) are placed by the system (see _NET_WM_FULL_PLACEMENT in X11)
QPlatformTheme::DialogButtonBoxLayout 19 (int) An integer representing a QDialogButtonBox::ButtonLayout value
QPlatformTheme::DialogButtonBoxButtonsHaveIcons 20 (bool) A boolean value indicating whether the buttons of a QDialogButtonBox should have icons
QPlatformTheme::UseFullScreenForPopupMenu 21 (bool) Pop menus can cover the full screen including task bar
QPlatformTheme::KeyboardScheme 22 (int) An integer value (enum KeyboardSchemes) specifying the keyboard scheme
QPlatformTheme::UiEffects 23 (int) A flag value consisting of UiEffect values specifying the enabled UI animations
QPlatformTheme::SpellCheckUnderlineStyle 24 (int) A QTextCharFormat::UnderlineStyle specifying the underline style used misspelled words when spell checking
QPlatformTheme::TabFocusBehavior 25 (int) A Qt::TabFocusBehavior specifying the behavior of focus change when tab key was pressed
QPlatformTheme::DialogSnapToDefaultButton 28 (bool) Whether the mouse should snap to the default button when a dialog becomes visible
QPlatformTheme::ContextMenuOnMouseRelease 29 (bool) Whether the context menu should be shown on mouse release
See also
themeHint(), QStyle::pixelMetric()

Constructor & Destructor Documentation

QPlatformTheme::~QPlatformTheme ( )

Documentation pending.

Method Documentation

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

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.

QPlatformDialogHelper * QPlatformTheme::createPlatformDialogHelper ( DialogType  type) const

Documentation pending.

QPlatformMenu * QPlatformTheme::createPlatformMenu ( ) const

Documentation pending.

QPlatformMenuBar * QPlatformTheme::createPlatformMenuBar ( ) const

Documentation pending.

QPlatformMenuItem * QPlatformTheme::createPlatformMenuItem ( ) const

Documentation pending.

QPlatformSystemTrayIcon * QPlatformTheme::createPlatformSystemTrayIcon ( ) const

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

QString QPlatformTheme::defaultStandardButtonText ( int  button)

Documentation pending.

QVariant QPlatformTheme::defaultThemeHint ( ThemeHint  hint)

Documentation pending.

QPixmap QPlatformTheme::fileIconPixmap ( const QFileInfo fileInfo,
const QSizeF size,
QPlatformTheme::IconOptions  iconOptions = Qt::EmptyFlag 
) const

Documentation pending.

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

Documentation pending.

QList< QKeySequence > QPlatformTheme::keyBindings ( QKeySequence::StandardKey  key) const

Returns the key sequence that should be used for a standard action.

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

Documentation pending.

void QPlatformTheme::showPlatformMenuBar ( )

Documentation pending.

QString QPlatformTheme::standardButtonText ( int  button) const

Returns the text of a standard button.

See also
QPixmap QPlatformTheme::standardPixmap ( StandardPixmap  sp,
const QSizeF size 
) const

Documentation pending.

QVariant QPlatformTheme::themeHint ( ThemeHint  hint) const

Documentation pending.

bool QPlatformTheme::usePlatformNativeDialog ( DialogType  type) const

Documentation pending.