Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstylehints.h
Go to the documentation of this file.
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#include <chrono>
12
13QT_BEGIN_NAMESPACE
14
15class QPlatformIntegration;
17class QAccessibilityHints;
18
19class Q_GUI_EXPORT QStyleHints : public QObject
20{
21 Q_OBJECT
22 Q_DECLARE_PRIVATE(QStyleHints)
23 Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL)
24 Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL)
25#if QT_DEPRECATED_SINCE(6, 5)
26 Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL)
27#endif
28 Q_PROPERTY(qreal keyboardAutoRepeatRateF READ keyboardAutoRepeatRateF STORED false CONSTANT FINAL)
29 Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval
30 NOTIFY keyboardInputIntervalChanged FINAL)
31 Q_PROPERTY(int mouseDoubleClickInterval READ mouseDoubleClickInterval
32 NOTIFY mouseDoubleClickIntervalChanged FINAL)
33 Q_PROPERTY(int mousePressAndHoldInterval READ mousePressAndHoldInterval
34 NOTIFY mousePressAndHoldIntervalChanged FINAL)
35 Q_PROPERTY(QChar passwordMaskCharacter READ passwordMaskCharacter STORED false CONSTANT FINAL)
36 Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL)
37 Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
38 Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
39 Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL)
40 Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus
41 WRITE setShowShortcutsInContextMenus NOTIFY showShortcutsInContextMenusChanged FINAL)
42 Q_PROPERTY(Qt::ContextMenuTrigger contextMenuTrigger READ contextMenuTrigger WRITE
43 setContextMenuTrigger NOTIFY contextMenuTriggerChanged FINAL)
44 Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
45 Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
46 Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
47 Q_PROPERTY(bool useRtlExtensions READ useRtlExtensions STORED false CONSTANT FINAL)
48 Q_PROPERTY(Qt::TabFocusBehavior tabFocusBehavior READ tabFocusBehavior
49 NOTIFY tabFocusBehaviorChanged FINAL)
50 Q_PROPERTY(bool singleClickActivation READ singleClickActivation STORED false CONSTANT FINAL)
51 Q_PROPERTY(bool useHoverEffects READ useHoverEffects WRITE setUseHoverEffects
52 NOTIFY useHoverEffectsChanged FINAL)
53 Q_PROPERTY(int wheelScrollLines READ wheelScrollLines NOTIFY wheelScrollLinesChanged FINAL)
54 Q_PROPERTY(int mouseQuickSelectionThreshold READ mouseQuickSelectionThreshold
55 WRITE setMouseQuickSelectionThreshold NOTIFY mouseQuickSelectionThresholdChanged
56 FINAL)
57 Q_PROPERTY(int mouseDoubleClickDistance READ mouseDoubleClickDistance STORED false CONSTANT
58 FINAL)
59 Q_PROPERTY(int touchDoubleTapDistance READ touchDoubleTapDistance STORED false CONSTANT FINAL)
60 Q_PROPERTY(Qt::ColorScheme colorScheme READ colorScheme WRITE setColorScheme
61 RESET unsetColorScheme NOTIFY colorSchemeChanged FINAL)
62 Q_PROPERTY(bool menuSelectionWraps READ menuSelectionWraps STORED false CONSTANT FINAL REVISION(6, 10))
63 Q_PROPERTY(const QAccessibilityHints* accessibility READ accessibility CONSTANT FINAL REVISION(6, 10))
64 Q_PROPERTY(std::chrono::milliseconds toolTipWakeUpDelay READ toolTipWakeUpDelay
65 WRITE setToolTipWakeUpDelay NOTIFY toolTipWakeUpDelayChanged FINAL REVISION(6, 12))
66
67public:
68 void setMouseDoubleClickInterval(int mouseDoubleClickInterval);
69 int mouseDoubleClickInterval() const;
70 int mouseDoubleClickDistance() const;
71 int touchDoubleTapDistance() const;
72 void setMousePressAndHoldInterval(int mousePressAndHoldInterval);
73 int mousePressAndHoldInterval() const;
74 void setStartDragDistance(int startDragDistance);
75 int startDragDistance() const;
76 void setStartDragTime(int startDragTime);
77 int startDragTime() const;
78 int startDragVelocity() const;
79 void setKeyboardInputInterval(int keyboardInputInterval);
80 int keyboardInputInterval() const;
81#if QT_DEPRECATED_SINCE(6, 5)
82 QT_DEPRECATED_VERSION_X_6_5("Use keyboardAutoRepeatRateF() instead")
83 int keyboardAutoRepeatRate() const;
84#endif
85 qreal keyboardAutoRepeatRateF() const;
86 void setCursorFlashTime(int cursorFlashTime);
87 int cursorFlashTime() const;
88 bool showIsFullScreen() const;
89 bool showIsMaximized() const;
90 bool showShortcutsInContextMenus() const;
91 void setShowShortcutsInContextMenus(bool showShortcutsInContextMenus);
92 Qt::ContextMenuTrigger contextMenuTrigger() const;
93 void setContextMenuTrigger(Qt::ContextMenuTrigger contextMenuTrigger);
94 bool menuSelectionWraps() const;
95 int passwordMaskDelay() const;
96 QChar passwordMaskCharacter() const;
97 qreal fontSmoothingGamma() const;
98 bool useRtlExtensions() const;
99 bool setFocusOnTouchRelease() const;
100 Qt::TabFocusBehavior tabFocusBehavior() const;
101 void setTabFocusBehavior(Qt::TabFocusBehavior tabFocusBehavior);
102 bool singleClickActivation() const;
103 bool useHoverEffects() const;
104 void setUseHoverEffects(bool useHoverEffects);
105 int wheelScrollLines() const;
106 void setWheelScrollLines(int scrollLines);
107 void setMouseQuickSelectionThreshold(int threshold);
108 int mouseQuickSelectionThreshold() const;
109 Qt::ColorScheme colorScheme() const;
110 void setColorScheme(Qt::ColorScheme scheme);
111 void unsetColorScheme() { setColorScheme(Qt::ColorScheme::Unknown); }
112 const QAccessibilityHints* accessibility() const;
113 std::chrono::milliseconds toolTipWakeUpDelay() const;
114 void setToolTipWakeUpDelay(std::chrono::milliseconds toolTipWakeUpDelay);
116Q_SIGNALS:
117 void cursorFlashTimeChanged(int cursorFlashTime);
118 void keyboardInputIntervalChanged(int keyboardInputInterval);
119 void mouseDoubleClickIntervalChanged(int mouseDoubleClickInterval);
120 void mousePressAndHoldIntervalChanged(int mousePressAndHoldInterval);
121 void startDragDistanceChanged(int startDragDistance);
122 void startDragTimeChanged(int startDragTime);
123 void tabFocusBehaviorChanged(Qt::TabFocusBehavior tabFocusBehavior);
124 void useHoverEffectsChanged(bool useHoverEffects);
125 void showShortcutsInContextMenusChanged(bool);
126 void contextMenuTriggerChanged(Qt::ContextMenuTrigger contextMenuTrigger);
127 void wheelScrollLinesChanged(int scrollLines);
128 void mouseQuickSelectionThresholdChanged(int threshold);
129 void colorSchemeChanged(Qt::ColorScheme colorScheme);
130 Q_REVISION(6, 12) void toolTipWakeUpDelayChanged(std::chrono::milliseconds toolTipWakeUpDelay);
131
132private:
133 friend class QGuiApplication;
134 QStyleHints();
135};
136
137QT_END_NAMESPACE
138
139#endif
The QActionGroup class groups actions together.
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:31
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Definition qstylehints.h:20
QT_REQUIRE_CONFIG(action)
Combined button and popup list for selecting options.
#define QAPP_CHECK(functionName)
Definition qaction.cpp:19
static QString qt_strippedText(QString s)
Definition qaction.cpp:32
QT_REQUIRE_CONFIG(animation)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2618