6#include <qpa/qplatformintegration.h>
7#include <qpa/qplatformtheme.h>
8#include <private/qguiapplication_p.h>
22 qWarning(
"Must construct a QGuiApplication before accessing a platform theme hint.");
26 const QVariant themeHint = theme->themeHint(th);
36 qWarning(
"Must construct a QGuiApplication before accessing a platform theme hint.");
40 const QVariant themeHint = theme->themeHint(th);
63QStyleHints::QStyleHints()
91 return d->m_mouseDoubleClickInterval >= 0 ?
92 d->m_mouseDoubleClickInterval :
105 return d->m_mouseDoubleClickDistance >= 0 ?
106 d->m_mouseDoubleClickDistance :
119 return d->m_touchDoubleTapDistance >= 0 ?
120 d->m_touchDoubleTapDistance :
133 return d->colorScheme();
161 return d->m_mousePressAndHoldInterval >= 0 ?
162 d->m_mousePressAndHoldInterval :
202 return d->m_startDragDistance >= 0 ?
203 d->m_startDragDistance :
236 return d->m_startDragTime >= 0 ?
277 return d->m_keyboardInputInterval >= 0 ?
278 d->m_keyboardInputInterval :
282#if QT_DEPRECATED_SINCE(6, 5)
289int QStyleHints::keyboardAutoRepeatRate()
const
332 return d->m_cursorFlashTime >= 0 ?
333 d->m_cursorFlashTime :
386 return d->m_showShortcutsInContextMenus >= 0
387 ?
d->m_showShortcutsInContextMenus != 0
395 d->m_showShortcutsInContextMenus =
s ? 1 : 0;
468 d->m_tabFocusBehavior :
514 return (
d->m_uiEffects >= 0 ?
524 if (
d->m_uiEffects == -1)
542 if (
d->m_wheelScrollLines > 0)
543 return d->m_wheelScrollLines;
556 if (
d->m_wheelScrollLines == scrollLines)
558 d->m_wheelScrollLines = scrollLines;
571 if (
d->m_mouseQuickSelectionThreshold == threshold)
573 d->m_mouseQuickSelectionThreshold = threshold;
591 if (
d->m_mouseQuickSelectionThreshold >= 0)
592 return d->m_mouseQuickSelectionThreshold;
619#include "moc_qstylehints.cpp"
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
static QPlatformIntegration * platformIntegration()
static QPlatformTheme * platformTheme()
static QStyleHintsPrivate * get(QStyleHints *q)
Qt::ColorScheme colorScheme() const
void setColorScheme(Qt::ColorScheme colorScheme)
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
qreal keyboardAutoRepeatRateF
the rate, in events per second, in which additional repeated key presses will automatically be genera...
void setKeyboardInputInterval(int keyboardInputInterval)
Sets the keyboardInputInterval.
void setWheelScrollLines(int scrollLines)
Sets the wheelScrollLines.
int keyboardInputInterval
the time limit, in milliseconds, that distinguishes a key press from two consecutive key presses.
bool showIsFullScreen
whether the platform defaults to fullscreen windows.
void setTabFocusBehavior(Qt::TabFocusBehavior tabFocusBehavior)
Sets the tabFocusBehavior.
int mouseQuickSelectionThreshold
Quick selection mouse threshold in QLineEdit.
bool showShortcutsInContextMenus
true if the platform normally shows shortcut key sequences in context menus, otherwise false.
void setStartDragDistance(int startDragDistance)
Sets the startDragDistance.
void setUseHoverEffects(bool useHoverEffects)
int startDragTime
the time, in milliseconds, that a mouse button must be held down before a drag and drop operation wil...
int passwordMaskDelay
the time, in milliseconds, a typed letter is displayed unshrouded in a text input field in password m...
bool singleClickActivation
whether items are activated by single or double click.
void mouseQuickSelectionThresholdChanged(int threshold)
void wheelScrollLinesChanged(int scrollLines)
void useHoverEffectsChanged(bool useHoverEffects)
int startDragDistance
the distance, in pixels, that the mouse must be moved with a button held down before a drag and drop ...
bool showIsMaximized
whether the platform defaults to maximized windows.
void cursorFlashTimeChanged(int cursorFlashTime)
int startDragVelocity
the limit for the velocity, in pixels per second, that the mouse may be moved, with a button held dow...
bool setFocusOnTouchRelease
the event that should set input focus on focus objects.
Qt::TabFocusBehavior tabFocusBehavior
The focus behavior on press of the tab key.
Qt::ColorScheme colorScheme
the color scheme of the platform theme.
void setShowShortcutsInContextMenus(bool showShortcutsInContextMenus)
int mousePressAndHoldInterval
the time limit in milliseconds that activates a press and hold.
void setCursorFlashTime(int cursorFlashTime)
Sets the cursorFlashTime.
void keyboardInputIntervalChanged(int keyboardInputInterval)
int mouseDoubleClickInterval
the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks.
int cursorFlashTime
the text cursor's flash (blink) time in milliseconds.
QChar passwordMaskCharacter
the character used to mask the characters typed into text input fields in password mode.
int wheelScrollLines
Number of lines to scroll by default for each wheel click.
void startDragTimeChanged(int startDragTime)
int touchDoubleTapDistance
the maximum distance, in pixels, that a finger can be moved between two consecutive taps and still ha...
void showShortcutsInContextMenusChanged(bool)
bool useHoverEffects
whether UI elements use hover effects.
void setMouseDoubleClickInterval(int mouseDoubleClickInterval)
Sets the mouseDoubleClickInterval.
bool useRtlExtensions
the writing direction.
void mousePressAndHoldIntervalChanged(int mousePressAndHoldInterval)
void startDragDistanceChanged(int startDragDistance)
void mouseDoubleClickIntervalChanged(int mouseDoubleClickInterval)
int mouseDoubleClickDistance
the maximum distance, in pixels, that the mouse can be moved between two consecutive mouse clicks and...
void tabFocusBehaviorChanged(Qt::TabFocusBehavior tabFocusBehavior)
qreal fontSmoothingGamma
the gamma value used in font smoothing.
void setStartDragTime(int startDragTime)
Sets the startDragDragTime.
void setMouseQuickSelectionThreshold(int threshold)
Sets the mouse quick selection threshold.
void setMousePressAndHoldInterval(int mousePressAndHoldInterval)
Sets the mousePressAndHoldInterval.
QChar toChar() const
Returns the variant as a QChar if the variant has userType() \l QMetaType::QChar, \l QMetaType::Int,...
qreal toReal(bool *ok=nullptr) const
Returns the variant as a qreal if the variant has userType() \l QMetaType::Double,...
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat GLfloat h
GLdouble GLdouble GLdouble GLdouble q
static QVariant themeableHint(QPlatformTheme::ThemeHint th, QPlatformIntegration::StyleHint ih)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)