![]() |
Qt 6.x
The Qt SDK
|
#include <qlineedit_p.h>
Classes | |
struct | SideWidgetEntry |
struct | SideWidgetParameters |
Public Types | |
enum | SideWidgetFlag { SideWidgetFadeInWithText = 0x1 , SideWidgetCreatedByWidgetAction = 0x2 , SideWidgetClearButton = 0x4 } |
typedef std::vector< SideWidgetEntry > | SideWidgetEntryList |
![]() | |
enum | DrawWidgetFlag { DrawAsRoot = 0x01 , DrawPaintOnScreen = 0x02 , DrawRecursive = 0x04 , DrawInvisible = 0x08 , DontSubtractOpaqueChildren = 0x10 , DontDrawOpaqueChildren = 0x20 , DontDrawNativeChildren = 0x40 , DontSetCompositionMode = 0x80 , UseEffectRegionBounds = 0x100 } |
enum | Direction { DirectionNorth = 0x01 , DirectionEast = 0x10 , DirectionSouth = 0x02 , DirectionWest = 0x20 } |
enum class | WindowHandleMode { Direct , Closest , TopLevel } |
enum | CloseMode { CloseNoEvent , CloseWithEvent , CloseWithSpontaneousEvent } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
Static Public Member Functions | |
static QLineEditPrivate * | get (QLineEdit *lineEdit) |
![]() | |
static QWidgetPrivate * | get (QWidget *w) |
static const QWidgetPrivate * | get (const QWidget *w) |
static void | checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight) |
static void | adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr) |
static QWidget * | parentGraphicsView (const QWidget *widget) |
static QRect | screenGeometry (const QWidget *widget) |
static QRect | availableScreenGeometry (const QWidget *widget) |
static QScreen * | screen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static void | sendComposeStatus (QWidget *w, bool end) |
static void | setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (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) |
Static Public Attributes | |
static const int | verticalMargin |
static const int | horizontalMargin |
![]() | |
static QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Friends | |
class | QTypeInfo< SideWidgetLocation > |
Definition at line 96 of file qlineedit_p.h.
typedef std::vector<SideWidgetEntry> QLineEditPrivate::SideWidgetEntryList |
Definition at line 113 of file qlineedit_p.h.
Enumerator | |
---|---|
SideWidgetFadeInWithText | |
SideWidgetCreatedByWidgetAction | |
SideWidgetClearButton |
Definition at line 100 of file qlineedit_p.h.
|
inline |
Definition at line 122 of file qlineedit_p.h.
|
inline |
Definition at line 131 of file qlineedit_p.h.
void QLineEditPrivate::_q_clearButtonClicked | ( | ) |
Definition at line 454 of file qlineedit_p.cpp.
References _q_textEdited().
void QLineEditPrivate::_q_controlEditingFinished | ( | ) |
Definition at line 463 of file qlineedit_p.cpp.
Referenced by init().
void QLineEditPrivate::_q_cursorPositionChanged | ( | int | from, |
int | to | ||
) |
Definition at line 118 of file qlineedit_p.cpp.
References emit.
Referenced by init().
void QLineEditPrivate::_q_handleWindowActivate | ( | ) |
Definition at line 99 of file qlineedit_p.cpp.
References control, QWidgetLineControl::deselect(), and QWidgetLineControl::hasSelectedText().
void QLineEditPrivate::_q_selectionChanged | ( | ) |
Definition at line 133 of file qlineedit_p.cpp.
References control, QWidgetLineControl::cursorPosition(), emit, QWidgetLineControl::hasSelectedText(), QString::isEmpty(), opt, QWidgetLineControl::preeditAreaText(), QWidgetLineControl::selectionEnd(), QWidgetLineControl::selectionStart(), setCursorVisible(), and QStyle::SH_BlinkCursorWhenTextSelected.
Referenced by init().
Definition at line 439 of file qlineedit_p.cpp.
References hasSideWidgets(), QString::size(), and text.
Definition at line 106 of file qlineedit_p.cpp.
References control, edited, emit, QCompleter::InlineCompletion, and text.
Referenced by _q_clearButtonClicked(), and init().
Definition at line 153 of file qlineedit_p.cpp.
References adjustedControlRect(), and rect.
Referenced by init().
QRect QLineEditPrivate::adjustedContentsRect | ( | ) | const |
Definition at line 228 of file qlineedit_p.cpp.
References effectiveTextMargins(), QRect::marginsRemoved(), opt, and QStyle::SE_LineEditContents.
Referenced by adjustedControlRect(), inSelection(), and xToPos().
Definition at line 38 of file qlineedit_p.cpp.
References adjustedContentsRect(), QWidgetLineControl::ascent(), control, fontMetrics, horizontalMargin, hscroll, rect, QRect::translated(), vscroll, and QRect::x().
Referenced by _q_updateNeeded(), and cursorRect().
QIcon QLineEditPrivate::clearButtonIcon | ( | ) | const |
Definition at line 482 of file qlineedit_p.cpp.
References QStyle::SP_LineEditClearButton.
QRect QLineEditPrivate::cursorRect | ( | ) | const |
Definition at line 71 of file qlineedit_p.cpp.
References adjustedControlRect(), control, and QWidgetLineControl::cursorRect().
Referenced by setCursorVisible().
QMargins QLineEditPrivate::effectiveTextMargins | ( | ) | const |
Definition at line 661 of file qlineedit_p.cpp.
References QMargins::bottom(), effectiveTextMargin(), QMargins::left(), leftSideWidgetList(), QMargins::right(), rightSideWidgetList(), sideWidgetParameters(), textMargins, and QMargins::top().
Referenced by adjustedContentsRect().
|
inlinestatic |
Definition at line 171 of file qlineedit_p.h.
References lineEdit.
|
inline |
Definition at line 225 of file qlineedit_p.h.
Referenced by _q_textChanged(), and positionSideWidgets().
Definition at line 158 of file qlineedit_p.cpp.
References _q_controlEditingFinished(), _q_cursorPositionChanged(), _q_selectionChanged(), _q_textEdited(), _q_updateNeeded(), QPalette::Base, QObject::connect(), control, QSizePolicy::Expanding, QSizePolicy::Fixed, Qt::IBeamCursor, initMouseYThreshold(), QSizePolicy::LineEdit, opt, QWidgetLineControl::setFont(), QObject::setParent(), QWidgetLineControl::setPasswordCharacter(), QWidgetLineControl::setPasswordMaskDelay(), QStyle::SH_LineEdit_PasswordCharacter, QStyle::SH_LineEdit_PasswordMaskDelay, SIGNAL, SLOT, Qt::StrongFocus, textChanged(), txt, QWidgetPrivate::update(), Qt::WA_InputMethodEnabled, Qt::WA_KeyCompression, and Qt::WA_MacShowFocusRect.
void QLineEditPrivate::initMouseYThreshold | ( | ) |
Definition at line 223 of file qlineedit_p.cpp.
References QStyleHints::mouseQuickSelectionThreshold, and QGuiApplication::styleHints().
Referenced by init().
bool QLineEditPrivate::inSelection | ( | int | x | ) | const |
Definition at line 65 of file qlineedit_p.cpp.
References adjustedContentsRect(), control, horizontalMargin, hscroll, QWidgetLineControl::inSelection(), and QRect::x().
|
inline |
Definition at line 226 of file qlineedit_p.h.
References Qt::LeftToRight.
Referenced by effectiveTextMargins(), and positionSideWidgets().
void QLineEditPrivate::positionSideWidgets | ( | ) |
Definition at line 504 of file qlineedit_p.cpp.
References e, hasSideWidgets(), QRect::height(), QRect::left(), leftSideWidgetList(), QRect::moveLeft(), Q_UNUSED, rightSideWidgetList(), sideWidgetParameters(), and QRect::width().
void QLineEditPrivate::resetInputMethod | ( | ) |
Definition at line 263 of file qlineedit_p.cpp.
References QGuiApplication::inputMethod(), qApp, and QInputMethod::reset().
|
inline |
Definition at line 228 of file qlineedit_p.h.
References Qt::LeftToRight.
Referenced by effectiveTextMargins(), and positionSideWidgets().
bool QLineEditPrivate::sendMouseEventToInputContext | ( | QMouseEvent * | e | ) |
This function is not intended as polymorphic usage.
Just a shared code fragment that calls QInputMethod::invokeAction for this class.
Definition at line 276 of file qlineedit_p.cpp.
References QInputMethod::Click, QWidgetLineControl::composeMode(), control, QWidgetLineControl::cursor(), e, QGuiApplication::inputMethod(), QInputMethod::invokeAction(), QEvent::MouseButtonRelease, QWidgetLineControl::preeditAreaText(), Q_UNUSED, QString::size(), and xToPos().
void QLineEditPrivate::setClearButtonEnabled | ( | bool | enabled | ) |
Definition at line 490 of file qlineedit_p.cpp.
References e, Q_UNUSED, and SideWidgetClearButton.
void QLineEditPrivate::setCursorVisible | ( | bool | visible | ) |
Definition at line 238 of file qlineedit_p.cpp.
References control, cursorRect(), cursorVisible, QWidgetLineControl::inputMask(), and QString::isEmpty().
Referenced by _q_selectionChanged().
Definition at line 250 of file qlineedit_p.cpp.
References control, edited, QWidgetLineControl::setText(), and text.
|
inline |
Definition at line 157 of file qlineedit_p.h.
References QWidgetLineControl::isReadOnly().
Referenced by updatePasswordEchoEditing().
|
inline |
Definition at line 165 of file qlineedit_p.h.
References Qt::AlignHCenter, alignment, QString::isEmpty(), QWidgetLineControl::preeditAreaText(), and QWidgetLineControl::text().
QLineEditPrivate::SideWidgetParameters QLineEditPrivate::sideWidgetParameters | ( | ) | const |
Definition at line 471 of file qlineedit_p.cpp.
References QStyle::PM_LineEditIconMargin, and QStyle::PM_LineEditIconSize.
Referenced by effectiveTextMargins(), and positionSideWidgets().
QString QLineEditPrivate::textAfterCursor | ( | int | curPos | ) | const |
Definition at line 59 of file qlineedit_p.cpp.
References control, QString::mid(), text, and QWidgetLineControl::text().
QString QLineEditPrivate::textBeforeCursor | ( | int | curPos | ) | const |
Definition at line 53 of file qlineedit_p.cpp.
References control, QString::mid(), text, and QWidgetLineControl::text().
void QLineEditPrivate::updatePasswordEchoEditing | ( | bool | editing | ) |
Definition at line 256 of file qlineedit_p.cpp.
References control, shouldEnableInputMethod(), QWidgetLineControl::updatePasswordEchoEditing(), and Qt::WA_InputMethodEnabled.
int QLineEditPrivate::xToPos | ( | int | x, |
QTextLine::CursorPosition | betweenOrOn = QTextLine::CursorBetweenCharacters |
||
) | const |
Definition at line 46 of file qlineedit_p.cpp.
References adjustedContentsRect(), control, horizontalMargin, hscroll, QRect::x(), and QWidgetLineControl::xToPos().
Referenced by sendMouseEventToInputContext().
|
friend |
Definition at line 231 of file qlineedit_p.h.
uint QLineEditPrivate::alignment |
Definition at line 185 of file qlineedit_p.h.
uint QLineEditPrivate::clickCausedFocus |
Definition at line 181 of file qlineedit_p.h.
uint QLineEditPrivate::contextMenuEnabled |
Definition at line 178 of file qlineedit_p.h.
QWidgetLineControl* QLineEditPrivate::control |
Definition at line 135 of file qlineedit_p.h.
Referenced by _q_handleWindowActivate(), _q_selectionChanged(), _q_textEdited(), adjustedControlRect(), cursorRect(), init(), inSelection(), sendMouseEventToInputContext(), setCursorVisible(), setText(), textAfterCursor(), textBeforeCursor(), updatePasswordEchoEditing(), and xToPos().
uint QLineEditPrivate::cursorVisible |
Definition at line 179 of file qlineedit_p.h.
Referenced by setCursorVisible().
uint QLineEditPrivate::dragEnabled |
Definition at line 180 of file qlineedit_p.h.
uint QLineEditPrivate::edited |
Definition at line 182 of file qlineedit_p.h.
Referenced by _q_controlEditingFinished(), _q_textEdited(), and setText().
uint QLineEditPrivate::frame |
Definition at line 177 of file qlineedit_p.h.
|
static |
Definition at line 187 of file qlineedit_p.h.
Referenced by adjustedControlRect(), inSelection(), QLineEdit::minimumSizeHint(), QLineEdit::paintEvent(), QLineEdit::sizeHint(), and xToPos().
int QLineEditPrivate::hscroll |
Definition at line 183 of file qlineedit_p.h.
Referenced by adjustedControlRect(), inSelection(), and xToPos().
QPoint QLineEditPrivate::mousePressPos |
Definition at line 204 of file qlineedit_p.h.
QString QLineEditPrivate::placeholderText |
Definition at line 215 of file qlineedit_p.h.
Definition at line 138 of file qlineedit_p.h.
QMargins QLineEditPrivate::textMargins |
Definition at line 213 of file qlineedit_p.h.
Referenced by effectiveTextMargins().
QPoint QLineEditPrivate::tripleClick |
Definition at line 175 of file qlineedit_p.h.
QBasicTimer QLineEditPrivate::tripleClickTimer |
Definition at line 176 of file qlineedit_p.h.
|
static |
Definition at line 186 of file qlineedit_p.h.
Referenced by QLineEdit::minimumSizeHint(), QLineEdit::paintEvent(), and QLineEdit::sizeHint().
int QLineEditPrivate::vscroll |
Definition at line 184 of file qlineedit_p.h.
Referenced by adjustedControlRect().