Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QPlainTextEditPrivate Class Reference

#include <qplaintextedit_p.h>

Inheritance diagram for QPlainTextEditPrivate:
Collaboration diagram for QPlainTextEditPrivate:

Public Member Functions

 QPlainTextEditPrivate ()
void init (const QString &txt=QString())
void repaintContents (const QRectF &contentsRect)
void updatePlaceholderVisibility ()
QPoint mapToContents (const QPoint &point) const
void adjustScrollbars ()
void verticalScrollbarActionTriggered (int action)
void ensureViewportLayouted ()
void relayoutDocument ()
void pageUpDown (QTextCursor::MoveOperation op, QTextCursor::MoveMode moveMode, bool moveCursor=true)
int horizontalOffset () const
qreal verticalOffset (int topBlock, int topLine) const
qreal verticalOffset () const
void sendControlEvent (QEvent *e)
void updateDefaultTextOption ()
void setTopLine (int visualTopLine, int dx=0)
void setTopBlock (int newTopBlock, int newTopLine, int dx=0)
void ensureVisible (int position, bool center, bool forceCenter=false)
void ensureCursorVisible (bool center=false)
void updateViewport ()
void append (const QString &text, Qt::TextFormat format=Qt::AutoText)
void cursorPositionChanged ()
void modificationChanged (bool)
bool placeHolderTextToBeShown () const

Public Attributes

QBasicTimer autoScrollTimer
QPoint autoScrollDragPos
QString placeholderText
QPlainTextEditControlcontrol = nullptr
qreal topLineFracture = 0
qreal pageUpDownLastCursorY = 0
QPlainTextEdit::LineWrapMode lineWrap = QPlainTextEdit::WidgetWidth
QTextOption::WrapMode wordWrap = QTextOption::WrapAtWordBoundaryOrAnywhere
int originalOffsetY = 0
int topLine = 0
uint tabChangesFocus: 1
uint showCursorOnInitialShow: 1
uint backgroundVisible: 1
uint centerOnScroll: 1
uint inDrag: 1
uint clickCausedFocus: 1
uint pageUpDownLastCursorYIsValid: 1
uint placeholderTextShown: 1
QPointer< QPlainTextDocumentLayoutdocumentLayoutPtr

Detailed Description

Definition at line 83 of file qplaintextedit_p.h.

Constructor & Destructor Documentation

◆ QPlainTextEditPrivate()

QPlainTextEditPrivate::QPlainTextEditPrivate ( )

Definition at line 727 of file qplaintextedit.cpp.

Member Function Documentation

◆ adjustScrollbars()

void QPlainTextEditPrivate::adjustScrollbars ( )

Referenced by append().

Here is the caller graph for this function:

◆ append()

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

Definition at line 2983 of file qplaintextedit.cpp.

References adjustScrollbars(), control, and QPlainTextEditControl::topBlock.

Here is the call graph for this function:

◆ cursorPositionChanged()

void QPlainTextEditPrivate::cursorPositionChanged ( )

Definition at line 421 of file qplaintextedit.cpp.

◆ ensureCursorVisible()

void QPlainTextEditPrivate::ensureCursorVisible ( bool center = false)

Definition at line 3074 of file qplaintextedit.cpp.

References control, ensureVisible(), and horizontalOffset().

Referenced by pageUpDown().

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

◆ ensureViewportLayouted()

void QPlainTextEditPrivate::ensureViewportLayouted ( )

Definition at line 1018 of file qplaintextedit.cpp.

◆ ensureVisible()

void QPlainTextEditPrivate::ensureVisible ( int position,
bool center,
bool forceCenter = false )

Definition at line 668 of file qplaintextedit.cpp.

References setTopBlock().

Referenced by ensureCursorVisible().

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

◆ horizontalOffset()

int QPlainTextEditPrivate::horizontalOffset ( ) const
inline

Definition at line 103 of file qplaintextedit_p.h.

Referenced by ensureCursorVisible(), and repaintContents().

Here is the caller graph for this function:

◆ init()

void QPlainTextEditPrivate::init ( const QString & txt = QString())

Definition at line 739 of file qplaintextedit.cpp.

References control.

◆ mapToContents()

QPoint QPlainTextEditPrivate::mapToContents ( const QPoint & point) const
inline

Definition at line 93 of file qplaintextedit_p.h.

◆ modificationChanged()

void QPlainTextEditPrivate::modificationChanged ( bool )

◆ pageUpDown()

void QPlainTextEditPrivate::pageUpDown ( QTextCursor::MoveOperation op,
QTextCursor::MoveMode moveMode,
bool moveCursor = true )

Definition at line 832 of file qplaintextedit.cpp.

References control, ensureCursorVisible(), setTopBlock(), QPlainTextEditControl::topBlock, and topLine.

Here is the call graph for this function:

◆ placeHolderTextToBeShown()

bool QPlainTextEditPrivate::placeHolderTextToBeShown ( ) const
inline

Definition at line 150 of file qplaintextedit_p.h.

◆ relayoutDocument()

void QPlainTextEditPrivate::relayoutDocument ( )

Definition at line 1849 of file qplaintextedit.cpp.

References control.

◆ repaintContents()

void QPlainTextEditPrivate::repaintContents ( const QRectF & contentsRect)

Definition at line 812 of file qplaintextedit.cpp.

References horizontalOffset(), updateViewport(), and QPainter::viewport().

Here is the call graph for this function:

◆ sendControlEvent()

void QPlainTextEditPrivate::sendControlEvent ( QEvent * e)
inline

Definition at line 108 of file qplaintextedit_p.h.

◆ setTopBlock()

void QPlainTextEditPrivate::setTopBlock ( int newTopBlock,
int newTopLine,
int dx = 0 )

Definition at line 615 of file qplaintextedit.cpp.

References control, QPlainTextEditControl::topBlock, topLine, and QPainter::viewport().

Referenced by ensureVisible(), pageUpDown(), and setTopLine().

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

◆ setTopLine()

void QPlainTextEditPrivate::setTopLine ( int visualTopLine,
int dx = 0 )

Definition at line 606 of file qplaintextedit.cpp.

References control, and setTopBlock().

Here is the call graph for this function:

◆ updateDefaultTextOption()

void QPlainTextEditPrivate::updateDefaultTextOption ( )

Definition at line 2021 of file qplaintextedit.cpp.

References control.

◆ updatePlaceholderVisibility()

void QPlainTextEditPrivate::updatePlaceholderVisibility ( )

Definition at line 800 of file qplaintextedit.cpp.

References QPainter::viewport().

Here is the call graph for this function:

◆ updateViewport()

void QPlainTextEditPrivate::updateViewport ( )

Definition at line 720 of file qplaintextedit.cpp.

References QPainter::viewport().

Referenced by repaintContents().

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

◆ verticalOffset() [1/2]

qreal QPlainTextEditPrivate::verticalOffset ( ) const

Definition at line 491 of file qplaintextedit.cpp.

◆ verticalOffset() [2/2]

qreal QPlainTextEditPrivate::verticalOffset ( int topBlock,
int topLine ) const

Definition at line 467 of file qplaintextedit.cpp.

References control.

◆ verticalScrollbarActionTriggered()

void QPlainTextEditPrivate::verticalScrollbarActionTriggered ( int action)

Definition at line 432 of file qplaintextedit.cpp.

Member Data Documentation

◆ autoScrollDragPos

QPoint QPlainTextEditPrivate::autoScrollDragPos

Definition at line 117 of file qplaintextedit_p.h.

◆ autoScrollTimer

QBasicTimer QPlainTextEditPrivate::autoScrollTimer

Definition at line 113 of file qplaintextedit_p.h.

◆ backgroundVisible

uint QPlainTextEditPrivate::backgroundVisible

Definition at line 130 of file qplaintextedit_p.h.

◆ centerOnScroll

uint QPlainTextEditPrivate::centerOnScroll

Definition at line 131 of file qplaintextedit_p.h.

◆ clickCausedFocus

uint QPlainTextEditPrivate::clickCausedFocus

Definition at line 133 of file qplaintextedit_p.h.

◆ control

◆ documentLayoutPtr

QPointer<QPlainTextDocumentLayout> QPlainTextEditPrivate::documentLayoutPtr

Definition at line 144 of file qplaintextedit_p.h.

◆ inDrag

uint QPlainTextEditPrivate::inDrag

Definition at line 132 of file qplaintextedit_p.h.

◆ lineWrap

QPlainTextEdit::LineWrapMode QPlainTextEditPrivate::lineWrap = QPlainTextEdit::WidgetWidth

Definition at line 123 of file qplaintextedit_p.h.

◆ originalOffsetY

int QPlainTextEditPrivate::originalOffsetY = 0

Definition at line 125 of file qplaintextedit_p.h.

◆ pageUpDownLastCursorY

qreal QPlainTextEditPrivate::pageUpDownLastCursorY = 0

Definition at line 122 of file qplaintextedit_p.h.

◆ pageUpDownLastCursorYIsValid

uint QPlainTextEditPrivate::pageUpDownLastCursorYIsValid

Definition at line 134 of file qplaintextedit_p.h.

◆ placeholderText

QString QPlainTextEditPrivate::placeholderText

Definition at line 118 of file qplaintextedit_p.h.

◆ placeholderTextShown

uint QPlainTextEditPrivate::placeholderTextShown

Definition at line 135 of file qplaintextedit_p.h.

◆ showCursorOnInitialShow

uint QPlainTextEditPrivate::showCursorOnInitialShow

Definition at line 129 of file qplaintextedit_p.h.

◆ tabChangesFocus

uint QPlainTextEditPrivate::tabChangesFocus

Definition at line 128 of file qplaintextedit_p.h.

◆ topLine

int QPlainTextEditPrivate::topLine = 0

Definition at line 126 of file qplaintextedit_p.h.

Referenced by pageUpDown(), and setTopBlock().

◆ topLineFracture

qreal QPlainTextEditPrivate::topLineFracture = 0

Definition at line 121 of file qplaintextedit_p.h.

◆ wordWrap

Definition at line 124 of file qplaintextedit_p.h.


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