Coverage Report

Created: 2026-03-12 07:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/gui/kernel/qstylehints.h
Line
Count
Source
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#ifndef QSTYLEHINTS_H
6
#define QSTYLEHINTS_H
7
8
#include <QtGui/qtguiglobal.h>
9
#include <QtCore/qobject.h>
10
11
QT_BEGIN_NAMESPACE
12
13
class QPlatformIntegration;
14
class QStyleHintsPrivate;
15
class QAccessibilityHints;
16
17
class Q_GUI_EXPORT QStyleHints : public QObject
18
{
19
0
    Q_OBJECT
20
0
    Q_DECLARE_PRIVATE(QStyleHints)
21
0
    Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL)
22
0
    Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL)
23
0
#if QT_DEPRECATED_SINCE(6, 5)
24
0
    Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL)
25
0
#endif
26
0
    Q_PROPERTY(qreal keyboardAutoRepeatRateF READ keyboardAutoRepeatRateF STORED false CONSTANT FINAL)
27
0
    Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval
28
0
               NOTIFY keyboardInputIntervalChanged FINAL)
29
0
    Q_PROPERTY(int mouseDoubleClickInterval READ mouseDoubleClickInterval
30
0
               NOTIFY mouseDoubleClickIntervalChanged FINAL)
31
0
    Q_PROPERTY(int mousePressAndHoldInterval READ mousePressAndHoldInterval
32
0
               NOTIFY mousePressAndHoldIntervalChanged FINAL)
33
0
    Q_PROPERTY(QChar passwordMaskCharacter READ passwordMaskCharacter STORED false CONSTANT FINAL)
34
0
    Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL)
35
0
    Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
36
0
    Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
37
0
    Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL)
38
0
    Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus
39
0
               WRITE setShowShortcutsInContextMenus NOTIFY showShortcutsInContextMenusChanged FINAL)
40
0
    Q_PROPERTY(Qt::ContextMenuTrigger contextMenuTrigger READ contextMenuTrigger WRITE
41
0
                   setContextMenuTrigger NOTIFY contextMenuTriggerChanged FINAL)
42
0
    Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
43
0
    Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
44
0
    Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
45
0
    Q_PROPERTY(bool useRtlExtensions READ useRtlExtensions STORED false CONSTANT FINAL)
46
0
    Q_PROPERTY(Qt::TabFocusBehavior tabFocusBehavior READ tabFocusBehavior
47
0
               NOTIFY tabFocusBehaviorChanged FINAL)
48
0
    Q_PROPERTY(bool singleClickActivation READ singleClickActivation STORED false CONSTANT FINAL)
49
0
    Q_PROPERTY(bool useHoverEffects READ useHoverEffects WRITE setUseHoverEffects
50
0
               NOTIFY useHoverEffectsChanged FINAL)
51
0
    Q_PROPERTY(int wheelScrollLines READ wheelScrollLines NOTIFY wheelScrollLinesChanged FINAL)
52
0
    Q_PROPERTY(int mouseQuickSelectionThreshold READ mouseQuickSelectionThreshold
53
0
               WRITE setMouseQuickSelectionThreshold NOTIFY mouseQuickSelectionThresholdChanged
54
0
               FINAL)
55
0
    Q_PROPERTY(int mouseDoubleClickDistance READ mouseDoubleClickDistance STORED false CONSTANT
56
0
               FINAL)
57
0
    Q_PROPERTY(int touchDoubleTapDistance READ touchDoubleTapDistance STORED false CONSTANT FINAL)
58
0
    Q_PROPERTY(Qt::ColorScheme colorScheme READ colorScheme WRITE setColorScheme
59
0
               RESET unsetColorScheme NOTIFY colorSchemeChanged FINAL)
60
0
    Q_PROPERTY(bool menuSelectionWraps READ menuSelectionWraps STORED false CONSTANT FINAL REVISION(6, 10))
61
0
    Q_PROPERTY(const QAccessibilityHints* accessibility READ accessibility CONSTANT FINAL REVISION(6, 10))
62
0
    Q_PROPERTY(int toolTipWakeUpDelay READ toolTipWakeUpDelay WRITE setToolTipWakeUpDelay
63
0
        NOTIFY toolTipWakeUpDelayChanged FINAL REVISION(6, 12))
64
0
65
0
public:
66
0
    void setMouseDoubleClickInterval(int mouseDoubleClickInterval);
67
0
    int mouseDoubleClickInterval() const;
68
0
    int mouseDoubleClickDistance() const;
69
0
    int touchDoubleTapDistance() const;
70
0
    void setMousePressAndHoldInterval(int mousePressAndHoldInterval);
71
0
    int mousePressAndHoldInterval() const;
72
0
    void setStartDragDistance(int startDragDistance);
73
0
    int startDragDistance() const;
74
0
    void setStartDragTime(int startDragTime);
75
0
    int startDragTime() const;
76
0
    int startDragVelocity() const;
77
0
    void setKeyboardInputInterval(int keyboardInputInterval);
78
0
    int keyboardInputInterval() const;
79
0
#if QT_DEPRECATED_SINCE(6, 5)
80
0
    QT_DEPRECATED_VERSION_X_6_5("Use keyboardAutoRepeatRateF() instead")
81
0
    int keyboardAutoRepeatRate() const;
82
0
#endif
83
0
    qreal keyboardAutoRepeatRateF() const;
84
0
    void setCursorFlashTime(int cursorFlashTime);
85
0
    int cursorFlashTime() const;
86
0
    bool showIsFullScreen() const;
87
0
    bool showIsMaximized() const;
88
0
    bool showShortcutsInContextMenus() const;
89
0
    void setShowShortcutsInContextMenus(bool showShortcutsInContextMenus);
90
0
    Qt::ContextMenuTrigger contextMenuTrigger() const;
91
0
    void setContextMenuTrigger(Qt::ContextMenuTrigger contextMenuTrigger);
92
0
    bool menuSelectionWraps() const;
93
0
    int passwordMaskDelay() const;
94
0
    QChar passwordMaskCharacter() const;
95
0
    qreal fontSmoothingGamma() const;
96
0
    bool useRtlExtensions() const;
97
0
    bool setFocusOnTouchRelease() const;
98
0
    Qt::TabFocusBehavior tabFocusBehavior() const;
99
0
    void setTabFocusBehavior(Qt::TabFocusBehavior tabFocusBehavior);
100
0
    bool singleClickActivation() const;
101
0
    bool useHoverEffects() const;
102
0
    void setUseHoverEffects(bool useHoverEffects);
103
0
    int wheelScrollLines() const;
104
0
    void setWheelScrollLines(int scrollLines);
105
0
    void setMouseQuickSelectionThreshold(int threshold);
106
0
    int mouseQuickSelectionThreshold() const;
107
0
    Qt::ColorScheme colorScheme() const;
108
0
    void setColorScheme(Qt::ColorScheme scheme);
109
0
    void unsetColorScheme() { setColorScheme(Qt::ColorScheme::Unknown); }
110
    const QAccessibilityHints* accessibility() const;
111
    int toolTipWakeUpDelay() const;
112
    void setToolTipWakeUpDelay(int toolTipWakeUpDelay);
113
114
Q_SIGNALS:
115
    void cursorFlashTimeChanged(int cursorFlashTime);
116
    void keyboardInputIntervalChanged(int keyboardInputInterval);
117
    void mouseDoubleClickIntervalChanged(int mouseDoubleClickInterval);
118
    void mousePressAndHoldIntervalChanged(int mousePressAndHoldInterval);
119
    void startDragDistanceChanged(int startDragDistance);
120
    void startDragTimeChanged(int startDragTime);
121
    void tabFocusBehaviorChanged(Qt::TabFocusBehavior tabFocusBehavior);
122
    void useHoverEffectsChanged(bool useHoverEffects);
123
    void showShortcutsInContextMenusChanged(bool);
124
    void contextMenuTriggerChanged(Qt::ContextMenuTrigger contextMenuTrigger);
125
    void wheelScrollLinesChanged(int scrollLines);
126
    void mouseQuickSelectionThresholdChanged(int threshold);
127
    void colorSchemeChanged(Qt::ColorScheme colorScheme);
128
    Q_REVISION(6, 12) void toolTipWakeUpDelayChanged(int toolTipWakeUpDelay);
129
130
private:
131
    friend class QGuiApplication;
132
    QStyleHints();
133
};
134
135
QT_END_NAMESPACE
136
137
#endif