1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 The Qt Company Ltd. |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the QtGui module of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:LGPL$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU Lesser General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
21 | ** packaging of this file. Please review the following information to |
22 | ** ensure the GNU Lesser General Public License version 3 requirements |
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
24 | ** |
25 | ** GNU General Public License Usage |
26 | ** Alternatively, this file may be used under the terms of the GNU |
27 | ** General Public License version 2.0 or (at your option) the GNU General |
28 | ** Public license version 3 or any later version approved by the KDE Free |
29 | ** Qt Foundation. The licenses are as published by the Free Software |
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
31 | ** included in the packaging of this file. Please review the following |
32 | ** information to ensure the GNU General Public License requirements will |
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
35 | ** |
36 | ** $QT_END_LICENSE$ |
37 | ** |
38 | ****************************************************************************/ |
39 | |
40 | #ifndef QSTYLEHINTS_H |
41 | #define QSTYLEHINTS_H |
42 | |
43 | #include <QtGui/qtguiglobal.h> |
44 | #include <QtCore/qobject.h> |
45 | |
46 | QT_BEGIN_NAMESPACE |
47 | |
48 | |
49 | class QPlatformIntegration; |
50 | class QStyleHintsPrivate; |
51 | |
52 | class Q_GUI_EXPORT QStyleHints : public QObject |
53 | { |
54 | Q_OBJECT |
55 | Q_DECLARE_PRIVATE(QStyleHints) |
56 | Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL) |
57 | Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL) |
58 | Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL) |
59 | Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval NOTIFY keyboardInputIntervalChanged FINAL) |
60 | Q_PROPERTY(int mouseDoubleClickInterval READ mouseDoubleClickInterval NOTIFY mouseDoubleClickIntervalChanged FINAL) |
61 | Q_PROPERTY(int mousePressAndHoldInterval READ mousePressAndHoldInterval NOTIFY mousePressAndHoldIntervalChanged FINAL) |
62 | Q_PROPERTY(QChar passwordMaskCharacter READ passwordMaskCharacter STORED false CONSTANT FINAL) |
63 | Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL) |
64 | Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL) |
65 | Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL) |
66 | Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL) |
67 | Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus WRITE setShowShortcutsInContextMenus NOTIFY showShortcutsInContextMenusChanged FINAL) |
68 | Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL) |
69 | Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL) |
70 | Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL) |
71 | Q_PROPERTY(bool useRtlExtensions READ useRtlExtensions STORED false CONSTANT FINAL) |
72 | Q_PROPERTY(Qt::TabFocusBehavior tabFocusBehavior READ tabFocusBehavior NOTIFY tabFocusBehaviorChanged FINAL) |
73 | Q_PROPERTY(bool singleClickActivation READ singleClickActivation STORED false CONSTANT FINAL) |
74 | Q_PROPERTY(bool useHoverEffects READ useHoverEffects WRITE setUseHoverEffects NOTIFY useHoverEffectsChanged FINAL) |
75 | Q_PROPERTY(int wheelScrollLines READ wheelScrollLines NOTIFY wheelScrollLinesChanged FINAL) |
76 | Q_PROPERTY(int mouseQuickSelectionThreshold READ mouseQuickSelectionThreshold WRITE setMouseQuickSelectionThreshold NOTIFY mouseQuickSelectionThresholdChanged FINAL) |
77 | Q_PROPERTY(int mouseDoubleClickDistance READ mouseDoubleClickDistance STORED false CONSTANT FINAL) |
78 | Q_PROPERTY(int touchDoubleTapDistance READ touchDoubleTapDistance STORED false CONSTANT FINAL) |
79 | |
80 | public: |
81 | void setMouseDoubleClickInterval(int mouseDoubleClickInterval); |
82 | int mouseDoubleClickInterval() const; |
83 | int mouseDoubleClickDistance() const; |
84 | int touchDoubleTapDistance() const; |
85 | void setMousePressAndHoldInterval(int mousePressAndHoldInterval); |
86 | int mousePressAndHoldInterval() const; |
87 | void setStartDragDistance(int startDragDistance); |
88 | int startDragDistance() const; |
89 | void setStartDragTime(int startDragTime); |
90 | int startDragTime() const; |
91 | int startDragVelocity() const; |
92 | void setKeyboardInputInterval(int keyboardInputInterval); |
93 | int keyboardInputInterval() const; |
94 | int keyboardAutoRepeatRate() const; |
95 | void setCursorFlashTime(int cursorFlashTime); |
96 | int cursorFlashTime() const; |
97 | bool showIsFullScreen() const; |
98 | bool showIsMaximized() const; |
99 | bool () const; |
100 | void (bool ); |
101 | int passwordMaskDelay() const; |
102 | QChar passwordMaskCharacter() const; |
103 | qreal fontSmoothingGamma() const; |
104 | bool useRtlExtensions() const; |
105 | bool setFocusOnTouchRelease() const; |
106 | Qt::TabFocusBehavior tabFocusBehavior() const; |
107 | void setTabFocusBehavior(Qt::TabFocusBehavior tabFocusBehavior); |
108 | bool singleClickActivation() const; |
109 | bool useHoverEffects() const; |
110 | void setUseHoverEffects(bool useHoverEffects); |
111 | int wheelScrollLines() const; |
112 | void setWheelScrollLines(int scrollLines); |
113 | void setMouseQuickSelectionThreshold(int threshold); |
114 | int mouseQuickSelectionThreshold() const; |
115 | |
116 | Q_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 (bool); |
126 | void wheelScrollLinesChanged(int scrollLines); |
127 | void mouseQuickSelectionThresholdChanged(int threshold); |
128 | |
129 | private: |
130 | friend class QGuiApplication; |
131 | QStyleHints(); |
132 | }; |
133 | |
134 | QT_END_NAMESPACE |
135 | |
136 | #endif |
137 | |