Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktextedit_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | class QQuickTextDocument; | - |
5 | class QQuickTextEditPrivate; | - |
6 | class QTextBlock; | - |
7 | - | |
8 | class __attribute__((visibility("default"))) QQuickTextEdit : public QQuickImplicitSizeItem | - |
9 | { | - |
10 | public: | - |
11 | #pragma GCC diagnostic push | - |
12 | - | |
13 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
14 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
15 | #pragma GCC diagnostic ignored "-Wattributes" | - |
16 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
17 | #pragma GCC diagnostic pop | - |
18 | struct QPrivateSignal {}; | - |
19 | - | |
20 | - | |
21 | - | |
22 | - | |
23 | - | |
24 | - | |
25 | - | |
26 | - | |
27 | - | |
28 | - | |
29 | - | |
30 | - | |
31 | - | |
32 | - | |
33 | - | |
34 | - | |
35 | - | |
36 | - | |
37 | - | |
38 | - | |
39 | - | |
40 | - | |
41 | - | |
42 | - | |
43 | - | |
44 | - | |
45 | - | |
46 | - | |
47 | - | |
48 | - | |
49 | - | |
50 | - | |
51 | - | |
52 | - | |
53 | - | |
54 | - | |
55 | - | |
56 | - | |
57 | - | |
58 | - | |
59 | - | |
60 | - | |
61 | - | |
62 | - | |
63 | - | |
64 | - | |
65 | - | |
66 | - | |
67 | - | |
68 | public: | - |
69 | QQuickTextEdit(QQuickItem *parent=nullptr); | - |
70 | - | |
71 | enum HAlignment { | - |
72 | AlignLeft = Qt::AlignLeft, | - |
73 | AlignRight = Qt::AlignRight, | - |
74 | AlignHCenter = Qt::AlignHCenter, | - |
75 | AlignJustify = Qt::AlignJustify | - |
76 | }; | - |
77 | friend constexpr const QMetaObject *qt_getEnumMetaObject(HAlignment) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(HAlignment) noexcept { return "HAlignment"; } | - |
78 | - | |
79 | enum VAlignment { | - |
80 | AlignTop = Qt::AlignTop, | - |
81 | AlignBottom = Qt::AlignBottom, | - |
82 | AlignVCenter = Qt::AlignVCenter | - |
83 | }; | - |
84 | friend constexpr const QMetaObject *qt_getEnumMetaObject(VAlignment) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(VAlignment) noexcept { return "VAlignment"; } | - |
85 | - | |
86 | enum TextFormat { | - |
87 | PlainText = Qt::PlainText, | - |
88 | RichText = Qt::RichText, | - |
89 | AutoText = Qt::AutoText | - |
90 | }; | - |
91 | friend constexpr const QMetaObject *qt_getEnumMetaObject(TextFormat) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(TextFormat) noexcept { return "TextFormat"; } | - |
92 | - | |
93 | enum WrapMode { NoWrap = QTextOption::NoWrap, | - |
94 | WordWrap = QTextOption::WordWrap, | - |
95 | WrapAnywhere = QTextOption::WrapAnywhere, | - |
96 | WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, | - |
97 | Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere | - |
98 | }; | - |
99 | friend constexpr const QMetaObject *qt_getEnumMetaObject(WrapMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(WrapMode) noexcept { return "WrapMode"; } | - |
100 | - | |
101 | enum SelectionMode { | - |
102 | SelectCharacters, | - |
103 | SelectWords | - |
104 | }; | - |
105 | friend constexpr const QMetaObject *qt_getEnumMetaObject(SelectionMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(SelectionMode) noexcept { return "SelectionMode"; } | - |
106 | - | |
107 | enum RenderType { QtRendering, | - |
108 | NativeRendering | - |
109 | }; | - |
110 | friend constexpr const QMetaObject *qt_getEnumMetaObject(RenderType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(RenderType) noexcept { return "RenderType"; } | - |
111 | - | |
112 | QString text() const; | - |
113 | void setText(const QString &); | - |
114 | - | |
115 | QString preeditText() const; | - |
116 | - | |
117 | TextFormat textFormat() const; | - |
118 | void setTextFormat(TextFormat format); | - |
119 | - | |
120 | QFont font() const; | - |
121 | void setFont(const QFont &font); | - |
122 | - | |
123 | QColor color() const; | - |
124 | void setColor(const QColor &c); | - |
125 | - | |
126 | QColor selectionColor() const; | - |
127 | void setSelectionColor(const QColor &c); | - |
128 | - | |
129 | QColor selectedTextColor() const; | - |
130 | void setSelectedTextColor(const QColor &c); | - |
131 | - | |
132 | HAlignment hAlign() const; | - |
133 | void setHAlign(HAlignment align); | - |
134 | void resetHAlign(); | - |
135 | HAlignment effectiveHAlign() const; | - |
136 | - | |
137 | VAlignment vAlign() const; | - |
138 | void setVAlign(VAlignment align); | - |
139 | - | |
140 | WrapMode wrapMode() const; | - |
141 | void setWrapMode(WrapMode w); | - |
142 | - | |
143 | int lineCount() const; | - |
144 | - | |
145 | int length() const; | - |
146 | - | |
147 | bool isCursorVisible() const; | - |
148 | void setCursorVisible(bool on); | - |
149 | - | |
150 | int cursorPosition() const; | - |
151 | void setCursorPosition(int pos); | - |
152 | - | |
153 | QQmlComponent* cursorDelegate() const; | - |
154 | void setCursorDelegate(QQmlComponent*); | - |
155 | - | |
156 | bool overwriteMode() const; | - |
157 | void setOverwriteMode(bool overwrite); | - |
158 | - | |
159 | int selectionStart() const; | - |
160 | int selectionEnd() const; | - |
161 | - | |
162 | QString selectedText() const; | - |
163 | - | |
164 | bool focusOnPress() const; | - |
165 | void setFocusOnPress(bool on); | - |
166 | - | |
167 | bool persistentSelection() const; | - |
168 | void setPersistentSelection(bool on); | - |
169 | - | |
170 | qreal textMargin() const; | - |
171 | void setTextMargin(qreal margin); | - |
172 | - | |
173 | Qt::InputMethodHints inputMethodHints() const; | - |
174 | void setInputMethodHints(Qt::InputMethodHints hints); | - |
175 | - | |
176 | bool selectByKeyboard() const; | - |
177 | void setSelectByKeyboard(bool); | - |
178 | - | |
179 | bool selectByMouse() const; | - |
180 | void setSelectByMouse(bool); | - |
181 | - | |
182 | SelectionMode mouseSelectionMode() const; | - |
183 | void setMouseSelectionMode(SelectionMode mode); | - |
184 | - | |
185 | bool canPaste() const; | - |
186 | - | |
187 | bool canUndo() const; | - |
188 | bool canRedo() const; | - |
189 | - | |
190 | void componentComplete() override; | - |
191 | - | |
192 | - | |
193 | void setReadOnly(bool); | - |
194 | bool isReadOnly() const; | - |
195 | - | |
196 | QRectF cursorRectangle() const; | - |
197 | - | |
198 | - | |
199 | QVariant inputMethodQuery(Qt::InputMethodQuery property) const override; | - |
200 | QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; | - |
201 | - | |
202 | - | |
203 | qreal contentWidth() const; | - |
204 | qreal contentHeight() const; | - |
205 | - | |
206 | QUrl baseUrl() const; | - |
207 | void setBaseUrl(const QUrl &url); | - |
208 | void resetBaseUrl(); | - |
209 | - | |
210 | QRectF positionToRectangle(int) const; | - |
211 | int positionAt(qreal x, qreal y) const; | - |
212 | void moveCursorSelection(int pos); | - |
213 | void moveCursorSelection(int pos, SelectionMode mode); | - |
214 | - | |
215 | QRectF boundingRect() const override; | - |
216 | QRectF clipRect() const override; | - |
217 | - | |
218 | bool isInputMethodComposing() const; | - |
219 | - | |
220 | RenderType renderType() const; | - |
221 | void setRenderType(RenderType renderType); | - |
222 | - | |
223 | QString getText(int start, int end) const; | - |
224 | QString getFormattedText(int start, int end) const; | - |
225 | - | |
226 | QQuickTextDocument *textDocument(); | - |
227 | - | |
228 | QString hoveredLink() const; | - |
229 | - | |
230 | QString linkAt(qreal x, qreal y) const; | - |
231 | - | |
232 | qreal padding() const; | - |
233 | void setPadding(qreal padding); | - |
234 | void resetPadding(); | - |
235 | - | |
236 | qreal topPadding() const; | - |
237 | void setTopPadding(qreal padding); | - |
238 | void resetTopPadding(); | - |
239 | - | |
240 | qreal leftPadding() const; | - |
241 | void setLeftPadding(qreal padding); | - |
242 | void resetLeftPadding(); | - |
243 | - | |
244 | qreal rightPadding() const; | - |
245 | void setRightPadding(qreal padding); | - |
246 | void resetRightPadding(); | - |
247 | - | |
248 | qreal bottomPadding() const; | - |
249 | void setBottomPadding(qreal padding); | - |
250 | void resetBottomPadding(); | - |
251 | - | |
252 | int tabStopDistance() const; | - |
253 | void setTabStopDistance(qreal distance); | - |
254 | - | |
255 | public : | - |
256 | void textChanged(); | - |
257 | void preeditTextChanged(); | - |
258 | void contentSizeChanged(); | - |
259 | void cursorPositionChanged(); | - |
260 | void cursorRectangleChanged(); | - |
261 | void selectionStartChanged(); | - |
262 | void selectionEndChanged(); | - |
263 | void selectedTextChanged(); | - |
264 | void colorChanged(const QColor &color); | - |
265 | void selectionColorChanged(const QColor &color); | - |
266 | void selectedTextColorChanged(const QColor &color); | - |
267 | void fontChanged(const QFont &font); | - |
268 | void horizontalAlignmentChanged(QQuickTextEdit::HAlignment alignment); | - |
269 | void verticalAlignmentChanged(QQuickTextEdit::VAlignment alignment); | - |
270 | void wrapModeChanged(); | - |
271 | void lineCountChanged(); | - |
272 | void textFormatChanged(QQuickTextEdit::TextFormat textFormat); | - |
273 | void readOnlyChanged(bool isReadOnly); | - |
274 | void cursorVisibleChanged(bool isCursorVisible); | - |
275 | void cursorDelegateChanged(); | - |
276 | void overwriteModeChanged(bool overwriteMode); | - |
277 | void activeFocusOnPressChanged(bool activeFocusOnPressed); | - |
278 | void persistentSelectionChanged(bool isPersistentSelection); | - |
279 | void textMarginChanged(qreal textMargin); | - |
280 | void selectByKeyboardChanged(bool selectByKeyboard); | - |
281 | void selectByMouseChanged(bool selectByMouse); | - |
282 | void mouseSelectionModeChanged(QQuickTextEdit::SelectionMode mode); | - |
283 | void linkActivated(const QString &link); | - |
284 | void linkHovered(const QString &link); | - |
285 | void canPasteChanged(); | - |
286 | void canUndoChanged(); | - |
287 | void canRedoChanged(); | - |
288 | void inputMethodComposingChanged(); | - |
289 | void effectiveHorizontalAlignmentChanged(); | - |
290 | void baseUrlChanged(); | - |
291 | void inputMethodHintsChanged(); | - |
292 | void renderTypeChanged(); | - |
293 | void editingFinished(); | - |
294 | void paddingChanged(); | - |
295 | void topPaddingChanged(); | - |
296 | void leftPaddingChanged(); | - |
297 | void rightPaddingChanged(); | - |
298 | void bottomPaddingChanged(); | - |
299 | void tabStopDistanceChanged(qreal distance); | - |
300 | - | |
301 | public : | - |
302 | void selectAll(); | - |
303 | void selectWord(); | - |
304 | void select(int start, int end); | - |
305 | void deselect(); | - |
306 | bool isRightToLeft(int start, int end); | - |
307 | - | |
308 | void cut(); | - |
309 | void copy(); | - |
310 | void paste(); | - |
311 | - | |
312 | void undo(); | - |
313 | void redo(); | - |
314 | void insert(int position, const QString &text); | - |
315 | void remove(int start, int end); | - |
316 | void append(const QString &text); | - |
317 | void clear(); | - |
318 | - | |
319 | private : | - |
320 | void q_textChanged(); | - |
321 | void q_contentsChange(int, int, int); | - |
322 | void updateSelection(); | - |
323 | void moveCursorDelegate(); | - |
324 | void createCursor(); | - |
325 | void q_canPasteChanged(); | - |
326 | void updateWholeDocument(); | - |
327 | void invalidateBlock(const QTextBlock &block); | - |
328 | void updateCursor(); | - |
329 | void q_updateAlignment(); | - |
330 | void updateSize(); | - |
331 | void triggerPreprocess(); | - |
332 | - | |
333 | private: | - |
334 | void markDirtyNodesForRange(int start, int end, int charDelta); | - |
335 | void updateTotalLines(); | - |
336 | void invalidateFontCaches(); | - |
337 | - | |
338 | protected: | - |
339 | QQuickTextEdit(QQuickTextEditPrivate &dd, QQuickItem *parent = nullptr); | - |
340 | - | |
341 | void geometryChanged(const QRectF &newGeometry, | - |
342 | const QRectF &oldGeometry) override; | - |
343 | - | |
344 | bool event(QEvent *) override; | - |
345 | void keyPressEvent(QKeyEvent *) override; | - |
346 | void keyReleaseEvent(QKeyEvent *) override; | - |
347 | void focusInEvent(QFocusEvent *event) override; | - |
348 | void focusOutEvent(QFocusEvent *event) override; | - |
349 | - | |
350 | void hoverEnterEvent(QHoverEvent *event) override; | - |
351 | void hoverMoveEvent(QHoverEvent *event) override; | - |
352 | void hoverLeaveEvent(QHoverEvent *event) override; | - |
353 | - | |
354 | - | |
355 | void mousePressEvent(QMouseEvent *event) override; | - |
356 | void mouseReleaseEvent(QMouseEvent *event) override; | - |
357 | void mouseDoubleClickEvent(QMouseEvent *event) override; | - |
358 | void mouseMoveEvent(QMouseEvent *event) override; | - |
359 | - | |
360 | void inputMethodEvent(QInputMethodEvent *e) override; | - |
361 | - | |
362 | QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override; | - |
363 | void updatePolish() override; | - |
364 | - | |
365 | friend class QQuickTextUtil; | - |
366 | friend class QQuickTextDocument; | - |
367 | - | |
368 | private: | - |
369 | QQuickTextEdit(const QQuickTextEdit &) = delete; QQuickTextEdit &operator=(const QQuickTextEdit &) = delete; | - |
370 | inline QQuickTextEditPrivate* d_func() { return executed 72500 times by 6 tests: reinterpret_cast<QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 72500 times by 6 tests: } inline const QQuickTextEditPrivate* d_func() const { returnreturn reinterpret_cast<QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 87092 times by 6 tests: reinterpret_cast<const QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 87092 times by 6 tests: } friend class QQuickTextEditPrivate;return reinterpret_cast<const QQuickTextEditPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
| 72500-87092 |
371 | }; | - |
372 | - | |
373 | - | |
374 | - | |
375 | template <> struct QMetaTypeId< QQuickTextEdit * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQuickTextEdit * >("QQuickTextEdit *", reinterpret_cast< QQuickTextEdit * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickTextEdit> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListProperty<QQuickTextEdit> >("QQmlListProperty<QQuickTextEdit>", reinterpret_cast< QQmlListProperty<QQuickTextEdit> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
Switch to Source code | Preprocessed file |