| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktextinput_p.h | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | 
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | class QQuickTextInputPrivate; | - | 
| 5 | class QValidator; | - | 
| 6 | class __attribute__((visibility("default"))) QQuickTextInput : public QQuickImplicitSizeItem | - | 
| 7 | { | - | 
| 8 | public: | - | 
| 9 | #pragma GCC diagnostic push | - | 
| 10 | - | |
| 11 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | 
| 12 | 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: | - | 
| 13 | #pragma GCC diagnostic ignored "-Wattributes" | - | 
| 14 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | 
| 15 | #pragma GCC diagnostic pop | - | 
| 16 | struct QPrivateSignal {}; | - | 
| 17 | - | |
| 18 | - | |
| 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 | - | |
| 69 | public: | - | 
| 70 | QQuickTextInput(QQuickItem * parent=nullptr); | - | 
| 71 | ~QQuickTextInput(); | - | 
| 72 | - | |
| 73 | void componentComplete() override; | - | 
| 74 | - | |
| 75 | enum EchoMode { | - | 
| 76 | Normal, | - | 
| 77 | NoEcho, | - | 
| 78 | Password, | - | 
| 79 | PasswordEchoOnEdit | - | 
| 80 | }; | - | 
| 81 | friend constexpr const QMetaObject *qt_getEnumMetaObject(EchoMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(EchoMode) noexcept { return "EchoMode"; } | - | 
| 82 | - | |
| 83 | enum HAlignment { | - | 
| 84 | AlignLeft = Qt::AlignLeft, | - | 
| 85 | AlignRight = Qt::AlignRight, | - | 
| 86 | AlignHCenter = Qt::AlignHCenter | - | 
| 87 | }; | - | 
| 88 | friend constexpr const QMetaObject *qt_getEnumMetaObject(HAlignment) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(HAlignment) noexcept { return "HAlignment"; } | - | 
| 89 | - | |
| 90 | enum VAlignment { | - | 
| 91 | AlignTop = Qt::AlignTop, | - | 
| 92 | AlignBottom = Qt::AlignBottom, | - | 
| 93 | AlignVCenter = Qt::AlignVCenter | - | 
| 94 | }; | - | 
| 95 | friend constexpr const QMetaObject *qt_getEnumMetaObject(VAlignment) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(VAlignment) noexcept { return "VAlignment"; } | - | 
| 96 | - | |
| 97 | enum WrapMode { | - | 
| 98 | NoWrap = QTextOption::NoWrap, | - | 
| 99 | WordWrap = QTextOption::WordWrap, | - | 
| 100 | WrapAnywhere = QTextOption::WrapAnywhere, | - | 
| 101 | WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, | - | 
| 102 | Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere | - | 
| 103 | }; | - | 
| 104 | friend constexpr const QMetaObject *qt_getEnumMetaObject(WrapMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(WrapMode) noexcept { return "WrapMode"; } | - | 
| 105 | - | |
| 106 | enum SelectionMode { | - | 
| 107 | SelectCharacters, | - | 
| 108 | SelectWords | - | 
| 109 | }; | - | 
| 110 | friend constexpr const QMetaObject *qt_getEnumMetaObject(SelectionMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(SelectionMode) noexcept { return "SelectionMode"; } | - | 
| 111 | - | |
| 112 | enum CursorPosition { | - | 
| 113 | CursorBetweenCharacters, | - | 
| 114 | CursorOnCharacter | - | 
| 115 | }; | - | 
| 116 | friend constexpr const QMetaObject *qt_getEnumMetaObject(CursorPosition) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(CursorPosition) noexcept { return "CursorPosition"; } | - | 
| 117 | - | |
| 118 | enum RenderType { QtRendering, | - | 
| 119 | NativeRendering | - | 
| 120 | }; | - | 
| 121 | friend constexpr const QMetaObject *qt_getEnumMetaObject(RenderType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(RenderType) noexcept { return "RenderType"; } | - | 
| 122 | - | |
| 123 | - | |
| 124 | void positionAt(QQmlV4Function *args) const; | - | 
| 125 | QRectF positionToRectangle(int pos) const; | - | 
| 126 | void moveCursorSelection(int pos); | - | 
| 127 | void moveCursorSelection(int pos, SelectionMode mode); | - | 
| 128 | - | |
| 129 | RenderType renderType() const; | - | 
| 130 | void setRenderType(RenderType renderType); | - | 
| 131 | - | |
| 132 | QString text() const; | - | 
| 133 | void setText(const QString &); | - | 
| 134 | - | |
| 135 | int length() const; | - | 
| 136 | - | |
| 137 | QFont font() const; | - | 
| 138 | void setFont(const QFont &font); | - | 
| 139 | - | |
| 140 | QColor color() const; | - | 
| 141 | void setColor(const QColor &c); | - | 
| 142 | - | |
| 143 | QColor selectionColor() const; | - | 
| 144 | void setSelectionColor(const QColor &c); | - | 
| 145 | - | |
| 146 | QColor selectedTextColor() const; | - | 
| 147 | void setSelectedTextColor(const QColor &c); | - | 
| 148 | - | |
| 149 | HAlignment hAlign() const; | - | 
| 150 | void setHAlign(HAlignment align); | - | 
| 151 | void resetHAlign(); | - | 
| 152 | HAlignment effectiveHAlign() const; | - | 
| 153 | - | |
| 154 | VAlignment vAlign() const; | - | 
| 155 | void setVAlign(VAlignment align); | - | 
| 156 | - | |
| 157 | WrapMode wrapMode() const; | - | 
| 158 | void setWrapMode(WrapMode w); | - | 
| 159 | - | |
| 160 | bool isReadOnly() const; | - | 
| 161 | void setReadOnly(bool); | - | 
| 162 | - | |
| 163 | bool isCursorVisible() const; | - | 
| 164 | void setCursorVisible(bool on); | - | 
| 165 | - | |
| 166 | int cursorPosition() const; | - | 
| 167 | void setCursorPosition(int cp); | - | 
| 168 | - | |
| 169 | QRectF cursorRectangle() const; | - | 
| 170 | - | |
| 171 | int selectionStart() const; | - | 
| 172 | int selectionEnd() const; | - | 
| 173 | - | |
| 174 | QString selectedText() const; | - | 
| 175 | - | |
| 176 | int maxLength() const; | - | 
| 177 | void setMaxLength(int ml); | - | 
| 178 | - | |
| 179 | QValidator * validator() const; | - | 
| 180 | void setValidator(QValidator* v); | - | 
| 181 | - | |
| 182 | QString inputMask() const; | - | 
| 183 | void setInputMask(const QString &im); | - | 
| 184 | - | |
| 185 | EchoMode echoMode() const; | - | 
| 186 | void setEchoMode(EchoMode echo); | - | 
| 187 | - | |
| 188 | QString passwordCharacter() const; | - | 
| 189 | void setPasswordCharacter(const QString &str); | - | 
| 190 | - | |
| 191 | int passwordMaskDelay() const; | - | 
| 192 | void setPasswordMaskDelay(int delay); | - | 
| 193 | void resetPasswordMaskDelay(); | - | 
| 194 | - | |
| 195 | QString displayText() const; | - | 
| 196 | QString preeditText() const; | - | 
| 197 | - | |
| 198 | QQmlComponent* cursorDelegate() const; | - | 
| 199 | void setCursorDelegate(QQmlComponent*); | - | 
| 200 | - | |
| 201 | bool overwriteMode() const; | - | 
| 202 | void setOverwriteMode(bool overwrite); | - | 
| 203 | - | |
| 204 | bool focusOnPress() const; | - | 
| 205 | void setFocusOnPress(bool); | - | 
| 206 | - | |
| 207 | bool autoScroll() const; | - | 
| 208 | void setAutoScroll(bool); | - | 
| 209 | - | |
| 210 | bool selectByMouse() const; | - | 
| 211 | void setSelectByMouse(bool); | - | 
| 212 | - | |
| 213 | SelectionMode mouseSelectionMode() const; | - | 
| 214 | void setMouseSelectionMode(SelectionMode mode); | - | 
| 215 | - | |
| 216 | bool persistentSelection() const; | - | 
| 217 | void setPersistentSelection(bool persist); | - | 
| 218 | - | |
| 219 | bool hasAcceptableInput() const; | - | 
| 220 | - | |
| 221 | - | |
| 222 | QVariant inputMethodQuery(Qt::InputMethodQuery property) const override; | - | 
| 223 | QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; | - | 
| 224 | - | |
| 225 | - | |
| 226 | QRectF boundingRect() const override; | - | 
| 227 | QRectF clipRect() const override; | - | 
| 228 | - | |
| 229 | bool canPaste() const; | - | 
| 230 | - | |
| 231 | bool canUndo() const; | - | 
| 232 | bool canRedo() const; | - | 
| 233 | - | |
| 234 | bool isInputMethodComposing() const; | - | 
| 235 | - | |
| 236 | Qt::InputMethodHints inputMethodHints() const; | - | 
| 237 | void setInputMethodHints(Qt::InputMethodHints hints); | - | 
| 238 | - | |
| 239 | QString getText(int start, int end) const; | - | 
| 240 | - | |
| 241 | qreal contentWidth() const; | - | 
| 242 | qreal contentHeight() const; | - | 
| 243 | - | |
| 244 | qreal padding() const; | - | 
| 245 | void setPadding(qreal padding); | - | 
| 246 | void resetPadding(); | - | 
| 247 | - | |
| 248 | qreal topPadding() const; | - | 
| 249 | void setTopPadding(qreal padding); | - | 
| 250 | void resetTopPadding(); | - | 
| 251 | - | |
| 252 | qreal leftPadding() const; | - | 
| 253 | void setLeftPadding(qreal padding); | - | 
| 254 | void resetLeftPadding(); | - | 
| 255 | - | |
| 256 | qreal rightPadding() const; | - | 
| 257 | void setRightPadding(qreal padding); | - | 
| 258 | void resetRightPadding(); | - | 
| 259 | - | |
| 260 | qreal bottomPadding() const; | - | 
| 261 | void setBottomPadding(qreal padding); | - | 
| 262 | void resetBottomPadding(); | - | 
| 263 | - | |
| 264 | public : | - | 
| 265 | void textChanged(); | - | 
| 266 | void cursorPositionChanged(); | - | 
| 267 | void cursorRectangleChanged(); | - | 
| 268 | void selectionStartChanged(); | - | 
| 269 | void selectionEndChanged(); | - | 
| 270 | void selectedTextChanged(); | - | 
| 271 | void accepted(); | - | 
| 272 | void acceptableInputChanged(); | - | 
| 273 | void editingFinished(); | - | 
| 274 | void textEdited(); | - | 
| 275 | void colorChanged(); | - | 
| 276 | void selectionColorChanged(); | - | 
| 277 | void selectedTextColorChanged(); | - | 
| 278 | void fontChanged(const QFont &font); | - | 
| 279 | void horizontalAlignmentChanged(QQuickTextInput::HAlignment alignment); | - | 
| 280 | void verticalAlignmentChanged(QQuickTextInput::VAlignment alignment); | - | 
| 281 | void wrapModeChanged(); | - | 
| 282 | void readOnlyChanged(bool isReadOnly); | - | 
| 283 | void cursorVisibleChanged(bool isCursorVisible); | - | 
| 284 | void cursorDelegateChanged(); | - | 
| 285 | void overwriteModeChanged(bool overwriteMode); | - | 
| 286 | void maximumLengthChanged(int maximumLength); | - | 
| 287 | void validatorChanged(); | - | 
| 288 | void inputMaskChanged(const QString &inputMask); | - | 
| 289 | void echoModeChanged(QQuickTextInput::EchoMode echoMode); | - | 
| 290 | void passwordCharacterChanged(); | - | 
| 291 | void passwordMaskDelayChanged(int delay); | - | 
| 292 | void displayTextChanged(); | - | 
| 293 | void preeditTextChanged(); | - | 
| 294 | void activeFocusOnPressChanged(bool activeFocusOnPress); | - | 
| 295 | void autoScrollChanged(bool autoScroll); | - | 
| 296 | void selectByMouseChanged(bool selectByMouse); | - | 
| 297 | void mouseSelectionModeChanged(QQuickTextInput::SelectionMode mode); | - | 
| 298 | void persistentSelectionChanged(); | - | 
| 299 | void canPasteChanged(); | - | 
| 300 | void canUndoChanged(); | - | 
| 301 | void canRedoChanged(); | - | 
| 302 | void inputMethodComposingChanged(); | - | 
| 303 | void effectiveHorizontalAlignmentChanged(); | - | 
| 304 | void contentSizeChanged(); | - | 
| 305 | void inputMethodHintsChanged(); | - | 
| 306 | void renderTypeChanged(); | - | 
| 307 | void paddingChanged(); | - | 
| 308 | void topPaddingChanged(); | - | 
| 309 | void leftPaddingChanged(); | - | 
| 310 | void rightPaddingChanged(); | - | 
| 311 | void bottomPaddingChanged(); | - | 
| 312 | - | |
| 313 | private: | - | 
| 314 | void invalidateFontCaches(); | - | 
| 315 | void ensureActiveFocus(); | - | 
| 316 | - | |
| 317 | protected: | - | 
| 318 | QQuickTextInput(QQuickTextInputPrivate &dd, QQuickItem *parent = nullptr); | - | 
| 319 | - | |
| 320 | void geometryChanged(const QRectF &newGeometry, | - | 
| 321 | const QRectF &oldGeometry) override; | - | 
| 322 | - | |
| 323 | void mousePressEvent(QMouseEvent *event) override; | - | 
| 324 | void mouseMoveEvent(QMouseEvent *event) override; | - | 
| 325 | void mouseReleaseEvent(QMouseEvent *event) override; | - | 
| 326 | void mouseDoubleClickEvent(QMouseEvent *event) override; | - | 
| 327 | void keyPressEvent(QKeyEvent* ev) override; | - | 
| 328 | - | |
| 329 | void inputMethodEvent(QInputMethodEvent *) override; | - | 
| 330 | - | |
| 331 | void mouseUngrabEvent() override; | - | 
| 332 | bool event(QEvent *e) override; | - | 
| 333 | void focusOutEvent(QFocusEvent *event) override; | - | 
| 334 | void focusInEvent(QFocusEvent *event) override; | - | 
| 335 | void timerEvent(QTimerEvent *event) override; | - | 
| 336 | QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override; | - | 
| 337 | void updatePolish() override; | - | 
| 338 | - | |
| 339 | public : | - | 
| 340 | void selectAll(); | - | 
| 341 | void selectWord(); | - | 
| 342 | void select(int start, int end); | - | 
| 343 | void deselect(); | - | 
| 344 | bool isRightToLeft(int start, int end); | - | 
| 345 | - | |
| 346 | void cut(); | - | 
| 347 | void copy(); | - | 
| 348 | void paste(); | - | 
| 349 | - | |
| 350 | void undo(); | - | 
| 351 | void redo(); | - | 
| 352 | void insert(int position, const QString &text); | - | 
| 353 | void remove(int start, int end); | - | 
| 354 | void ensureVisible(int position); | - | 
| 355 | void clear(); | - | 
| 356 | - | |
| 357 | private : | - | 
| 358 | void selectionChanged(); | - | 
| 359 | void createCursor(); | - | 
| 360 | void updateCursorRectangle(bool scroll = true); | - | 
| 361 | void q_canPasteChanged(); | - | 
| 362 | void q_updateAlignment(); | - | 
| 363 | void triggerPreprocess(); | - | 
| 364 | - | |
| 365 | - | |
| 366 | void q_validatorChanged(); | - | 
| 367 | - | |
| 368 | - | |
| 369 | private: | - | 
| 370 | friend class QQuickTextUtil; | - | 
| 371 | - | |
| 372 |     inline QQuickTextInputPrivate* d_func() { return executed 35576 times by 5 tests:   reinterpret_cast<QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));Executed by: 
 executed 35576 times by 5 tests:   } inline const QQuickTextInputPrivate* d_func() const { returnreturn reinterpret_cast<QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));Executed by: 
 executed 92450 times by 5 tests:   reinterpret_cast<const QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));Executed by: 
 executed 92450 times by 5 tests:   } friend class QQuickTextInputPrivate;return reinterpret_cast<const QQuickTextInputPrivate *>(qGetPtrHelper(d_ptr));Executed by: 
  | 35576-92450 | 
| 373 | }; | - | 
| 374 | - | |
| 375 | - | |
| 376 | - | |
| 377 | template <> struct QMetaTypeId< QQuickTextInput * > { 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< QQuickTextInput * >("QQuickTextInput *", reinterpret_cast< QQuickTextInput * *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; template <> struct QMetaTypeId< QQmlListProperty<QQuickTextInput> > { 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<QQuickTextInput> >("QQmlListProperty<QQuickTextInput>", reinterpret_cast< QQmlListProperty<QQuickTextInput> *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - | 
| Switch to Source code | Preprocessed file |