Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicktextcontrol_p_p.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
4#ifndef QQUICKTEXTCONTROL_P_P_H
5#define QQUICKTEXTCONTROL_P_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "QtGui/qtextdocumentfragment.h"
19#include "QtGui/qtextcursor.h"
20#include "QtGui/qtextformat.h"
21#include "QtGui/qtextobject.h"
22#include "QtGui/qabstracttextdocumentlayout.h"
23#include "QtCore/qbasictimer.h"
24#include "QtCore/qpointer.h"
25#include "private/qobject_p.h"
26
28
29class QMimeData;
30class QAbstractScrollArea;
31
33{
34public:
35 Q_DECLARE_PUBLIC(QQuickTextControl)
37
39
41
43
44 void paste(const QMimeData *source);
45
46 void setCursorPosition(const QPointF &pos);
48
49 void repaintCursor();
52 void repaintOldAndNewSelection(const QTextCursor &oldSelection);
53
54 void selectionChanged(bool forceEmitSelectionChanged = false);
55
57
58#if QT_CONFIG(clipboard)
59 void setClipboardSelection();
60#endif
61
62 void _q_updateCursorPosChanged(const QTextCursor &someCursor);
63
66
67 void extendWordwiseSelection(int suggestedNewPosition, qreal mouseXPosition);
68 void extendBlockwiseSelection(int suggestedNewPosition);
69
70 void _q_setCursorAfterUndoRedo(int undoPosition, int charsAdded, int charsRemoved);
71
73
74 void keyPressEvent(QKeyEvent *e);
81 void focusEvent(QFocusEvent *e);
82#if QT_CONFIG(im)
83 void inputMethodEvent(QInputMethodEvent *);
84#endif
85 void hoverEvent(QHoverEvent *e, const QPointF &pos);
86
88
89#if QT_CONFIG(im)
90 bool isPreediting() const;
91 void commitPreedit();
92 void cancelPreedit();
93#endif
94
97
99
108
110 ulong timestampAtLastDoubleClick = 0; // will only be set at a double click
111
112#if QT_CONFIG(im)
113 int preeditCursor;
114#endif
115
116 Qt::TextInteractionFlags interactionFlags;
117
118 bool cursorOn : 1;
120 bool mousePressed : 1;
125 bool cursorVisible : 1; // used to hide the cursor in the preedit area
127 bool hasFocus : 1;
130 bool hasImState : 1;
135
138
140};
141
143
144#endif // QQuickTextControl_P_H
\inmodule QtCore
Definition qbasictimer.h:18
The QFocusEvent class contains event parameters for widget focus events.
Definition qevent.h:470
\inmodule QtGui
Definition qevent.h:246
The QInputMethodEvent class provides parameters for input method events.
Definition qevent.h:625
The QKeyEvent class describes a key event.
Definition qevent.h:424
\inmodule QtCore
Definition qmimedata.h:16
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore\reentrant
Definition qpoint.h:217
bool cursorMoveKeyEvent(QKeyEvent *e)
void selectionChanged(bool forceEmitSelectionChanged=false)
void setCursorPosition(const QPointF &pos)
void _q_updateCursorPosChanged(const QTextCursor &someCursor)
void mouseMoveEvent(QMouseEvent *event, const QPointF &pos)
void extendWordwiseSelection(int suggestedNewPosition, qreal mouseXPosition)
void keyReleaseEvent(QKeyEvent *e)
void focusEvent(QFocusEvent *e)
QRectF rectForPosition(int position) const
void extendBlockwiseSelection(int suggestedNewPosition)
void setBlinkingCursorEnabled(bool enable)
void hoverEvent(QHoverEvent *e, const QPointF &pos)
void setContent(Qt::TextFormat format, const QString &text)
void repaintOldAndNewSelection(const QTextCursor &oldSelection)
void activateLinkUnderCursor(QString href=QString())
void mouseDoubleClickEvent(QMouseEvent *event, const QPointF &pos)
void paste(const QMimeData *source)
void mousePressEvent(QMouseEvent *event, const QPointF &pos)
Qt::TextInteractionFlags interactionFlags
void keyPressEvent(QKeyEvent *e)
void _q_setCursorAfterUndoRedo(int undoPosition, int charsAdded, int charsRemoved)
bool sendMouseEventToInputContext(QMouseEvent *event, const QPointF &pos)
void mouseReleaseEvent(QMouseEvent *event, const QPointF &pos)
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\reentrant
\reentrant \inmodule QtGui
Definition qtextcursor.h:30
MoveMode
\value MoveAnchor Moves the anchor to the same position as the cursor itself.
Definition qtextcursor.h:47
\reentrant \inmodule QtGui
QString text
Combined button and popup list for selecting options.
TextFormat
GLenum mode
GLboolean enable
GLint GLsizei GLsizei GLenum format
GLsizei GLsizei GLchar * source
struct _cl_event * event
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned long ulong
Definition qtypes.h:35
double qreal
Definition qtypes.h:187