CopperSpice API  1.9.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.

ConstantValueDescription
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 toolbars
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 ( )
virtual

Additional documentation pending.

Method Documentation

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

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 CopperSpice.

QPlatformDialogHelper * QPlatformTheme::createPlatformDialogHelper ( DialogType  type) const
virtual

Additional documentation pending.

QPlatformMenu * QPlatformTheme::createPlatformMenu ( ) const
virtual

Additional documentation pending.

QPlatformMenuBar * QPlatformTheme::createPlatformMenuBar ( ) const
virtual

Additional documentation pending.

QPlatformMenuItem * QPlatformTheme::createPlatformMenuItem ( ) const
virtual

Additional documentation pending.

QPlatformSystemTrayIcon * QPlatformTheme::createPlatformSystemTrayIcon ( ) const
virtual

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)
static

Additional documentation pending.

QVariant QPlatformTheme::defaultThemeHint ( ThemeHint  hint)
static

Additional documentation pending.

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

Additional documentation pending.

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

Additional documentation pending.

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

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

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

Additional documentation pending.

void QPlatformTheme::showPlatformMenuBar ( )
inlinevirtual

Additional documentation pending.

QString QPlatformTheme::standardButtonText ( int  button) const
virtual

Returns the text for the given standard button.

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

Additional documentation pending.

QVariant QPlatformTheme::themeHint ( ThemeHint  hint) const
virtual

Additional documentation pending.

bool QPlatformTheme::usePlatformNativeDialog ( DialogType  type) const
virtual

Additional documentation pending.