![]() |
Qt 6.x
The Qt SDK
|
#include <qwidgettextcontrol_p.h>
Public Slots | |
void | setPlainText (const QString &text) |
void | setHtml (const QString &text) |
void | cut () |
void | copy () |
void | paste (QClipboard::Mode mode=QClipboard::Clipboard) |
void | undo () |
void | redo () |
void | clear () |
void | selectAll () |
void | insertPlainText (const QString &text) |
void | insertHtml (const QString &text) |
void | append (const QString &text) |
void | appendHtml (const QString &html) |
void | appendPlainText (const QString &text) |
void | adjustSize () |
![]() | |
void | deleteLater () |
\threadsafe | |
Signals | |
void | textChanged () |
void | undoAvailable (bool b) |
void | redoAvailable (bool b) |
void | currentCharFormatChanged (const QTextCharFormat &format) |
void | copyAvailable (bool b) |
void | selectionChanged () |
void | cursorPositionChanged () |
void | updateRequest (const QRectF &rect=QRectF()) |
void | documentSizeChanged (const QSizeF &) |
void | blockCountChanged (int newBlockCount) |
void | visibilityRequest (const QRectF &rect) |
void | microFocusChanged () |
void | linkActivated (const QString &link) |
void | linkHovered (const QString &) |
void | blockMarkerHovered (const QTextBlock &block) |
void | modificationChanged (bool m) |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QWidgetTextControl (QObject *parent=nullptr) | |
QWidgetTextControl (const QString &text, QObject *parent=nullptr) | |
QWidgetTextControl (QTextDocument *doc, QObject *parent=nullptr) | |
virtual | ~QWidgetTextControl () |
void | setDocument (QTextDocument *document) |
QTextDocument * | document () const |
void | setTextCursor (const QTextCursor &cursor, bool selectionClipboard=false) |
QTextCursor | textCursor () const |
void | setTextInteractionFlags (Qt::TextInteractionFlags flags) |
Qt::TextInteractionFlags | textInteractionFlags () const |
void | mergeCurrentCharFormat (const QTextCharFormat &modifier) |
void | setCurrentCharFormat (const QTextCharFormat &format) |
QTextCharFormat | currentCharFormat () const |
bool | find (const QString &exp, QTextDocument::FindFlags options={ }) |
QString | toPlainText () const |
QString | toHtml () const |
virtual void | ensureCursorVisible () |
virtual Q_INVOKABLE QVariant | loadResource (int type, const QUrl &name) |
QMenu * | createStandardContextMenu (const QPointF &pos, QWidget *parent) |
QTextCursor | cursorForPosition (const QPointF &pos) const |
QRectF | cursorRect (const QTextCursor &cursor) const |
QRectF | cursorRect () const |
QRectF | selectionRect (const QTextCursor &cursor) const |
QRectF | selectionRect () const |
virtual QString | anchorAt (const QPointF &pos) const |
QPointF | anchorPosition (const QString &name) const |
QString | anchorAtCursor () const |
QTextBlock | blockWithMarkerAt (const QPointF &pos) const |
bool | overwriteMode () const |
void | setOverwriteMode (bool overwrite) |
int | cursorWidth () const |
void | setCursorWidth (int width) |
bool | acceptRichText () const |
void | setAcceptRichText (bool accept) |
void | setTextWidth (qreal width) |
qreal | textWidth () const |
QSizeF | size () const |
void | setOpenExternalLinks (bool open) |
bool | openExternalLinks () const |
void | setIgnoreUnusedNavigationEvents (bool ignore) |
bool | ignoreUnusedNavigationEvents () const |
void | moveCursor (QTextCursor::MoveOperation op, QTextCursor::MoveMode mode=QTextCursor::MoveAnchor) |
bool | canPaste () const |
void | setCursorIsFocusIndicator (bool b) |
bool | cursorIsFocusIndicator () const |
void | setDragEnabled (bool enabled) |
bool | isDragEnabled () const |
bool | isWordSelectionEnabled () const |
void | setWordSelectionEnabled (bool enabled) |
bool | isPreediting () |
void | print (QPagedPaintDevice *printer) const |
virtual int | hitTest (const QPointF &point, Qt::HitTestAccuracy accuracy) const |
virtual QRectF | blockBoundingRect (const QTextBlock &block) const |
QAbstractTextDocumentLayout::PaintContext | getPaintContext (QWidget *widget) const |
QPalette | palette () const |
void | setPalette (const QPalette &pal) |
virtual void | processEvent (QEvent *e, const QTransform &transform, QWidget *contextWidget=nullptr) |
void | processEvent (QEvent *e, const QPointF &coordinateOffset=QPointF(), QWidget *contextWidget=nullptr) |
void | drawContents (QPainter *painter, const QRectF &rect=QRectF(), QWidget *widget=nullptr) |
void | setFocus (bool focus, Qt::FocusReason=Qt::OtherFocusReason) |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery property, QVariant argument) const |
virtual QMimeData * | createMimeDataFromSelection () const |
virtual bool | canInsertFromMimeData (const QMimeData *source) const |
virtual void | insertFromMimeData (const QMimeData *source) |
bool | setFocusToAnchor (const QTextCursor &newCursor) |
bool | setFocusToNextOrPreviousAnchor (bool next) |
bool | findNextPrevAnchor (const QTextCursor &from, bool next, QTextCursor &newAnchor) |
![]() | |
QInputControl (Type type, QObject *parent=nullptr) | |
bool | isAcceptableInput (const QKeyEvent *event) const |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Protected Member Functions | |
virtual void | timerEvent (QTimerEvent *e) override |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual bool | event (QEvent *e) override |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
![]() | |
QInputControl (Type type, QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Properties | |
QString | html |
bool | overwriteMode |
bool | acceptRichText |
int | cursorWidth |
Qt::TextInteractionFlags | textInteractionFlags |
bool | openExternalLinks |
bool | ignoreUnusedNavigationEvents |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
enum | Type { LineEdit , TextEdit } |
![]() | |
static bool | isCommonTextEditShortcut (const QKeyEvent *ke) |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 50 of file qwidgettextcontrol_p.h.
Definition at line 852 of file qwidgettextcontrol.cpp.
References d.
|
explicit |
Definition at line 859 of file qwidgettextcontrol.cpp.
References d, Qt::RichText, and text.
|
explicit |
Definition at line 866 of file qwidgettextcontrol.cpp.
References d, and Qt::RichText.
|
virtual |
Definition at line 873 of file qwidgettextcontrol.cpp.
bool QWidgetTextControl::acceptRichText | ( | ) | const |
Definition at line 2478 of file qwidgettextcontrol.cpp.
References d.
|
slot |
Definition at line 3145 of file qwidgettextcontrol.cpp.
References d.
Referenced by QGraphicsTextItem::adjustSize(), and QLabelPrivate::sizeForWidth().
Reimplemented in QPlainTextEditControl.
Definition at line 2432 of file qwidgettextcontrol.cpp.
Referenced by createStandardContextMenu().
QString QWidgetTextControl::anchorAtCursor | ( | ) | const |
Definition at line 2438 of file qwidgettextcontrol.cpp.
References d.
Definition at line 3116 of file qwidgettextcontrol.cpp.
References QSet< T >::begin(), QTextFragment::charFormat(), d, it, and QTextFragment::position().
Definition at line 3267 of file qwidgettextcontrol.cpp.
References Qt::AutoText, d, and text.
Referenced by QPlainTextEditPrivate::append().
Definition at line 3273 of file qwidgettextcontrol.cpp.
References d, html, and Qt::RichText.
Referenced by QPlainTextEditPrivate::append().
Definition at line 3279 of file qwidgettextcontrol.cpp.
References d, Qt::PlainText, and text.
Referenced by QPlainTextEditPrivate::append().
|
virtual |
Reimplemented in QPlainTextEditControl.
Definition at line 3396 of file qwidgettextcontrol.cpp.
References d.
Referenced by selectionRect().
|
signal |
Referenced by QPlainTextEditPrivate::init(), and QWidgetTextControlPrivate::setContent().
|
signal |
QTextBlock QWidgetTextControl::blockWithMarkerAt | ( | const QPointF & | pos | ) | const |
Definition at line 2445 of file qwidgettextcontrol.cpp.
|
virtual |
Reimplemented in QPlainTextEditControl, and QTextEditControl.
Definition at line 2700 of file qwidgettextcontrol.cpp.
References d.
Referenced by QPlainTextEditControl::canInsertFromMimeData(), QTextEditControl::canInsertFromMimeData(), and canPaste().
bool QWidgetTextControl::canPaste | ( | ) | const |
Definition at line 2610 of file qwidgettextcontrol.cpp.
References canInsertFromMimeData(), QGuiApplication::clipboard(), d, QClipboard::mimeData(), and Qt::TextEditable.
Referenced by createStandardContextMenu().
|
slot |
Definition at line 957 of file qwidgettextcontrol.cpp.
References d.
|
slot |
Definition at line 940 of file qwidgettextcontrol.cpp.
References QGuiApplication::clipboard(), createMimeDataFromSelection(), d, and QClipboard::setMimeData().
Referenced by createStandardContextMenu(), and cut().
|
signal |
|
virtual |
Reimplemented in QPlainTextEditControl, and QTextEditControl.
Definition at line 2693 of file qwidgettextcontrol.cpp.
References d.
Referenced by copy(), QPlainTextEditControl::createMimeDataFromSelection(), and QTextEditControl::createMimeDataFromSelection().
Definition at line 2314 of file qwidgettextcontrol.cpp.
References ACCEL_KEY, QMenu::addAction(), QMenu::addMenu(), QMenu::addSeparator(), anchorAt(), canPaste(), QKeySequence::Copy, copy(), QKeySequence::Cut, cut(), d, Qt::LinksAccessibleByKeyboard, Qt::LinksAccessibleByMouse, menu, QObject::parent(), QKeySequence::Paste, paste(), pos, QStringLiteral, QKeySequence::Redo, redo(), QKeySequence::SelectAll, selectAll(), setActionIcon(), SLOT, QGuiApplication::styleHints(), Qt::TextEditable, Qt::TextSelectableByKeyboard, Qt::TextSelectableByMouse, tr, QKeySequence::Undo, undo(), and QStyleHints::useRtlExtensions.
Referenced by QLabelPrivate::createStandardContextMenu().
QTextCharFormat QWidgetTextControl::currentCharFormat | ( | ) | const |
Definition at line 3096 of file qwidgettextcontrol.cpp.
References d.
|
signal |
QTextCursor QWidgetTextControl::cursorForPosition | ( | const QPointF & | pos | ) | const |
Definition at line 2398 of file qwidgettextcontrol.cpp.
References d, Qt::FuzzyHit, hitTest(), and pos.
Referenced by inputMethodQuery().
bool QWidgetTextControl::cursorIsFocusIndicator | ( | ) | const |
Definition at line 2629 of file qwidgettextcontrol.cpp.
References d.
Referenced by QTextBrowserPrivate::createHistoryEntry().
|
signal |
Referenced by QPlainTextEditPrivate::init(), moveCursor(), redo(), selectAll(), setTextCursor(), and undo().
QRectF QWidgetTextControl::cursorRect | ( | ) | const |
Definition at line 2418 of file qwidgettextcontrol.cpp.
References cursorRect(), and d.
Referenced by cursorRect(), QPlainTextEditControl::cursorRect(), and inputMethodQuery().
QRectF QWidgetTextControl::cursorRect | ( | const QTextCursor & | cursor | ) | const |
Definition at line 2409 of file qwidgettextcontrol.cpp.
Referenced by QTextEditPrivate::pageUpDown().
int QWidgetTextControl::cursorWidth | ( | ) | const |
Definition at line 2463 of file qwidgettextcontrol.cpp.
References d.
|
slot |
Definition at line 931 of file qwidgettextcontrol.cpp.
References copy(), d, and Qt::TextEditable.
Referenced by createStandardContextMenu().
QTextDocument * QWidgetTextControl::document | ( | ) | const |
Definition at line 894 of file qwidgettextcontrol.cpp.
References d.
Referenced by QGraphicsTextItemPrivate::_q_mouseOnEdge(), QPlainTextEditPrivate::append(), QPlainTextEditControl::blockBoundingRect(), QGraphicsTextItemPrivate::controlOffset(), QGraphicsTextItem::document(), QLabelPrivate::ensureTextControl(), QLabelPrivate::ensureTextLayouted(), QLabelPrivate::ensureTextPopulated(), QPlainTextEditPrivate::ensureVisible(), QPlainTextEditControl::firstVisibleBlock(), QGraphicsTextItem::font(), QPlainTextEditControl::hitTest(), QTextEditPrivate::init(), QLabelPrivate::layoutRect(), QTextEditPrivate::paint(), QGraphicsTextItem::paint(), QPlainTextEditPrivate::relayoutDocument(), QTextEditPrivate::relayoutDocument(), QTextBrowserPrivate::restoreHistoryEntry(), setDocument(), QGraphicsTextItem::setFont(), QPlainTextEditPrivate::setTopBlock(), QPlainTextEditPrivate::setTopLine(), QGraphicsTextItemPrivate::textControl(), QLabelPrivate::textDirection(), toHtml(), toPlainText(), QPlainTextEditPrivate::updateDefaultTextOption(), QTextEditPrivate::updateDefaultTextOption(), and QPlainTextEditPrivate::verticalOffset().
Referenced by QWidgetTextControlPrivate::_q_documentLayoutChanged(), QPlainTextEditPrivate::init(), and QGraphicsTextItemPrivate::textControl().
void QWidgetTextControl::drawContents | ( | QPainter * | painter, |
const QRectF & | rect = QRectF() , |
||
QWidget * | widget = nullptr |
||
) |
Definition at line 3368 of file qwidgettextcontrol.cpp.
References d, getPaintContext(), Qt::IntersectClip, rect, and widget.
Referenced by QTextEditPrivate::paint(), and QGraphicsTextItem::paint().
|
virtual |
Reimplemented in QPlainTextEditControl.
Definition at line 3286 of file qwidgettextcontrol.cpp.
References d, emit, microFocusChanged(), and visibilityRequest().
Referenced by insertFromMimeData(), moveCursor(), redo(), setTextCursor(), and undo().
|
overrideprotectedvirtual |
This virtual function receives events to an object and should return true if the event e was recognized and processed.
The event() function can be reimplemented to customize the behavior of an object.
Make sure you call the parent event class implementation for all the events you did not handle.
Example:
Reimplemented from QObject.
Definition at line 1165 of file qwidgettextcontrol.cpp.
References e, and QObject::event().
bool QWidgetTextControl::find | ( | const QString & | exp, |
QTextDocument::FindFlags | options = { } |
||
) |
Definition at line 3151 of file qwidgettextcontrol.cpp.
References d, QTextCursor::isNull(), and setTextCursor().
bool QWidgetTextControl::findNextPrevAnchor | ( | const QTextCursor & | from, |
bool | next, | ||
QTextCursor & | newAnchor | ||
) |
Definition at line 2753 of file qwidgettextcontrol.cpp.
References QTextFormat::AnchorHref, QTextBlock::begin(), QTextFragment::charFormat(), d, QTextBlock::end(), fmt, QTextBlock::isValid(), it, QTextCursor::KeepAnchor, QTextBlock::length(), QTextFragment::length(), QTextBlock::next(), next, QTextBlock::position(), QTextFragment::position(), QTextBlock::previous(), qMax(), QTextCursor::selectionEnd(), QTextCursor::selectionStart(), and QTextCursor::setPosition().
Referenced by setFocusToNextOrPreviousAnchor().
QAbstractTextDocumentLayout::PaintContext QWidgetTextControl::getPaintContext | ( | QWidget * | widget | ) | const |
Definition at line 3306 of file qwidgettextcontrol.cpp.
References QPalette::Active, QList< T >::append(), d, QTextFormat::FullWidthSelection, QPalette::Highlight, QPalette::HighlightedText, QPalette::Inactive, QStyleOption::initFrom(), opt, QWidget::palette, QStyleOption::palette, qt_styleSheet(), ret, selection, QStyle::SH_RichText_FullWidthSelection, QStyle::SH_TextControl_FocusIndicatorTextCharFormat, QApplication::style(), QWidget::style(), QStyle::styleHint(), and widget.
Referenced by drawContents().
|
virtual |
Reimplemented in QPlainTextEditControl.
Definition at line 3390 of file qwidgettextcontrol.cpp.
References d.
Referenced by cursorForPosition().
bool QWidgetTextControl::ignoreUnusedNavigationEvents | ( | ) | const |
Definition at line 2586 of file qwidgettextcontrol.cpp.
References d.
|
virtual |
Definition at line 2155 of file qwidgettextcontrol.cpp.
References argument, QTextCursor::block(), QTextCursor::blockNumber(), cursorForPosition(), cursorRect(), d, Qt::ImAbsolutePosition, Qt::ImAnchorPosition, Qt::ImAnchorRectangle, Qt::ImCurrentSelection, Qt::ImCursorPosition, Qt::ImCursorRectangle, Qt::ImFont, Qt::ImMaximumTextLength, Qt::ImSurroundingText, Qt::ImTextAfterCursor, Qt::ImTextBeforeCursor, QPointF::isNull(), QTextBlock::length(), QString::mid(), QTextCursor::movePosition(), QTextCursor::NextBlock, QTextBlock::position(), position(), QTextCursor::PreviousBlock, property, and QTextBlock::text().
Referenced by QGraphicsTextItem::inputMethodQuery().
Reimplemented in QPlainTextEditControl, and QTextEditControl.
Definition at line 2712 of file qwidgettextcontrol.cpp.
References d, ensureCursorVisible(), QTextDocumentFragment::fromHtml(), QTextDocumentFragment::fromPlainText(), QString::fromUtf8(), QString::isNull(), text, and Qt::TextEditable.
Referenced by QPlainTextEditControl::insertFromMimeData(), QTextEditControl::insertFromMimeData(), and paste().
Definition at line 3109 of file qwidgettextcontrol.cpp.
Definition at line 3102 of file qwidgettextcontrol.cpp.
bool QWidgetTextControl::isDragEnabled | ( | ) | const |
Definition at line 2642 of file qwidgettextcontrol.cpp.
References d.
bool QWidgetTextControl::isPreediting | ( | ) |
Definition at line 2660 of file qwidgettextcontrol.cpp.
Referenced by QTextEditPrivate::paint().
bool QWidgetTextControl::isWordSelectionEnabled | ( | ) | const |
Definition at line 2654 of file qwidgettextcontrol.cpp.
References d.
Reimplemented in QPlainTextEditControl, and QTextEditControl.
Definition at line 1379 of file qwidgettextcontrol.cpp.
References Q_UNUSED.
Referenced by QTextEditControl::loadResource().
void QWidgetTextControl::mergeCurrentCharFormat | ( | const QTextCharFormat & | modifier | ) |
Definition at line 3082 of file qwidgettextcontrol.cpp.
References d.
|
signal |
Referenced by ensureCursorVisible(), QPlainTextEditControl::ensureCursorVisible(), QPlainTextEditPrivate::init(), redo(), and undo().
|
signal |
Referenced by QPlainTextEditPrivate::init(), and QWidgetTextControlPrivate::setContent().
void QWidgetTextControl::moveCursor | ( | QTextCursor::MoveOperation | op, |
QTextCursor::MoveMode | mode = QTextCursor::MoveAnchor |
||
) |
Definition at line 2598 of file qwidgettextcontrol.cpp.
References cursorPositionChanged(), d, emit, and ensureCursorVisible().
bool QWidgetTextControl::openExternalLinks | ( | ) | const |
Definition at line 2580 of file qwidgettextcontrol.cpp.
References d.
bool QWidgetTextControl::overwriteMode | ( | ) | const |
Definition at line 2451 of file qwidgettextcontrol.cpp.
References d.
QPalette QWidgetTextControl::palette | ( | ) | const |
Definition at line 3294 of file qwidgettextcontrol.cpp.
References d.
Referenced by QGraphicsTextItem::defaultTextColor(), and QTextEditPrivate::paint().
|
slot |
Definition at line 949 of file qwidgettextcontrol.cpp.
References QGuiApplication::clipboard(), insertFromMimeData(), and QClipboard::mimeData().
Referenced by createStandardContextMenu().
void QWidgetTextControl::print | ( | QPagedPaintDevice * | printer | ) | const |
Definition at line 2666 of file qwidgettextcontrol.cpp.
References d, QTextDocument::defaultFont, QTextDocument::documentLayout(), QTextDocument::DocumentTitle, QPagedPaintDevicePrivate::get(), QTextCursor::insertFragment(), QTextDocument::metaInformation(), QTextDocument::pageSize, QTextDocument::print(), QTextDocument::resourceProvider(), QTextDocument::setDefaultFont(), QTextDocument::setMetaInformation(), QTextDocument::setPageSize(), QTextDocument::setResourceProvider(), QTextDocument::setUseDesignMetrics(), and QTextDocument::useDesignMetrics.
void QWidgetTextControl::processEvent | ( | QEvent * | e, |
const QPointF & | coordinateOffset = QPointF() , |
||
QWidget * | contextWidget = nullptr |
||
) |
Definition at line 979 of file qwidgettextcontrol.cpp.
References e, processEvent(), QPointF::x(), and QPointF::y().
|
virtual |
Definition at line 986 of file qwidgettextcontrol.cpp.
References QEvent::accept(), QGraphicsSceneDragDropEvent::acceptProposedAction(), QSinglePointEvent::button(), QGraphicsSceneMouseEvent::button(), QSinglePointEvent::buttons(), QGraphicsSceneMouseEvent::buttons(), QEvent::ContextMenu, d, QEvent::DragEnter, QEvent::DragLeave, QEvent::DragMove, QEvent::Drop, QGraphicsSceneDragDropEvent::dropAction(), e, QEvent::EnabledChange, QEvent::FocusIn, QEvent::FocusOut, QContextMenuEvent::globalPos(), QHelpEvent::globalPos(), QSinglePointEvent::globalPosition(), QEvent::GraphicsSceneContextMenu, QEvent::GraphicsSceneDragEnter, QEvent::GraphicsSceneDragLeave, QEvent::GraphicsSceneDragMove, QEvent::GraphicsSceneDrop, QEvent::GraphicsSceneHelp, QEvent::GraphicsSceneHoverEnter, QEvent::GraphicsSceneHoverLeave, QEvent::GraphicsSceneHoverMove, QEvent::GraphicsSceneMouseDoubleClick, QEvent::GraphicsSceneMouseMove, QEvent::GraphicsSceneMousePress, QEvent::GraphicsSceneMouseRelease, QEvent::InputMethod, QInputControl::isCommonTextEditShortcut(), QEvent::KeyPress, QGraphicsSceneDragDropEvent::mimeData(), QInputEvent::modifiers(), QGraphicsSceneMouseEvent::modifiers(), QGraphicsSceneHoverEvent::modifiers(), QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseMove, Qt::NoButton, Qt::NoTextInteraction, QContextMenuEvent::pos(), QHelpEvent::pos(), QGraphicsSceneMouseEvent::pos(), QGraphicsSceneContextMenuEvent::pos(), QGraphicsSceneHoverEvent::pos(), QGraphicsSceneDragDropEvent::pos(), QSinglePointEvent::position(), QGraphicsSceneMouseEvent::screenPos(), QGraphicsSceneContextMenuEvent::screenPos(), QGraphicsSceneHoverEvent::screenPos(), QEvent::ShortcutOverride, QGraphicsSceneDragDropEvent::source(), Qt::TextEditable, QEvent::ToolTip, QPointF::toPoint(), and QGraphicsSceneEvent::widget().
Referenced by processEvent(), QGraphicsTextItemPrivate::sendControlEvent(), QLabelPrivate::sendControlEvent(), QPlainTextEditPrivate::sendControlEvent(), QTextEditPrivate::sendControlEvent(), and setFocus().
|
slot |
Definition at line 840 of file qwidgettextcontrol.cpp.
References cursorPositionChanged(), d, emit, ensureCursorVisible(), and microFocusChanged().
Referenced by createStandardContextMenu().
|
signal |
Referenced by QPlainTextEditPrivate::init(), and QWidgetTextControlPrivate::setContent().
|
slot |
Definition at line 966 of file qwidgettextcontrol.cpp.
References cursorPositionChanged(), d, QTextCursor::Document, emit, qAbs(), and updateRequest().
Referenced by createStandardContextMenu().
|
signal |
QRectF QWidgetTextControl::selectionRect | ( | ) | const |
Definition at line 1549 of file qwidgettextcontrol.cpp.
References d, and selectionRect().
Referenced by selectionRect(), setFocusToAnchor(), and setFocusToNextOrPreviousAnchor().
QRectF QWidgetTextControl::selectionRect | ( | const QTextCursor & | cursor | ) | const |
Definition at line 1465 of file qwidgettextcontrol.cpp.
References blockBoundingRect(), boundingRectOfFloatsInSelection(), cursor, d, i, QTextBlock::isValid(), layout, QTextBlock::layout(), QRectF::left(), QTextLayout::lineCount(), QTextLayout::lineForTextPosition(), QTextLine::lineNumber(), QTextBlock::position(), position(), qMax(), qMin(), and QRectF::right().
void QWidgetTextControl::setAcceptRichText | ( | bool | accept | ) |
Definition at line 2484 of file qwidgettextcontrol.cpp.
References d.
Referenced by QPlainTextEditControl::QPlainTextEditControl().
void QWidgetTextControl::setCurrentCharFormat | ( | const QTextCharFormat & | format | ) |
Definition at line 3089 of file qwidgettextcontrol.cpp.
References d.
void QWidgetTextControl::setCursorIsFocusIndicator | ( | bool | b | ) |
Definition at line 2622 of file qwidgettextcontrol.cpp.
References d.
Referenced by QTextBrowserPrivate::restoreHistoryEntry().
void QWidgetTextControl::setCursorWidth | ( | int | width | ) |
Definition at line 2469 of file qwidgettextcontrol.cpp.
References d, QStyle::pixelMetric(), QStyle::PM_TextCursorWidth, and QApplication::style().
void QWidgetTextControl::setDocument | ( | QTextDocument * | document | ) |
Definition at line 877 of file qwidgettextcontrol.cpp.
References d, document(), and Qt::RichText.
Referenced by QPlainTextEditPrivate::init(), and QGraphicsTextItem::setDocument().
void QWidgetTextControl::setDragEnabled | ( | bool | enabled | ) |
Definition at line 2636 of file qwidgettextcontrol.cpp.
void QWidgetTextControl::setFocus | ( | bool | focus, |
Qt::FocusReason | reason = Qt::OtherFocusReason |
||
) |
Definition at line 2228 of file qwidgettextcontrol.cpp.
References focus, QEvent::FocusIn, QEvent::FocusOut, and processEvent().
Referenced by QLabelPrivate::ensureTextControl().
bool QWidgetTextControl::setFocusToAnchor | ( | const QTextCursor & | newCursor | ) |
Definition at line 3039 of file qwidgettextcontrol.cpp.
References d, emit, QString::isEmpty(), QTextCursor::KeepAnchor, Qt::LinksAccessibleByKeyboard, QTextCursor::selectionEnd(), selectionRect(), QTextCursor::selectionStart(), updateRequest(), and visibilityRequest().
bool QWidgetTextControl::setFocusToNextOrPreviousAnchor | ( | bool | next | ) |
Definition at line 3002 of file qwidgettextcontrol.cpp.
References d, emit, QTextCursor::End, findNextPrevAnchor(), Qt::LinksAccessibleByKeyboard, next, selectionRect(), QTextCursor::Start, updateRequest(), and visibilityRequest().
Definition at line 1200 of file qwidgettextcontrol.cpp.
References d, Qt::RichText, and text.
Referenced by QTextEditPrivate::init(), and QGraphicsTextItem::setHtml().
void QWidgetTextControl::setIgnoreUnusedNavigationEvents | ( | bool | ignore | ) |
Definition at line 2592 of file qwidgettextcontrol.cpp.
References d.
void QWidgetTextControl::setOpenExternalLinks | ( | bool | open | ) |
Definition at line 2574 of file qwidgettextcontrol.cpp.
Referenced by QLabelPrivate::ensureTextControl(), and QGraphicsTextItem::setOpenExternalLinks().
void QWidgetTextControl::setOverwriteMode | ( | bool | overwrite | ) |
Definition at line 2457 of file qwidgettextcontrol.cpp.
References d.
Definition at line 3300 of file qwidgettextcontrol.cpp.
References d.
Referenced by QLabelPrivate::ensureTextControl(), QTextEditPrivate::init(), and QPlainTextEditPrivate::init().
Definition at line 1186 of file qwidgettextcontrol.cpp.
References d, Qt::PlainText, and text.
Referenced by QPlainTextEditPrivate::init(), and QGraphicsTextItem::setPlainText().
void QWidgetTextControl::setTextCursor | ( | const QTextCursor & | cursor, |
bool | selectionClipboard = false |
||
) |
Definition at line 900 of file qwidgettextcontrol.cpp.
References cursor, cursorPositionChanged(), d, emit, ensureCursorVisible(), Q_UNUSED, Qt::TextEditable, and Qt::TextSelectableByKeyboard.
Referenced by QTextEditPrivate::createAutoBulletList(), find(), QTextEditPrivate::pageUpDown(), QPlainTextEditPrivate::pageUpDown(), QTextBrowserPrivate::restoreHistoryEntry(), and QGraphicsTextItem::setTextCursor().
void QWidgetTextControl::setTextInteractionFlags | ( | Qt::TextInteractionFlags | flags | ) |
Definition at line 3065 of file qwidgettextcontrol.cpp.
References d, and Qt::TextEditable.
Referenced by QLabelPrivate::ensureTextControl(), QTextBrowserPrivate::init(), QGraphicsTextItem::setTextInteractionFlags(), and QGraphicsTextItemPrivate::textControl().
Definition at line 2556 of file qwidgettextcontrol.cpp.
References d.
Referenced by QGraphicsTextItem::setTextWidth(), and QLabelPrivate::sizeForWidth().
void QWidgetTextControl::setWordSelectionEnabled | ( | bool | enabled | ) |
Definition at line 2648 of file qwidgettextcontrol.cpp.
QSizeF QWidgetTextControl::size | ( | ) | const |
Definition at line 2568 of file qwidgettextcontrol.cpp.
References d.
Referenced by QGraphicsTextItem::setDocument(), QLabelPrivate::sizeForWidth(), and QGraphicsTextItemPrivate::textControl().
|
signal |
Referenced by QPlainTextEditPrivate::init(), and QWidgetTextControlPrivate::setContent().
QTextCursor QWidgetTextControl::textCursor | ( | ) | const |
Definition at line 923 of file qwidgettextcontrol.cpp.
References d.
Referenced by QTextEditPrivate::createAutoBulletList(), QTextBrowserPrivate::createHistoryEntry(), QPlainTextEditControl::cursorRect(), QPlainTextEditPrivate::ensureCursorVisible(), QTextEditPrivate::pageUpDown(), QPlainTextEditPrivate::pageUpDown(), QTextBrowserPrivate::restoreHistoryEntry(), and QGraphicsTextItem::textCursor().
Qt::TextInteractionFlags QWidgetTextControl::textInteractionFlags | ( | ) | const |
Definition at line 3076 of file qwidgettextcontrol.cpp.
References d.
qreal QWidgetTextControl::textWidth | ( | ) | const |
Definition at line 2562 of file qwidgettextcontrol.cpp.
References d.
Referenced by QLabelPrivate::sizeForWidth(), and QGraphicsTextItem::textWidth().
|
overrideprotectedvirtual |
This event handler can be reimplemented in a subclass to receive timer events for the object.
QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.
Reimplemented from QObject.
Definition at line 1170 of file qwidgettextcontrol.cpp.
References d, e, QStyle::SH_BlinkCursorWhenTextSelected, QApplication::style(), and QStyle::styleHint().
QString QWidgetTextControl::toHtml | ( | ) | const |
Definition at line 3181 of file qwidgettextcontrol.cpp.
References document(), and QTextDocument::toHtml().
Referenced by QGraphicsTextItem::toHtml().
QString QWidgetTextControl::toPlainText | ( | ) | const |
Definition at line 3175 of file qwidgettextcontrol.cpp.
References document(), and QTextDocument::toPlainText().
Referenced by QGraphicsTextItem::toPlainText().
|
slot |
Definition at line 828 of file qwidgettextcontrol.cpp.
References cursorPositionChanged(), d, emit, ensureCursorVisible(), and microFocusChanged().
Referenced by createStandardContextMenu().
|
signal |
Referenced by QPlainTextEditPrivate::init(), and QWidgetTextControlPrivate::setContent().
Referenced by QWidgetTextControlPrivate::_q_documentLayoutChanged(), QPlainTextEditPrivate::init(), selectAll(), setFocusToAnchor(), setFocusToNextOrPreviousAnchor(), and QGraphicsTextItemPrivate::textControl().
Referenced by ensureCursorVisible(), setFocusToAnchor(), setFocusToNextOrPreviousAnchor(), and QGraphicsTextItemPrivate::textControl().
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
Referenced by appendHtml().
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
Referenced by QGraphicsTextItem::openExternalLinks().
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
Referenced by QPlainTextEditControl::hitTest().
|
readwrite |
Definition at line 284 of file qwidgettextcontrol_p.h.
Referenced by QGraphicsTextItem::mousePressEvent(), QGraphicsTextItem::mouseReleaseEvent(), and QGraphicsTextItem::textInteractionFlags().