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

#include <qwidgetlinecontrol_p.h>

Inheritance diagram for QWidgetLineControl:
Collaboration diagram for QWidgetLineControl:

Public Types

enum  DrawFlags { DrawText = 0x01 , DrawSelections = 0x02 , DrawCursor = 0x04 , DrawAll = DrawText | DrawSelections | DrawCursor }
Public Types inherited from QInputControl
enum  Type { LineEdit , TextEdit }

Signals

void cursorPositionChanged (int, int)
void selectionChanged ()
void displayTextChanged (const QString &)
void textChanged (const QString &)
void textEdited (const QString &)
void resetInputContext ()
void updateMicroFocus ()
void accepted ()
void editingFinished ()
void updateNeeded (const QRect &)
void inputRejected ()
Signals inherited from QObject
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

 QWidgetLineControl (const QString &txt=QString())
 ~QWidgetLineControl ()
void setAccessibleObject (QObject *object)
QObjectaccessibleObject ()
int nextMaskBlank (int pos)
int prevMaskBlank (int pos)
bool isUndoAvailable () const
bool isRedoAvailable () const
void clearUndo ()
bool isModified () const
void setModified (bool modified)
bool allSelected () const
bool hasSelectedText () const
int width () const
int height () const
int ascent () const
qreal naturalTextWidth () const
void setSelection (int start, int length)
QString selectedText () const
QString textBeforeSelection () const
QString textAfterSelection () const
int selectionStart () const
int selectionEnd () const
bool inSelection (int x) const
void removeSelection ()
int start () const
int end () const
void copy (QClipboard::Mode mode=QClipboard::Clipboard) const
void paste (QClipboard::Mode mode=QClipboard::Clipboard)
int cursor () const
int preeditCursor () const
int cursorWidth () const
void setCursorWidth (int value)
Qt::CursorMoveStyle cursorMoveStyle () const
void setCursorMoveStyle (Qt::CursorMoveStyle style)
void moveCursor (int pos, bool mark=false)
void cursorForward (bool mark, int steps)
void cursorWordForward (bool mark)
void cursorWordBackward (bool mark)
void home (bool mark)
void end (bool mark)
int xToPos (int x, QTextLine::CursorPosition=QTextLine::CursorBetweenCharacters) const
QRect rectForPos (int pos) const
QRect cursorRect () const
QRect anchorRect () const
qreal cursorToX (int cursor) const
qreal cursorToX () const
bool isReadOnly () const
void setReadOnly (bool enable)
QString text () const
void setText (const QString &txt)
void commitPreedit ()
QString displayText () const
QString surroundingText () const
void backspace ()
void del ()
void deselect ()
void selectAll ()
void insert (const QString &)
void clear ()
void undo ()
void redo ()
void selectWordAtPos (int)
uint echoMode () const
void setEchoMode (uint mode)
int maxLength () const
void setMaxLength (int maxLength)
const QValidatorvalidator () const
void setValidator (const QValidator *v)
int cursorPosition () const
void setCursorPosition (int pos)
bool hasAcceptableInput () const
bool fixup ()
QString inputMask () const
void setInputMask (const QString &mask)
bool composeMode () const
void setPreeditArea (int cursor, const QString &text)
QString preeditAreaText () const
void updatePasswordEchoEditing (bool editing)
bool passwordEchoEditing () const
QChar passwordCharacter () const
void setPasswordCharacter (QChar character)
int passwordMaskDelay () const
void setPasswordMaskDelay (int delay)
Qt::LayoutDirection layoutDirection () const
void setLayoutDirection (Qt::LayoutDirection direction)
void setFont (const QFont &font)
void processInputMethodEvent (QInputMethodEvent *event)
void processKeyEvent (QKeyEvent *ev)
void setBlinkingCursorEnabled (bool enable)
void updateCursorBlinking ()
void resetCursorBlinkTimer ()
bool cursorBlinkStatus () const
QString cancelText () const
void setCancelText (const QString &text)
const QPalettepalette () const
void setPalette (const QPalette &p)
void draw (QPainter *, const QPoint &, const QRect &, int flags=DrawAll)
void processShortcutOverrideEvent (QKeyEvent *ke)
QTextLayouttextLayout () const
Public Member Functions inherited from QInputControl
 QInputControl (Type type, QObject *parent=nullptr)
bool isAcceptableInput (const QKeyEvent *event) const
Public Member Functions inherited from QObject
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< QStringbindableObjectName ()
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 isQmlObjectType () const
 Returns whether the object has been created by the QML engine or ownership has been explicitly set via QJSEngine::setObjectOwnership().
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).
QThreadthread () const
 Returns the thread in which the object lives.
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
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::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
void killTimer (int id)
 Kills the timer with timer identifier, id.
void killTimer (Qt::TimerId id)
template<typename T>
findChild (QAnyStringView aName, 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 (QAnyStringView 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>
findChild (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.
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 QObjectListchildren () 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< QByteArraydynamicPropertyNames () const
QBindingStoragebindingStorage ()
const QBindingStoragebindingStorage () const
QObjectparent () 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 *event) override
 This event handler can be reimplemented in a subclass to receive timer events for the object.
Protected Member Functions inherited from QInputControl
 QInputControl (Type type, QObjectPrivate &dd, QObject *parent=nullptr)
Protected Member Functions inherited from QObject
QObjectsender () 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 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)

Friends

class QLineEdit

Additional Inherited Members

Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
Static Public Member Functions inherited from QInputControl
static bool isCommonTextEditShortcut (const QKeyEvent *ke)
static QVariant selectionWrapper (QMimeData *mimeData)
static QMimeDatamimeDataForInputEvent (QInputMethodEvent *event)
Static Public Member Functions inherited from QObject
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)
Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
Properties inherited from QObject
QString objectName
 the name of this object

Detailed Description

Definition at line 52 of file qwidgetlinecontrol_p.h.

Member Enumeration Documentation

◆ DrawFlags

Enumerator
DrawText 
DrawSelections 
DrawCursor 
DrawAll 

Definition at line 356 of file qwidgetlinecontrol_p.h.

Constructor & Destructor Documentation

◆ QWidgetLineControl()

QWidgetLineControl::QWidgetLineControl ( const QString & txt = QString())
inline

Definition at line 57 of file qwidgetlinecontrol_p.h.

◆ ~QWidgetLineControl()

QWidgetLineControl::~QWidgetLineControl ( )
inline

Definition at line 76 of file qwidgetlinecontrol_p.h.

Member Function Documentation

◆ accepted

void QWidgetLineControl::accepted ( )
signal

◆ accessibleObject()

QObject * QWidgetLineControl::accessibleObject ( )
inline

Definition at line 91 of file qwidgetlinecontrol_p.h.

◆ allSelected()

bool QWidgetLineControl::allSelected ( ) const
inline

Definition at line 119 of file qwidgetlinecontrol_p.h.

◆ anchorRect()

QRect QWidgetLineControl::anchorRect ( ) const

Returns the bounds of the current anchor

Definition at line 407 of file qwidgetlinecontrol.cpp.

◆ ascent()

int QWidgetLineControl::ascent ( ) const
inline

Definition at line 124 of file qwidgetlinecontrol_p.h.

◆ backspace()

void QWidgetLineControl::backspace ( )

Handles the behavior for the backspace key or function. Removes the current selection if there is a selection, otherwise removes the character prior to the cursor position.

See also
del()

Definition at line 177 of file qwidgetlinecontrol.cpp.

◆ cancelText()

QString QWidgetLineControl::cancelText ( ) const
inline

Definition at line 350 of file qwidgetlinecontrol_p.h.

◆ clear()

void QWidgetLineControl::clear ( )

Clears the line control text.

Definition at line 243 of file qwidgetlinecontrol.cpp.

◆ clearUndo()

void QWidgetLineControl::clearUndo ( )
inline

Definition at line 114 of file qwidgetlinecontrol_p.h.

◆ commitPreedit()

void QWidgetLineControl::commitPreedit ( )

Definition at line 150 of file qwidgetlinecontrol.cpp.

◆ composeMode()

bool QWidgetLineControl::composeMode ( ) const
inline

Definition at line 307 of file qwidgetlinecontrol_p.h.

◆ copy()

void QWidgetLineControl::copy ( QClipboard::Mode mode = QClipboard::Clipboard) const

Copies the currently selected text into the clipboard using the given mode.

Note
If the echo mode is set to a mode other than Normal then copy will not work. This is to prevent using copy as a method of bypassing password features of the line control.

Definition at line 119 of file qwidgetlinecontrol.cpp.

◆ cursor()

int QWidgetLineControl::cursor ( ) const
inline

Definition at line 161 of file qwidgetlinecontrol_p.h.

◆ cursorBlinkStatus()

bool QWidgetLineControl::cursorBlinkStatus ( ) const
inline

Definition at line 348 of file qwidgetlinecontrol_p.h.

◆ cursorForward()

void QWidgetLineControl::cursorForward ( bool mark,
int steps )
inline

Definition at line 171 of file qwidgetlinecontrol_p.h.

◆ cursorMoveStyle()

Qt::CursorMoveStyle QWidgetLineControl::cursorMoveStyle ( ) const
inline

Definition at line 167 of file qwidgetlinecontrol_p.h.

◆ cursorPosition()

int QWidgetLineControl::cursorPosition ( ) const
inline

Definition at line 280 of file qwidgetlinecontrol_p.h.

◆ cursorPositionChanged

void QWidgetLineControl::cursorPositionChanged ( int ,
int  )
signal

◆ cursorRect()

QRect QWidgetLineControl::cursorRect ( ) const

Returns the bounds of the current cursor, as defined as a between characters cursor.

Definition at line 397 of file qwidgetlinecontrol.cpp.

◆ cursorToX() [1/2]

qreal QWidgetLineControl::cursorToX ( ) const
inline

Definition at line 198 of file qwidgetlinecontrol_p.h.

◆ cursorToX() [2/2]

qreal QWidgetLineControl::cursorToX ( int cursor) const
inline

Definition at line 197 of file qwidgetlinecontrol_p.h.

◆ cursorWidth()

int QWidgetLineControl::cursorWidth ( ) const
inline

Definition at line 164 of file qwidgetlinecontrol_p.h.

◆ cursorWordBackward()

void QWidgetLineControl::cursorWordBackward ( bool mark)
inline

Definition at line 187 of file qwidgetlinecontrol_p.h.

◆ cursorWordForward()

void QWidgetLineControl::cursorWordForward ( bool mark)
inline

Definition at line 186 of file qwidgetlinecontrol_p.h.

◆ del()

void QWidgetLineControl::del ( )

Handles the behavior for the delete key or function. Removes the current selection if there is a selection, otherwise removes the character after the cursor position.

See also
del()

Definition at line 210 of file qwidgetlinecontrol.cpp.

◆ deselect()

void QWidgetLineControl::deselect ( )
inline

Definition at line 234 of file qwidgetlinecontrol_p.h.

◆ displayText()

QString QWidgetLineControl::displayText ( ) const
inline

Definition at line 225 of file qwidgetlinecontrol_p.h.

◆ displayTextChanged

void QWidgetLineControl::displayTextChanged ( const QString & )
signal

◆ draw()

void QWidgetLineControl::draw ( QPainter * painter,
const QPoint & offset,
const QRect & clip,
int flags = DrawAll )

Draws the display text for the line control using the given painter, clip, and offset. Which aspects of the display text are drawn is specified by the given flags.

If the flags contain DrawSelections, then the selection or input mask backgrounds and foregrounds will be applied before drawing the text.

If the flags contain DrawCursor a cursor of the current cursorWidth() will be drawn after drawing the text.

The display text will only be drawn if the flags contain DrawText

Definition at line 608 of file qwidgetlinecontrol.cpp.

◆ echoMode()

uint QWidgetLineControl::echoMode ( ) const
inline

Definition at line 243 of file qwidgetlinecontrol_p.h.

◆ editingFinished

void QWidgetLineControl::editingFinished ( )
signal

◆ end() [1/2]

int QWidgetLineControl::end ( ) const
inline

Definition at line 154 of file qwidgetlinecontrol_p.h.

◆ end() [2/2]

void QWidgetLineControl::end ( bool mark)
inline

Definition at line 190 of file qwidgetlinecontrol_p.h.

◆ fixup()

bool QWidgetLineControl::fixup ( )

Fixes the current text so that it is valid given any set validators.

Returns true if the text was changed. Otherwise returns false.

Definition at line 421 of file qwidgetlinecontrol.cpp.

◆ hasAcceptableInput()

bool QWidgetLineControl::hasAcceptableInput ( ) const
inline

Definition at line 283 of file qwidgetlinecontrol_p.h.

◆ hasSelectedText()

bool QWidgetLineControl::hasSelectedText ( ) const
inline

Definition at line 120 of file qwidgetlinecontrol_p.h.

◆ height()

int QWidgetLineControl::height ( ) const
inline

Definition at line 123 of file qwidgetlinecontrol_p.h.

◆ home()

void QWidgetLineControl::home ( bool mark)
inline

Definition at line 189 of file qwidgetlinecontrol_p.h.

◆ inputMask()

QString QWidgetLineControl::inputMask ( ) const
inline

Definition at line 286 of file qwidgetlinecontrol_p.h.

◆ inputRejected

void QWidgetLineControl::inputRejected ( )
signal

◆ inSelection()

bool QWidgetLineControl::inSelection ( int x) const
inline

Definition at line 138 of file qwidgetlinecontrol_p.h.

◆ insert()

void QWidgetLineControl::insert ( const QString & newText)

Inserts the given newText at the current cursor position. If there is any selected text it is removed prior to insertion of the new text.

Definition at line 230 of file qwidgetlinecontrol.cpp.

◆ isModified()

bool QWidgetLineControl::isModified ( ) const
inline

Definition at line 116 of file qwidgetlinecontrol_p.h.

◆ isReadOnly()

bool QWidgetLineControl::isReadOnly ( ) const
inline

Definition at line 206 of file qwidgetlinecontrol_p.h.

◆ isRedoAvailable()

bool QWidgetLineControl::isRedoAvailable ( ) const

Definition at line 1945 of file qwidgetlinecontrol.cpp.

◆ isUndoAvailable()

bool QWidgetLineControl::isUndoAvailable ( ) const

Definition at line 1937 of file qwidgetlinecontrol.cpp.

◆ layoutDirection()

Qt::LayoutDirection QWidgetLineControl::layoutDirection ( ) const
inline

Definition at line 326 of file qwidgetlinecontrol_p.h.

◆ maxLength()

int QWidgetLineControl::maxLength ( ) const
inline

Definition at line 259 of file qwidgetlinecontrol_p.h.

◆ moveCursor()

void QWidgetLineControl::moveCursor ( int pos,
bool mark = false )

Moves the cursor to the given position pos. If mark is true will adjust the currently selected text.

Definition at line 444 of file qwidgetlinecontrol.cpp.

◆ naturalTextWidth()

qreal QWidgetLineControl::naturalTextWidth ( ) const
inline

Definition at line 125 of file qwidgetlinecontrol_p.h.

◆ nextMaskBlank()

int QWidgetLineControl::nextMaskBlank ( int pos)
inline

Definition at line 98 of file qwidgetlinecontrol_p.h.

◆ palette()

const QPalette & QWidgetLineControl::palette ( ) const
inline

Definition at line 353 of file qwidgetlinecontrol_p.h.

◆ passwordCharacter()

QChar QWidgetLineControl::passwordCharacter ( ) const
inline

Definition at line 320 of file qwidgetlinecontrol_p.h.

◆ passwordEchoEditing()

bool QWidgetLineControl::passwordEchoEditing ( ) const
inline

Definition at line 314 of file qwidgetlinecontrol_p.h.

◆ passwordMaskDelay()

int QWidgetLineControl::passwordMaskDelay ( ) const
inline

Definition at line 323 of file qwidgetlinecontrol_p.h.

◆ paste()

void QWidgetLineControl::paste ( QClipboard::Mode clipboardMode = QClipboard::Clipboard)

Inserts the text stored in the application clipboard into the line control.

See also
insert()

Definition at line 135 of file qwidgetlinecontrol.cpp.

◆ preeditAreaText()

QString QWidgetLineControl::preeditAreaText ( ) const
inline

Definition at line 311 of file qwidgetlinecontrol_p.h.

◆ preeditCursor()

int QWidgetLineControl::preeditCursor ( ) const
inline

Definition at line 162 of file qwidgetlinecontrol_p.h.

◆ prevMaskBlank()

int QWidgetLineControl::prevMaskBlank ( int pos)
inline

Definition at line 105 of file qwidgetlinecontrol_p.h.

◆ processInputMethodEvent()

void QWidgetLineControl::processInputMethodEvent ( QInputMethodEvent * event)

Applies the given input method event event to the text of the line control

Definition at line 481 of file qwidgetlinecontrol.cpp.

◆ processKeyEvent()

void QWidgetLineControl::processKeyEvent ( QKeyEvent * ev)

Definition at line 1602 of file qwidgetlinecontrol.cpp.

◆ processShortcutOverrideEvent()

void QWidgetLineControl::processShortcutOverrideEvent ( QKeyEvent * ke)

Definition at line 1548 of file qwidgetlinecontrol.cpp.

◆ rectForPos()

QRect QWidgetLineControl::rectForPos ( int pos) const

Returns the bounds of the given text position.

Definition at line 379 of file qwidgetlinecontrol.cpp.

◆ redo()

void QWidgetLineControl::redo ( )
inline

Definition at line 240 of file qwidgetlinecontrol_p.h.

◆ removeSelection()

void QWidgetLineControl::removeSelection ( )
inline

Definition at line 146 of file qwidgetlinecontrol_p.h.

◆ resetCursorBlinkTimer()

void QWidgetLineControl::resetCursorBlinkTimer ( )

Definition at line 1519 of file qwidgetlinecontrol.cpp.

◆ resetInputContext

void QWidgetLineControl::resetInputContext ( )
signal

◆ selectAll()

void QWidgetLineControl::selectAll ( )
inline

Definition at line 235 of file qwidgetlinecontrol_p.h.

◆ selectedText()

QString QWidgetLineControl::selectedText ( ) const
inline

Definition at line 129 of file qwidgetlinecontrol_p.h.

◆ selectionChanged

void QWidgetLineControl::selectionChanged ( )
signal

◆ selectionEnd()

int QWidgetLineControl::selectionEnd ( ) const
inline

Definition at line 134 of file qwidgetlinecontrol_p.h.

◆ selectionStart()

int QWidgetLineControl::selectionStart ( ) const
inline

Definition at line 133 of file qwidgetlinecontrol_p.h.

◆ selectWordAtPos()

void QWidgetLineControl::selectWordAtPos ( int cursor)

Sets the selection to cover the word at the given cursor position. The word boundaries are defined by the behavior of QTextLayout::SkipWords cursor mode.

Definition at line 649 of file qwidgetlinecontrol.cpp.

◆ setAccessibleObject()

void QWidgetLineControl::setAccessibleObject ( QObject * object)
inline

Definition at line 85 of file qwidgetlinecontrol_p.h.

◆ setBlinkingCursorEnabled()

void QWidgetLineControl::setBlinkingCursorEnabled ( bool enable)

Definition at line 1489 of file qwidgetlinecontrol.cpp.

◆ setCancelText()

void QWidgetLineControl::setCancelText ( const QString & text)
inline

Definition at line 351 of file qwidgetlinecontrol_p.h.

◆ setCursorMoveStyle()

void QWidgetLineControl::setCursorMoveStyle ( Qt::CursorMoveStyle style)
inline

Definition at line 168 of file qwidgetlinecontrol_p.h.

◆ setCursorPosition()

void QWidgetLineControl::setCursorPosition ( int pos)
inline

Definition at line 281 of file qwidgetlinecontrol_p.h.

◆ setCursorWidth()

void QWidgetLineControl::setCursorWidth ( int value)
inline

Definition at line 165 of file qwidgetlinecontrol_p.h.

◆ setEchoMode()

void QWidgetLineControl::setEchoMode ( uint mode)
inline

Definition at line 244 of file qwidgetlinecontrol_p.h.

◆ setFont()

void QWidgetLineControl::setFont ( const QFont & font)
inline

Definition at line 339 of file qwidgetlinecontrol_p.h.

◆ setInputMask()

void QWidgetLineControl::setInputMask ( const QString & mask)
inline

Definition at line 298 of file qwidgetlinecontrol_p.h.

◆ setLayoutDirection()

void QWidgetLineControl::setLayoutDirection ( Qt::LayoutDirection direction)
inline

Definition at line 331 of file qwidgetlinecontrol_p.h.

◆ setMaxLength()

void QWidgetLineControl::setMaxLength ( int maxLength)
inline

Definition at line 260 of file qwidgetlinecontrol_p.h.

◆ setModified()

void QWidgetLineControl::setModified ( bool modified)
inline

Definition at line 117 of file qwidgetlinecontrol_p.h.

◆ setPalette()

void QWidgetLineControl::setPalette ( const QPalette & p)
inline

Definition at line 354 of file qwidgetlinecontrol_p.h.

◆ setPasswordCharacter()

void QWidgetLineControl::setPasswordCharacter ( QChar character)
inline

Definition at line 321 of file qwidgetlinecontrol_p.h.

◆ setPasswordMaskDelay()

void QWidgetLineControl::setPasswordMaskDelay ( int delay)
inline

Definition at line 324 of file qwidgetlinecontrol_p.h.

◆ setPreeditArea()

void QWidgetLineControl::setPreeditArea ( int cursor,
const QString & text )
inline

Definition at line 308 of file qwidgetlinecontrol_p.h.

◆ setReadOnly()

void QWidgetLineControl::setReadOnly ( bool enable)

Definition at line 1480 of file qwidgetlinecontrol.cpp.

◆ setSelection()

void QWidgetLineControl::setSelection ( int start,
int length )

Sets length characters from the given start position as selected. The given start position must be within the current text for the line control. If length characters cannot be selected, then the selection will extend to the end of the current text.

Definition at line 278 of file qwidgetlinecontrol.cpp.

◆ setText()

void QWidgetLineControl::setText ( const QString & txt)
inline

Definition at line 215 of file qwidgetlinecontrol_p.h.

◆ setValidator()

void QWidgetLineControl::setValidator ( const QValidator * v)
inline

Definition at line 270 of file qwidgetlinecontrol_p.h.

◆ start()

int QWidgetLineControl::start ( ) const
inline

Definition at line 153 of file qwidgetlinecontrol_p.h.

◆ surroundingText()

QString QWidgetLineControl::surroundingText ( ) const
inline

Definition at line 227 of file qwidgetlinecontrol_p.h.

◆ text()

QString QWidgetLineControl::text ( ) const
inline

Definition at line 209 of file qwidgetlinecontrol_p.h.

◆ textAfterSelection()

QString QWidgetLineControl::textAfterSelection ( ) const
inline

Definition at line 131 of file qwidgetlinecontrol_p.h.

◆ textBeforeSelection()

QString QWidgetLineControl::textBeforeSelection ( ) const
inline

Definition at line 130 of file qwidgetlinecontrol_p.h.

◆ textChanged

void QWidgetLineControl::textChanged ( const QString & )
signal

◆ textEdited

void QWidgetLineControl::textEdited ( const QString & )
signal

◆ textLayout()

QTextLayout * QWidgetLineControl::textLayout ( ) const
inline

Definition at line 368 of file qwidgetlinecontrol_p.h.

◆ timerEvent()

void QWidgetLineControl::timerEvent ( QTimerEvent * event)
overrideprotectedvirtual

This event handler can be reimplemented in a subclass to receive timer events for the object.

QChronoTimer provides higher-level interfaces to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.

See also
startTimer(), killTimer(), event()

Reimplemented from QObject.

Definition at line 1530 of file qwidgetlinecontrol.cpp.

◆ undo()

void QWidgetLineControl::undo ( )

Undoes the previous operation.

Definition at line 258 of file qwidgetlinecontrol.cpp.

◆ updateCursorBlinking()

void QWidgetLineControl::updateCursorBlinking ( )

Definition at line 1504 of file qwidgetlinecontrol.cpp.

◆ updateMicroFocus

void QWidgetLineControl::updateMicroFocus ( )
signal

◆ updateNeeded

void QWidgetLineControl::updateNeeded ( const QRect & )
signal

◆ updatePasswordEchoEditing()

void QWidgetLineControl::updatePasswordEchoEditing ( bool editing)

Sets the password echo editing to editing. If password echo editing is true, then the text of the password is displayed even if the echo mode is set to QLineEdit::PasswordEchoOnEdit. Password echoing editing does not affect other echo modes.

Definition at line 355 of file qwidgetlinecontrol.cpp.

◆ validator()

const QValidator * QWidgetLineControl::validator ( ) const
inline

Definition at line 269 of file qwidgetlinecontrol_p.h.

◆ width()

int QWidgetLineControl::width ( ) const
inline

Definition at line 122 of file qwidgetlinecontrol_p.h.

◆ xToPos()

int QWidgetLineControl::xToPos ( int x,
QTextLine::CursorPosition betweenOrOn = QTextLine::CursorBetweenCharacters ) const

Returns the cursor position of the given x pixel value in relation to the displayed text. The given betweenOrOn specified what kind of cursor position is requested.

Definition at line 369 of file qwidgetlinecontrol.cpp.

◆ QLineEdit

friend class QLineEdit
friend

Definition at line 518 of file qwidgetlinecontrol_p.h.


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