OpenCoverage

qquicktext_p_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktext_p_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QTextLayout;-
6class QQuickTextDocumentWithImageResources;-
7-
8class __attribute__((visibility("default"))) QQuickTextPrivate : public QQuickImplicitSizeItemPrivate-
9{-
10 inline QQuickText* q_func() { return static_cast<QQuickText *>(q_ptr); } inline const QQuickText* q_func() const { return static_cast<const QQuickText *>(q_ptr); } friend class QQuickText;-
11public:-
12 QQuickTextPrivate();-
13 ~QQuickTextPrivate();-
14 void init();-
15-
16 void updateBaseline(qreal baseline, qreal dy);-
17 void updateSize();-
18 void updateLayout();-
19 bool determineHorizontalAlignment();-
20 bool setHAlign(QQuickText::HAlignment, bool forceAlign = false);-
21 void mirrorChange() override;-
22 bool isLineLaidOutConnected();-
23 void setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height);-
24-
25 int lineHeightOffset() const;-
26 QString elidedText(qreal lineWidth, const QTextLine &line, QTextLine *nextLine = nullptr) const;-
27 void elideFormats(int start, int length, int offset, QVector<QTextLayout::FormatRange> *elidedFormats);-
28 void clearFormats();-
29-
30 void processHoverEvent(QHoverEvent *event);-
31-
32 QRectF layedOutTextRect;-
33 QSizeF advance;-
34-
35 struct ExtraData {-
36 ExtraData();-
37-
38 qreal padding;-
39 qreal topPadding;-
40 qreal leftPadding;-
41 qreal rightPadding;-
42 qreal bottomPadding;-
43 bool explicitTopPadding : 1;-
44 bool explicitLeftPadding : 1;-
45 bool explicitRightPadding : 1;-
46 bool explicitBottomPadding : 1;-
47 qreal lineHeight;-
48 QQuickTextDocumentWithImageResources *doc;-
49 QString activeLink;-
50 QString hoveredLink;-
51 int minimumPixelSize;-
52 int minimumPointSize;-
53 int nbActiveDownloads;-
54 int maximumLineCount;-
55 bool lineHeightValid : 1;-
56 QQuickText::LineHeightMode lineHeightMode;-
57 QQuickText::FontSizeMode fontSizeMode;-
58 QList<QQuickStyledTextImgTag*> imgTags;-
59 QList<QQuickStyledTextImgTag*> visibleImgTags;-
60 QUrl baseUrl;-
61 };-
62 QLazilyAllocated<ExtraData> extra;-
63-
64 QString text;-
65 QFont font;-
66 QFont sourceFont;-
67 QFontInfo fontInfo;-
68-
69 QTextLayout layout;-
70 QTextLayout *elideLayout;-
71 QQuickTextLine *textLine;-
72-
73 qreal lineWidth;-
74-
75 QRgb color;-
76 QRgb linkColor;-
77 QRgb styleColor;-
78-
79 int lineCount;-
80 int multilengthEos;-
81-
82 enum UpdateType {-
83 UpdateNone,-
84 UpdatePreprocess,-
85 UpdatePaintNode-
86 };-
87-
88 QQuickText::TextElideMode elideMode;-
89 QQuickText::HAlignment hAlign;-
90 QQuickText::VAlignment vAlign;-
91 QQuickText::TextFormat format;-
92 QQuickText::WrapMode wrapMode;-
93 QQuickText::TextStyle style;-
94 QQuickText::RenderType renderType;-
95 UpdateType updateType;-
96-
97 QString assignedFont;-
98-
99 bool maximumLineCountValid:1;-
100 bool updateOnComponentComplete:1;-
101 bool richText:1;-
102 bool styledText:1;-
103 bool widthExceeded:1;-
104 bool heightExceeded:1;-
105 bool internalWidthUpdate:1;-
106 bool requireImplicitSize:1;-
107 bool implicitWidthValid:1;-
108 bool implicitHeightValid:1;-
109 bool truncated:1;-
110 bool hAlignImplicit:1;-
111 bool rightToLeftText:1;-
112 bool layoutTextElided:1;-
113 bool textHasChanged:1;-
114 bool needToUpdateLayout:1;-
115 bool formatModifiesFontSize:1;-
116 bool polishSize:1;-
117 bool updateSizeRecursionGuard:1;-
118-
119 static const QChar elideChar;-
120-
121 qreal getImplicitWidth() const override;-
122 qreal getImplicitHeight() const override;-
123-
124 qreal availableWidth() const;-
125 qreal availableHeight() const;-
126-
127 inline qreal padding() const { return
executed 8953785 times by 35 tests: return extra.isAllocated() ? extra->padding : 0.0;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
extra.isAllocated() ? extra->padding : 0.0;
executed 8953785 times by 35 tests: return extra.isAllocated() ? extra->padding : 0.0;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
}
8953785
128 void setTopPadding(qreal value, bool reset = false);-
129 void setLeftPadding(qreal value, bool reset = false);-
130 void setRightPadding(qreal value, bool reset = false);-
131 void setBottomPadding(qreal value, bool reset = false);-
132-
133 void ensureDoc();-
134-
135 QRectF setupTextLayout(qreal * const baseline);-
136 void setupCustomLineGeometry(QTextLine &line, qreal &height, int lineOffset = 0);-
137 bool isLinkActivatedConnected();-
138 bool isLinkHoveredConnected();-
139 static QString anchorAt(const QTextLayout *layout, const QPointF &mousePos);-
140 QString anchorAt(const QPointF &pos) const;-
141-
142 inline qreal lineHeight() const { return
executed 731283 times by 35 tests: return extra.isAllocated() ? extra->lineHeight : 1.0;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
extra.isAllocated() ? extra->lineHeight : 1.0;
executed 731283 times by 35 tests: return extra.isAllocated() ? extra->lineHeight : 1.0;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
}
731283
143 inline int maximumLineCount() const { return
executed 426216 times by 33 tests: return extra.isAllocated() ? extra->maximumLineCount : 0x7fffffff;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
extra.isAllocated() ? extra->maximumLineCount : 0x7fffffff;
executed 426216 times by 33 tests: return extra.isAllocated() ? extra->maximumLineCount : 0x7fffffff;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpincharea
  • tst_qquickpositioners
  • ...
}
426216
144 inline QQuickText::LineHeightMode lineHeightMode() const { return
executed 730939 times by 35 tests: return extra.isAllocated() ? extra->lineHeightMode : QQuickText::ProportionalHeight;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
extra.isAllocated() ? extra->lineHeightMode : QQuickText::ProportionalHeight;
executed 730939 times by 35 tests: return extra.isAllocated() ? extra->lineHeightMode : QQuickText::ProportionalHeight;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
}
730939
145 inline QQuickText::FontSizeMode fontSizeMode() const { return
executed 2941837 times by 35 tests: return extra.isAllocated() ? extra->fontSizeMode : QQuickText::FixedSize;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
extra.isAllocated() ? extra->fontSizeMode : QQuickText::FixedSize;
executed 2941837 times by 35 tests: return extra.isAllocated() ? extra->fontSizeMode : QQuickText::FixedSize;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanchors
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
}
2941837
146 inline int minimumPixelSize() const { return
executed 290 times by 2 tests: return extra.isAllocated() ? extra->minimumPixelSize : 12;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
extra.isAllocated() ? extra->minimumPixelSize : 12;
executed 290 times by 2 tests: return extra.isAllocated() ? extra->minimumPixelSize : 12;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
}
290
147 inline int minimumPointSize() const { return
executed 48 times by 2 tests: return extra.isAllocated() ? extra->minimumPointSize : 12;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
extra.isAllocated() ? extra->minimumPointSize : 12;
executed 48 times by 2 tests: return extra.isAllocated() ? extra->minimumPointSize : 12;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquicktext
}
48
148 static inline QQuickTextPrivate *get(QQuickText *t) { return
executed 66 times by 1 test: return t->d_func();
Executed by:
  • tst_qquicktext
t->d_func();
executed 66 times by 1 test: return t->d_func();
Executed by:
  • tst_qquicktext
}
66
149};-
150-
151-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0