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
QWidgetTextControlPrivate Class Reference

#include <qwidgettextcontrol_p_p.h>

+ Inheritance diagram for QWidgetTextControlPrivate:
+ Collaboration diagram for QWidgetTextControlPrivate:

Public Member Functions

 QWidgetTextControlPrivate ()
 
bool cursorMoveKeyEvent (QKeyEvent *e)
 
void updateCurrentCharFormat ()
 
void indent ()
 
void outdent ()
 
void gotoNextTableCell ()
 
void gotoPreviousTableCell ()
 
void createAutoBulletList ()
 
void init (Qt::TextFormat format=Qt::RichText, const QString &text=QString(), QTextDocument *document=nullptr)
 
void setContent (Qt::TextFormat format=Qt::RichText, const QString &text=QString(), QTextDocument *document=nullptr)
 
void startDrag ()
 
void paste (const QMimeData *source)
 
void setCursorPosition (const QPointF &pos)
 
void setCursorPosition (int pos, QTextCursor::MoveMode mode=QTextCursor::MoveAnchor)
 
void repaintCursor ()
 
void repaintSelection ()
 
void repaintOldAndNewSelection (const QTextCursor &oldSelection)
 
void selectionChanged (bool forceEmitSelectionChanged=false)
 
void _q_updateCurrentCharFormatAndSelection ()
 
void setClipboardSelection ()
 
void _q_emitCursorPosChanged (const QTextCursor &someCursor)
 
void _q_contentsChanged (int from, int charsRemoved, int charsAdded)
 
void setCursorVisible (bool visible)
 
void setBlinkingCursorEnabled (bool enable)
 
void updateCursorBlinking ()
 
void extendWordwiseSelection (int suggestedNewPosition, qreal mouseXPosition)
 
void extendBlockwiseSelection (int suggestedNewPosition)
 
void _q_deleteSelected ()
 
void _q_setCursorAfterUndoRedo (int undoPosition, int charsAdded, int charsRemoved)
 
QRectF cursorRectPlusUnicodeDirectionMarkers (const QTextCursor &cursor) const
 
QRectF rectForPosition (int position) const
 
QRectF selectionRect (const QTextCursor &cursor) const
 
QRectF selectionRect () const
 
QString anchorForCursor (const QTextCursor &anchor) const
 
void keyPressEvent (QKeyEvent *e)
 
void mousePressEvent (QEvent *e, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
 
void mouseMoveEvent (QEvent *e, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
 
void mouseReleaseEvent (QEvent *e, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
 
void mouseDoubleClickEvent (QEvent *e, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
 
bool sendMouseEventToInputContext (QEvent *e, QEvent::Type eventType, Qt::MouseButton button, const QPointF &pos, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint &globalPos)
 
void contextMenuEvent (const QPoint &screenPos, const QPointF &docPos, QWidget *contextWidget)
 
void focusEvent (QFocusEvent *e)
 
bool dragEnterEvent (QEvent *e, const QMimeData *mimeData)
 
void dragLeaveEvent ()
 
bool dragMoveEvent (QEvent *e, const QMimeData *mimeData, const QPointF &pos)
 
bool dropEvent (const QMimeData *mimeData, const QPointF &pos, Qt::DropAction dropAction, QObject *source)
 
void inputMethodEvent (QInputMethodEvent *)
 
void activateLinkUnderCursor (QString href=QString())
 
bool isPreediting () const
 
void commitPreedit ()
 
void insertParagraphSeparator ()
 
void append (const QString &text, Qt::TextFormat format=Qt::AutoText)
 
void _q_copyLink ()
 
void _q_updateBlock (const QTextBlock &)
 
void _q_documentLayoutChanged ()
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

QTextDocumentdoc
 
bool cursorOn
 
bool cursorVisible
 
QTextCursor cursor
 
bool cursorIsFocusIndicator
 
QTextCharFormat lastCharFormat
 
QTextCursor dndFeedbackCursor
 
Qt::TextInteractionFlags interactionFlags
 
QBasicTimer cursorBlinkTimer
 
QBasicTimer trippleClickTimer
 
QPointF trippleClickPoint
 
bool dragEnabled
 
bool mousePressed
 
bool mightStartDrag
 
QPoint mousePressPos
 
QPointer< QWidgetcontextWidget
 
int lastSelectionPosition
 
int lastSelectionAnchor
 
bool ignoreAutomaticScrollbarAdjustement
 
QTextCursor selectedWordOnDoubleClick
 
QTextCursor selectedBlockOnTrippleClick
 
bool overwriteMode
 
bool acceptRichText
 
int preeditCursor
 
bool hideCursor
 
QList< QAbstractTextDocumentLayout::SelectionextraSelections
 
QPalette palette
 
bool hasFocus
 
bool isEnabled
 
QString highlightedAnchor
 
QString anchorOnMousePress
 
QTextBlock blockWithMarkerUnderMouse
 
bool hadSelectionOnMousePress
 
bool ignoreUnusedNavigationEvents
 
bool openExternalLinks
 
bool wordSelectionEnabled
 
QString linkToCopy
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Detailed Description

Definition at line 38 of file qwidgettextcontrol_p_p.h.

Constructor & Destructor Documentation

◆ QWidgetTextControlPrivate()

QWidgetTextControlPrivate::QWidgetTextControlPrivate ( )

Definition at line 95 of file qwidgettextcontrol.cpp.

Member Function Documentation

◆ _q_contentsChanged()

void QWidgetTextControlPrivate::_q_contentsChanged ( int from,
int charsRemoved,
int charsAdded )

Definition at line 644 of file qwidgettextcontrol.cpp.

References QTextDocument::characterCount(), doc, QTextCursor::KeepAnchor, Q_UNUSED, qMin(), QTextCursor::selectedText(), and QTextCursor::setPosition().

Referenced by setContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_copyLink()

void QWidgetTextControlPrivate::_q_copyLink ( )

Definition at line 3381 of file qwidgettextcontrol.cpp.

References QGuiApplication::clipboard(), linkToCopy, and QMimeData::setText().

+ Here is the call graph for this function:

◆ _q_deleteSelected()

void QWidgetTextControlPrivate::_q_deleteSelected ( )

Definition at line 821 of file qwidgettextcontrol.cpp.

References cursor, QTextCursor::hasSelection(), interactionFlags, QTextCursor::removeSelectedText(), and Qt::TextEditable.

+ Here is the call graph for this function:

◆ _q_documentLayoutChanged()

void QWidgetTextControlPrivate::_q_documentLayoutChanged ( )

Definition at line 678 of file qwidgettextcontrol.cpp.

References _q_updateBlock(), QObject::connect(), QObjectPrivate::connect(), doc, QTextDocument::documentLayout(), QWidgetTextControl::documentSizeChanged(), QAbstractTextDocumentLayout::documentSizeChanged(), layout, QAbstractTextDocumentLayout::update(), QAbstractTextDocumentLayout::updateBlock(), and QWidgetTextControl::updateRequest().

Referenced by setContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_emitCursorPosChanged()

void QWidgetTextControlPrivate::_q_emitCursorPosChanged ( const QTextCursor & someCursor)

Definition at line 635 of file qwidgettextcontrol.cpp.

References cursor, and emit.

Referenced by setContent().

+ Here is the caller graph for this function:

◆ _q_setCursorAfterUndoRedo()

void QWidgetTextControlPrivate::_q_setCursorAfterUndoRedo ( int undoPosition,
int charsAdded,
int charsRemoved )

◆ _q_updateBlock()

void QWidgetTextControlPrivate::_q_updateBlock ( const QTextBlock & block)

Definition at line 1386 of file qwidgettextcontrol.cpp.

References emit, and QRectF::setRight().

Referenced by _q_documentLayoutChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_updateCurrentCharFormatAndSelection()

void QWidgetTextControlPrivate::_q_updateCurrentCharFormatAndSelection ( )

Definition at line 617 of file qwidgettextcontrol.cpp.

References selectionChanged(), and updateCurrentCharFormat().

Referenced by mouseMoveEvent(), mousePressEvent(), and setContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ activateLinkUnderCursor()

void QWidgetTextControlPrivate::activateLinkUnderCursor ( QString href = QString())

Definition at line 2895 of file qwidgettextcontrol.cpp.

References QTextCharFormat::anchorHref(), QTextBlock::begin(), QTextCursor::block(), QTextCursor::charFormat(), QTextFragment::charFormat(), QTextCursor::clearSelection(), cursor, cursorIsFocusIndicator, emit, hasFocus, QTextCursor::hasSelection(), QString::isEmpty(), it, QTextCursor::KeepAnchor, QTextFragment::length(), QTextCursor::movePosition(), QTextCursor::NextCharacter, openExternalLinks, QDesktopServices::openUrl(), QTextCursor::position(), QTextFragment::position(), repaintOldAndNewSelection(), QTextCursor::selectionStart(), and QTextCursor::setPosition().

Referenced by keyPressEvent(), and mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anchorForCursor()

QString QWidgetTextControlPrivate::anchorForCursor ( const QTextCursor & anchor) const

Definition at line 2264 of file qwidgettextcontrol.cpp.

References QTextFormat::AnchorHref, QTextCursor::charFormat(), cursor, fmt, QTextCursor::movePosition(), QTextCursor::NextCharacter, QTextCursor::position(), QTextCursor::selectionStart(), QTextCursor::setPosition(), and QTextFormat::stringProperty().

+ Here is the call graph for this function:

◆ append()

void QWidgetTextControlPrivate::append ( const QString & text,
Qt::TextFormat format = Qt::AutoText )

◆ commitPreedit()

void QWidgetTextControlPrivate::commitPreedit ( )

Definition at line 2983 of file qwidgettextcontrol.cpp.

References QTextCursor::beginEditBlock(), QTextCursor::block(), cursor, QTextCursor::endEditBlock(), QGuiApplication::inputMethod(), isPreediting(), layout, QTextBlock::layout(), and preeditCursor.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and mousePressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contextMenuEvent()

void QWidgetTextControlPrivate::contextMenuEvent ( const QPoint & screenPos,
const QPointF & docPos,
QWidget * contextWidget )

Definition at line 1934 of file qwidgettextcontrol.cpp.

References contextWidget, QMenuPrivate::get(), menu, QObjectData::parent, QMenu::popup(), Q_UNUSED, QWidget::setAttribute(), Qt::WA_DeleteOnClose, widget, window(), QWidget::window(), and QWidget::windowHandle().

+ Here is the call graph for this function:

◆ createAutoBulletList()

void QWidgetTextControlPrivate::createAutoBulletList ( )

Definition at line 377 of file qwidgettextcontrol.cpp.

References QTextCursor::beginEditBlock(), QTextCursor::blockFormat(), QTextCursor::createList(), cursor, QTextCursor::endEditBlock(), QTextListFormat::ListDisc, QTextCursor::setBlockFormat(), and QTextListFormat::setStyle().

+ Here is the call graph for this function:

◆ cursorMoveKeyEvent()

bool QWidgetTextControlPrivate::cursorMoveKeyEvent ( QKeyEvent * e)

Definition at line 122 of file qwidgettextcontrol.cpp.

References QTextCursor::anchor(), QTextCursor::block(), currentTextLine(), cursor, QTextCursor::Down, emit, QTextCursor::End, QTextCursor::EndOfBlock, QTextCursor::EndOfLine, ignoreUnusedNavigationEvents, QTextCursor::isNull(), QTextBlock::isValid(), QTextCursor::KeepAnchor, QKeyEvent::key(), Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, Qt::Key_Up, QTextBlock::layout(), QTextCursor::Left, line, QTextLayout::lineCount(), QTextCursor::MoveAnchor, QTextCursor::movePosition(), QKeySequence::MoveToEndOfBlock, QKeySequence::MoveToEndOfDocument, QKeySequence::MoveToEndOfLine, QKeySequence::MoveToNextChar, QKeySequence::MoveToNextLine, QKeySequence::MoveToNextWord, QKeySequence::MoveToPreviousChar, QKeySequence::MoveToPreviousLine, QKeySequence::MoveToPreviousWord, QKeySequence::MoveToStartOfBlock, QKeySequence::MoveToStartOfDocument, QKeySequence::MoveToStartOfLine, Qt::NavigationModeKeypadDirectional, QTextBlock::next(), QTextCursor::NoMove, QTextCursor::position(), QTextBlock::previous(), Q_UNUSED, repaintOldAndNewSelection(), QTextCursor::Right, QKeySequence::SelectEndOfBlock, QKeySequence::SelectEndOfDocument, QKeySequence::SelectEndOfLine, selectionChanged(), QKeySequence::SelectNextChar, QKeySequence::SelectNextLine, QKeySequence::SelectNextWord, QKeySequence::SelectPreviousChar, QKeySequence::SelectPreviousLine, QKeySequence::SelectPreviousWord, QKeySequence::SelectStartOfBlock, QKeySequence::SelectStartOfDocument, QKeySequence::SelectStartOfLine, QTextCursor::setVisualNavigation(), QTextCursor::Start, QTextCursor::StartOfBlock, QTextCursor::StartOfLine, QTextCursor::Up, QTextCursor::visualNavigation(), QTextCursor::WordLeft, and QTextCursor::WordRight.

Referenced by keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cursorRectPlusUnicodeDirectionMarkers()

QRectF QWidgetTextControlPrivate::cursorRectPlusUnicodeDirectionMarkers ( const QTextCursor & cursor) const

Definition at line 2424 of file qwidgettextcontrol.cpp.

References QRectF::adjusted(), cursor, QTextCursor::isNull(), QTextCursor::position(), and rectForPosition().

Referenced by repaintCursor(), and repaintOldAndNewSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dragEnterEvent()

bool QWidgetTextControlPrivate::dragEnterEvent ( QEvent * e,
const QMimeData * mimeData )

Definition at line 1956 of file qwidgettextcontrol.cpp.

References dndFeedbackCursor, QEvent::ignore(), interactionFlags, mimeData, and Qt::TextEditable.

+ Here is the call graph for this function:

◆ dragLeaveEvent()

void QWidgetTextControlPrivate::dragLeaveEvent ( )

Definition at line 1969 of file qwidgettextcontrol.cpp.

References dndFeedbackCursor, emit, and QRectF::isValid().

+ Here is the call graph for this function:

◆ dragMoveEvent()

bool QWidgetTextControlPrivate::dragMoveEvent ( QEvent * e,
const QMimeData * mimeData,
const QPointF & pos )

Definition at line 1980 of file qwidgettextcontrol.cpp.

References cursor, dndFeedbackCursor, emit, Qt::FuzzyHit, QEvent::ignore(), interactionFlags, QRectF::isValid(), mimeData, pos, QTextCursor::setPosition(), and Qt::TextEditable.

+ Here is the call graph for this function:

◆ dropEvent()

bool QWidgetTextControlPrivate::dropEvent ( const QMimeData * mimeData,
const QPointF & pos,
Qt::DropAction dropAction,
QObject * source )

Definition at line 2004 of file qwidgettextcontrol.cpp.

References QTextCursor::beginEditBlock(), contextWidget, cursor, dndFeedbackCursor, QTextCursor::endEditBlock(), interactionFlags, mimeData, Qt::MoveAction, pos, QTextCursor::removeSelectedText(), repaintSelection(), and Qt::TextEditable.

+ Here is the call graph for this function:

◆ extendBlockwiseSelection()

void QWidgetTextControlPrivate::extendBlockwiseSelection ( int suggestedNewPosition)

Definition at line 791 of file qwidgettextcontrol.cpp.

References cursor, QTextCursor::EndOfBlock, interactionFlags, QTextCursor::KeepAnchor, QTextCursor::movePosition(), QTextCursor::NextCharacter, QTextCursor::position(), selectedBlockOnTrippleClick, selectionChanged(), QTextCursor::selectionEnd(), QTextCursor::selectionStart(), setClipboardSelection(), QTextCursor::setPosition(), QTextCursor::StartOfBlock, and Qt::TextSelectableByMouse.

Referenced by mouseMoveEvent(), and mousePressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extendWordwiseSelection()

void QWidgetTextControlPrivate::extendWordwiseSelection ( int suggestedNewPosition,
qreal mouseXPosition )

Definition at line 717 of file qwidgettextcontrol.cpp.

References QTextCursor::block(), currentTextLine(), cursor, QTextCursor::EndOfWord, interactionFlags, QTextCursor::KeepAnchor, line, QTextCursor::movePosition(), QTextCursor::position(), QTextBlock::position(), selectedWordOnDoubleClick, selectionChanged(), QTextCursor::selectionEnd(), QTextCursor::selectionStart(), setClipboardSelection(), setCursorPosition(), QTextCursor::setPosition(), QTextCursor::StartOfWord, Qt::TextSelectableByMouse, and wordSelectionEnabled.

Referenced by mouseMoveEvent(), and mousePressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ focusEvent()

void QWidgetTextControlPrivate::focusEvent ( QFocusEvent * e)

Definition at line 2235 of file qwidgettextcontrol.cpp.

References Qt::ActiveWindowFocusReason, QTextCursor::clearSelection(), cursor, cursorIsFocusIndicator, cursorOn, emit, QFocusEvent::gotFocus(), hasFocus, QTextCursor::hasSelection(), interactionFlags, Qt::PopupFocusReason, QFocusEvent::reason(), setCursorVisible(), Qt::TextEditable, and Qt::TextSelectableByKeyboard.

+ Here is the call graph for this function:

◆ gotoNextTableCell()

void QWidgetTextControlPrivate::gotoNextTableCell ( )

Definition at line 339 of file qwidgettextcontrol.cpp.

References QTextTableCell::column(), QTextTableCell::columnSpan(), QTextCursor::currentTable(), cursor, QTextTableCell::firstCursorPosition(), and QTextTableCell::row().

+ Here is the call graph for this function:

◆ gotoPreviousTableCell()

void QWidgetTextControlPrivate::gotoPreviousTableCell ( )

Definition at line 358 of file qwidgettextcontrol.cpp.

References QTextTableCell::column(), QTextCursor::currentTable(), cursor, QTextTableCell::firstCursorPosition(), and QTextTableCell::row().

+ Here is the call graph for this function:

◆ indent()

void QWidgetTextControlPrivate::indent ( )

Definition at line 302 of file qwidgettextcontrol.cpp.

References QTextCursor::block(), QTextCursor::blockFormat(), QTextCursor::createList(), QTextCursor::currentList(), cursor, list, QTextCursor::mergeBlockFormat(), and QTextBlockFormat::setIndent().

+ Here is the call graph for this function:

◆ init()

void QWidgetTextControlPrivate::init ( Qt::TextFormat format = Qt::RichText,
const QString & text = QString(),
QTextDocument * document = nullptr )

Definition at line 395 of file qwidgettextcontrol.cpp.

References doc, interactionFlags, setContent(), QTextDocument::setUndoRedoEnabled(), text, and Qt::TextEditable.

+ Here is the call graph for this function:

◆ inputMethodEvent()

◆ insertParagraphSeparator()

void QWidgetTextControlPrivate::insertParagraphSeparator ( )

Definition at line 3194 of file qwidgettextcontrol.cpp.

References QTextCursor::block(), QTextFormat::BlockBottomMargin, QTextFormat::BlockCodeLanguage, QTextCursor::blockFormat(), QTextFormat::BlockTrailingHorizontalRulerWidth, QTextCursor::charFormat(), QTextBlockFormat::Checked, QTextFormat::clearProperty(), QTextCursor::currentList(), cursor, QTextFormat::hasProperty(), QTextFormat::HeadingLevel, QTextCursor::insertBlock(), QString::isEmpty(), QTextCursor::setBlockFormat(), QTextCursor::setCharFormat(), QTextBlock::text(), and QTextBlockFormat::Unchecked.

Referenced by keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPreediting()

bool QWidgetTextControlPrivate::isPreediting ( ) const

Definition at line 2974 of file qwidgettextcontrol.cpp.

References QTextCursor::block(), cursor, QLayout::isEmpty(), layout, and QTextBlock::layout().

Referenced by commitPreedit(), mouseMoveEvent(), and sendMouseEventToInputContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keyPressEvent()

void QWidgetTextControlPrivate::keyPressEvent ( QKeyEvent * e)

Definition at line 1206 of file qwidgettextcontrol.cpp.

References QEvent::accept(), activateLinkUnderCursor(), QTextCursor::atBlockEnd(), QTextCursor::atBlockStart(), QKeySequence::Backspace, QTextCursor::block(), QTextCursor::blockFormat(), QClipboard::Clipboard, QGuiApplication::clipboard(), QKeySequence::Copy, Qt::CTRL, QTextCursor::currentList(), cursor, cursorMoveKeyEvent(), cursorOn, QKeySequence::Cut, QKeySequence::Delete, QTextCursor::deleteChar(), QKeySequence::DeleteEndOfLine, QKeySequence::DeleteEndOfWord, QTextCursor::deletePreviousChar(), QKeySequence::DeleteStartOfWord, QTextCursor::EndOfBlock, fmt, Qt::GroupSwitchModifier, QTextCursor::hasSelection(), QEvent::ignore(), QKeySequence::InsertLineSeparator, QKeySequence::InsertParagraphSeparator, insertParagraphSeparator(), QTextCursor::insertText(), interactionFlags, QTextCursor::KeepAnchor, QKeyEvent::key(), Qt::Key_Backspace, Qt::Key_Direction_L, Qt::Key_Direction_R, Qt::Key_Enter, Qt::Key_Insert, Qt::Key_Return, Qt::Key_Select, Qt::LeftToRight, QTextBlock::length(), Qt::LinksAccessibleByKeyboard, list, QTextCursor::mergeBlockFormat(), QKeyEvent::modifiers(), QTextCursor::movePosition(), QTextCursor::NextWord, overwriteMode, QKeySequence::Paste, QTextCursor::position(), QTextBlock::position(), QTextCursor::PreviousWord, QKeySequence::Redo, QList< T >::remove(), QTextCursor::removeSelectedText(), repaintSelection(), QTextCursor::Right, Qt::RightToLeft, QKeySequence::SelectAll, QClipboard::Selection, selectionChanged(), QTextCursor::setBlockFormat(), setClipboardSelection(), QTextFormat::setLayoutDirection(), QTextCursorPrivate::setX(), Qt::SHIFT, Qt::ShiftModifier, QKeyEvent::text(), Qt::TextEditable, Qt::TextSelectableByKeyboard, QKeySequence::Undo, and updateCurrentCharFormat().

+ Here is the call graph for this function:

◆ mouseDoubleClickEvent()

void QWidgetTextControlPrivate::mouseDoubleClickEvent ( QEvent * e,
Qt::MouseButton button,
const QPointF & pos,
Qt::KeyboardModifiers modifiers,
Qt::MouseButtons buttons,
const QPoint & globalPos )

◆ mouseMoveEvent()

◆ mousePressEvent()

void QWidgetTextControlPrivate::mousePressEvent ( QEvent * e,
Qt::MouseButton button,
const QPointF & pos,
Qt::KeyboardModifiers modifiers,
Qt::MouseButtons buttons,
const QPoint & globalPos )

◆ mouseReleaseEvent()

◆ outdent()

void QWidgetTextControlPrivate::outdent ( )

Definition at line 322 of file qwidgettextcontrol.cpp.

References QTextCursor::blockFormat(), QTextCursor::currentList(), cursor, list, QTextCursor::mergeBlockFormat(), and QTextBlockFormat::setIndent().

+ Here is the call graph for this function:

◆ paste()

void QWidgetTextControlPrivate::paste ( const QMimeData * source)

◆ rectForPosition()

QRectF QWidgetTextControlPrivate::rectForPosition ( int position) const

Definition at line 1394 of file qwidgettextcontrol.cpp.

References doc, QTextDocument::documentLayout(), QTextDocument::findBlock(), QTextLayout::font(), QFontMetrics::horizontalAdvance(), QTextBlock::isValid(), layout, QTextBlock::layout(), line, ok, overwriteMode, QTextBlock::position(), position(), preeditCursor, QObject::property(), QVariant::toInt(), QPointF::x(), and QPointF::y().

Referenced by cursorRectPlusUnicodeDirectionMarkers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ repaintCursor()

void QWidgetTextControlPrivate::repaintCursor ( )

Definition at line 550 of file qwidgettextcontrol.cpp.

References cursor, cursorRectPlusUnicodeDirectionMarkers(), and emit.

Referenced by updateCursorBlinking().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ repaintOldAndNewSelection()

void QWidgetTextControlPrivate::repaintOldAndNewSelection ( const QTextCursor & oldSelection)

Definition at line 556 of file qwidgettextcontrol.cpp.

References QTextCursor::anchor(), QTextCursor::currentFrame(), cursor, cursorRectPlusUnicodeDirectionMarkers(), doc, emit, QTextCursor::hasComplexSelection(), QTextCursor::hasSelection(), QTextCursor::isNull(), QTextCursor::KeepAnchor, and QTextCursor::position().

Referenced by activateLinkUnderCursor(), cursorMoveKeyEvent(), inputMethodEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and repaintSelection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ repaintSelection()

void QWidgetTextControlPrivate::repaintSelection ( )
inline

Definition at line 69 of file qwidgettextcontrol_p_p.h.

References repaintOldAndNewSelection().

Referenced by dropEvent(), keyPressEvent(), and mousePressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectionChanged()

void QWidgetTextControlPrivate::selectionChanged ( bool forceEmitSelectionChanged = false)

Definition at line 577 of file qwidgettextcontrol.cpp.

References QTextCursor::anchor(), cursor, emit, QTextCursor::hasSelection(), lastSelectionAnchor, lastSelectionPosition, and QTextCursor::position().

Referenced by _q_updateCurrentCharFormatAndSelection(), cursorMoveKeyEvent(), extendBlockwiseSelection(), extendWordwiseSelection(), keyPressEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectionRect() [1/2]

QRectF QWidgetTextControlPrivate::selectionRect ( ) const
inline

Definition at line 98 of file qwidgettextcontrol_p_p.h.

References cursor, and selectionRect().

Referenced by selectionRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectionRect() [2/2]

QRectF QWidgetTextControlPrivate::selectionRect ( const QTextCursor & cursor) const

◆ sendMouseEventToInputContext()

bool QWidgetTextControlPrivate::sendMouseEventToInputContext ( QEvent * e,
QEvent::Type eventType,
Qt::MouseButton button,
const QPointF & pos,
Qt::KeyboardModifiers modifiers,
Qt::MouseButtons buttons,
const QPoint & globalPos )

Definition at line 1900 of file qwidgettextcontrol.cpp.

References QTextCursor::block(), button, QInputMethod::Click, cursor, Qt::FuzzyHit, QGuiApplication::inputMethod(), isPreediting(), layout, QTextBlock::layout(), QEvent::MouseButtonRelease, pos, QTextCursor::position(), Q_UNUSED, and QEvent::setAccepted().

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBlinkingCursorEnabled()

void QWidgetTextControlPrivate::setBlinkingCursorEnabled ( bool enable)

◆ setClipboardSelection()

void QWidgetTextControlPrivate::setClipboardSelection ( )

Definition at line 624 of file qwidgettextcontrol.cpp.

References QGuiApplication::clipboard(), cursor, QTextCursor::hasSelection(), QClipboard::Selection, QClipboard::setMimeData(), and QClipboard::supportsSelection().

Referenced by extendBlockwiseSelection(), extendWordwiseSelection(), keyPressEvent(), mouseDoubleClickEvent(), and mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

void QWidgetTextControlPrivate::setContent ( Qt::TextFormat format = Qt::RichText,
const QString & text = QString(),
QTextDocument * document = nullptr )

◆ setCursorPosition() [1/2]

void QWidgetTextControlPrivate::setCursorPosition ( const QPointF & pos)

Definition at line 531 of file qwidgettextcontrol.cpp.

References cursor, Qt::FuzzyHit, pos, and QTextCursor::setPosition().

Referenced by extendWordwiseSelection(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCursorPosition() [2/2]

void QWidgetTextControlPrivate::setCursorPosition ( int pos,
QTextCursor::MoveMode mode = QTextCursor::MoveAnchor )

Definition at line 540 of file qwidgettextcontrol.cpp.

References cursor, QTextCursor::KeepAnchor, pos, selectedBlockOnTrippleClick, selectedWordOnDoubleClick, and QTextCursor::setPosition().

+ Here is the call graph for this function:

◆ setCursorVisible()

void QWidgetTextControlPrivate::setCursorVisible ( bool visible)

Definition at line 690 of file qwidgettextcontrol.cpp.

References QObjectPrivate::connect(), QStyleHints::cursorFlashTimeChanged(), cursorVisible, disconnect(), QGuiApplication::styleHints(), and updateCursorBlinking().

Referenced by focusEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startDrag()

void QWidgetTextControlPrivate::startDrag ( )

Definition at line 505 of file qwidgettextcontrol.cpp.

References contextWidget, Qt::CopyAction, cursor, QDrag::exec(), interactionFlags, mousePressed, Qt::MoveAction, QTextCursor::removeSelectedText(), QDrag::setMimeData(), QDrag::target(), and Qt::TextEditable.

Referenced by mouseMoveEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCurrentCharFormat()

void QWidgetTextControlPrivate::updateCurrentCharFormat ( )

Definition at line 289 of file qwidgettextcontrol.cpp.

References QTextCursor::charFormat(), cursor, emit, fmt, and lastCharFormat.

Referenced by _q_updateCurrentCharFormatAndSelection(), and keyPressEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCursorBlinking()

void QWidgetTextControlPrivate::updateCursorBlinking ( )

Definition at line 704 of file qwidgettextcontrol.cpp.

References cursorBlinkTimer, cursorOn, cursorVisible, repaintCursor(), QBasicTimer::start(), QBasicTimer::stop(), and QGuiApplication::styleHints().

Referenced by setCursorVisible().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ acceptRichText

bool QWidgetTextControlPrivate::acceptRichText

Definition at line 181 of file qwidgettextcontrol_p_p.h.

◆ anchorOnMousePress

QString QWidgetTextControlPrivate::anchorOnMousePress

Definition at line 196 of file qwidgettextcontrol_p_p.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

◆ blockWithMarkerUnderMouse

QTextBlock QWidgetTextControlPrivate::blockWithMarkerUnderMouse

Definition at line 197 of file qwidgettextcontrol_p_p.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

◆ contextWidget

QPointer<QWidget> QWidgetTextControlPrivate::contextWidget

Definition at line 170 of file qwidgettextcontrol_p_p.h.

Referenced by contextMenuEvent(), dropEvent(), mouseMoveEvent(), and startDrag().

◆ cursor

◆ cursorBlinkTimer

QBasicTimer QWidgetTextControlPrivate::cursorBlinkTimer

Definition at line 160 of file qwidgettextcontrol_p_p.h.

Referenced by updateCursorBlinking().

◆ cursorIsFocusIndicator

bool QWidgetTextControlPrivate::cursorIsFocusIndicator

◆ cursorOn

bool QWidgetTextControlPrivate::cursorOn

Definition at line 150 of file qwidgettextcontrol_p_p.h.

Referenced by focusEvent(), keyPressEvent(), and updateCursorBlinking().

◆ cursorVisible

bool QWidgetTextControlPrivate::cursorVisible

Definition at line 151 of file qwidgettextcontrol_p_p.h.

Referenced by setCursorVisible(), and updateCursorBlinking().

◆ dndFeedbackCursor

QTextCursor QWidgetTextControlPrivate::dndFeedbackCursor

Definition at line 156 of file qwidgettextcontrol_p_p.h.

Referenced by dragEnterEvent(), dragLeaveEvent(), dragMoveEvent(), and dropEvent().

◆ doc

◆ dragEnabled

bool QWidgetTextControlPrivate::dragEnabled

Definition at line 164 of file qwidgettextcontrol_p_p.h.

Referenced by mousePressEvent().

◆ extraSelections

QList<QAbstractTextDocumentLayout::Selection> QWidgetTextControlPrivate::extraSelections

Definition at line 186 of file qwidgettextcontrol_p_p.h.

◆ hadSelectionOnMousePress

bool QWidgetTextControlPrivate::hadSelectionOnMousePress

Definition at line 198 of file qwidgettextcontrol_p_p.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

◆ hasFocus

bool QWidgetTextControlPrivate::hasFocus

Definition at line 189 of file qwidgettextcontrol_p_p.h.

Referenced by activateLinkUnderCursor(), and focusEvent().

◆ hideCursor

bool QWidgetTextControlPrivate::hideCursor

Definition at line 184 of file qwidgettextcontrol_p_p.h.

Referenced by inputMethodEvent().

◆ highlightedAnchor

QString QWidgetTextControlPrivate::highlightedAnchor

Definition at line 195 of file qwidgettextcontrol_p_p.h.

Referenced by mouseMoveEvent().

◆ ignoreAutomaticScrollbarAdjustement

bool QWidgetTextControlPrivate::ignoreAutomaticScrollbarAdjustement

Definition at line 175 of file qwidgettextcontrol_p_p.h.

◆ ignoreUnusedNavigationEvents

bool QWidgetTextControlPrivate::ignoreUnusedNavigationEvents

Definition at line 200 of file qwidgettextcontrol_p_p.h.

Referenced by cursorMoveKeyEvent().

◆ interactionFlags

◆ isEnabled

bool QWidgetTextControlPrivate::isEnabled

Definition at line 193 of file qwidgettextcontrol_p_p.h.

◆ lastCharFormat

QTextCharFormat QWidgetTextControlPrivate::lastCharFormat

Definition at line 154 of file qwidgettextcontrol_p_p.h.

Referenced by updateCurrentCharFormat().

◆ lastSelectionAnchor

int QWidgetTextControlPrivate::lastSelectionAnchor

Definition at line 173 of file qwidgettextcontrol_p_p.h.

Referenced by selectionChanged().

◆ lastSelectionPosition

int QWidgetTextControlPrivate::lastSelectionPosition

Definition at line 172 of file qwidgettextcontrol_p_p.h.

Referenced by selectionChanged().

◆ linkToCopy

QString QWidgetTextControlPrivate::linkToCopy

Definition at line 205 of file qwidgettextcontrol_p_p.h.

Referenced by _q_copyLink().

◆ mightStartDrag

bool QWidgetTextControlPrivate::mightStartDrag

◆ mousePressed

bool QWidgetTextControlPrivate::mousePressed

◆ mousePressPos

QPoint QWidgetTextControlPrivate::mousePressPos

Definition at line 169 of file qwidgettextcontrol_p_p.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

◆ openExternalLinks

bool QWidgetTextControlPrivate::openExternalLinks

Definition at line 201 of file qwidgettextcontrol_p_p.h.

Referenced by activateLinkUnderCursor().

◆ overwriteMode

bool QWidgetTextControlPrivate::overwriteMode

Definition at line 180 of file qwidgettextcontrol_p_p.h.

Referenced by keyPressEvent(), and rectForPosition().

◆ palette

QPalette QWidgetTextControlPrivate::palette

Definition at line 188 of file qwidgettextcontrol_p_p.h.

Referenced by setContent().

◆ preeditCursor

int QWidgetTextControlPrivate::preeditCursor

Definition at line 183 of file qwidgettextcontrol_p_p.h.

Referenced by commitPreedit(), inputMethodEvent(), and rectForPosition().

◆ selectedBlockOnTrippleClick

QTextCursor QWidgetTextControlPrivate::selectedBlockOnTrippleClick

◆ selectedWordOnDoubleClick

QTextCursor QWidgetTextControlPrivate::selectedWordOnDoubleClick

◆ trippleClickPoint

QPointF QWidgetTextControlPrivate::trippleClickPoint

Definition at line 162 of file qwidgettextcontrol_p_p.h.

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

◆ trippleClickTimer

QBasicTimer QWidgetTextControlPrivate::trippleClickTimer

Definition at line 161 of file qwidgettextcontrol_p_p.h.

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

◆ wordSelectionEnabled

bool QWidgetTextControlPrivate::wordSelectionEnabled

The documentation for this class was generated from the following files: