Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qlabel_p.h>
Friends | |
class | QMessageBoxPrivate |
Definition at line 43 of file qlabel_p.h.
QLabelPrivate::QLabelPrivate | ( | ) |
Definition at line 29 of file qlabel.cpp.
QLabelPrivate::~QLabelPrivate | ( | ) |
Definition at line 74 of file qlabel.cpp.
void QLabelPrivate::buddyDeleted | ( | ) |
Definition at line 1224 of file qlabel.cpp.
Referenced by QLabel::setBuddy().
void QLabelPrivate::clearContents | ( | ) |
Clears any contents, without updating/repainting the label.
Definition at line 1302 of file qlabel.cpp.
References cachedimage, QString::clear(), control, cursor, QObject::disconnect(), hasShortcut, isTextLabel, onAnchor, pixmap, scaledpixmap, shortcutId, text, and validCursor.
Definition at line 1655 of file qlabel.cpp.
References control, QWidgetTextControl::createStandardContextMenu(), layoutPoint(), and pos.
QRect QLabelPrivate::documentRect | ( | ) | const |
Definition at line 1476 of file qlabel.cpp.
References QRect::adjust(), align, Qt::AlignBottom, Qt::AlignLeft, Qt::AlignRight, Qt::AlignTop, QRect::bottom(), QFramePrivate::frameWidth, indent, isTextLabel, QRect::left(), margin, Q_ASSERT_X, QRect::right(), QRect::setBottom(), QRect::setLeft(), QRect::setRight(), QRect::setTop(), textDirection(), QRect::top(), and QStyle::visualAlignment().
Referenced by ensureTextLayouted(), and layoutRect().
void QLabelPrivate::ensureTextControl | ( | ) | const |
Definition at line 1570 of file qlabel.cpp.
References QObject::connect(), QObjectPrivate::connect(), control, QWidgetTextControl::document(), isTextLabel, QLabel::linkActivated(), QWidgetTextControl::linkActivated(), QWidgetTextControl::linkHovered(), linkHovered(), openExternalLinks, resourceProvider, QTextDocument::setDefaultFont(), QWidgetTextControl::setFocus(), QWidgetTextControl::setOpenExternalLinks(), QWidgetTextControl::setPalette(), QTextDocument::setResourceProvider(), QWidgetTextControl::setTextInteractionFlags(), QTextDocument::setUndoRedoEnabled(), textDirty, textInteractionFlags, textLayoutDirty, QWidget::update(), and QWidgetTextControl::updateRequest().
void QLabelPrivate::ensureTextLayouted | ( | ) | const |
Definition at line 1544 of file qlabel.cpp.
References align, control, QTextDocument::defaultTextOption(), QWidgetTextControl::document(), documentRect(), ensureTextPopulated(), fmt, QTextFrame::frameFormat(), QTextOption::ManualWrap, opt, QTextDocument::rootFrame(), QTextDocument::setDefaultTextOption(), QTextFrame::setFrameFormat(), QTextFrameFormat::setMargin(), QTextDocument::setTextWidth(), QTextOption::setWrapMode(), textLayoutDirty, Qt::TextWordWrap, and QTextOption::WordWrap.
Referenced by layoutRect(), and sizeForWidth().
void QLabelPrivate::ensureTextPopulated | ( | ) | const |
Definition at line 1500 of file qlabel.cpp.
References control, cursor, QWidgetTextControl::document(), effectiveTextFormat, QTextDocument::find(), hasShortcut, QTextCursor::KeepAnchor, Qt::MarkdownText, QTextCursor::NextCharacter, Qt::PlainText, Qt::RichText, QTextDocument::setHtml(), QTextDocument::setPlainText(), QTextDocument::setUndoRedoEnabled(), shortcutCursor, text, and textDirty.
Referenced by ensureTextLayouted().
void QLabelPrivate::init | ( | ) |
Definition at line 224 of file qlabel.cpp.
References QSizePolicy::Label, QSizePolicy::Preferred, QStyle::SE_LabelLayoutItem, and QWidgetPrivate::setLayoutItemMargins().
Definition at line 1648 of file qlabel.cpp.
References layoutRect(), and QRectF::toRect().
Referenced by createStandardContextMenu().
QRectF QLabelPrivate::layoutRect | ( | ) | const |
Definition at line 1631 of file qlabel.cpp.
References align, Qt::AlignBottom, Qt::AlignVCenter, control, QWidgetTextControl::document(), QTextDocument::documentLayout(), documentRect(), QAbstractTextDocumentLayout::documentSize(), ensureTextLayouted(), QRectF::height(), qMax(), QRectF::width(), QRectF::x(), and QRectF::y().
Referenced by layoutPoint(), and sendControlEvent().
Definition at line 1606 of file qlabel.cpp.
References cursor, emit, QString::isEmpty(), onAnchor, Qt::PointingHandCursor, validCursor, and Qt::WA_SetCursor.
Referenced by ensureTextControl().
|
inline |
Definition at line 63 of file qlabel_p.h.
References Qt::NoFocus, Qt::PlainText, Qt::TextSelectableByKeyboard, and Qt::TextSelectableByMouse.
Definition at line 1596 of file qlabel.cpp.
References control, QEvent::ignore(), isTextLabel, layoutRect(), Qt::NoTextInteraction, QWidgetTextControl::processEvent(), and textInteractionFlags.
QSize QLabelPrivate::sizeForWidth | ( | int | w | ) | const |
Returns the size that will be used if the width of the label is w.
If w is -1, the sizeHint() is returned. If w is 0 minimumSizeHint() is returned
Definition at line 554 of file qlabel.cpp.
References QWidgetTextControl::adjustSize(), align, Qt::AlignBottom, Qt::AlignHCenter, Qt::AlignLeft, Qt::AlignRight, Qt::AlignTop, Qt::AlignVCenter, QWidgetPrivate::bottommargin, control, ensureTextLayouted(), QFramePrivate::frameWidth, hasShortcut, QRect::height(), QSizeF::height(), indent, QStyleOption::initFrom(), isTextLabel, QWidgetPrivate::leftmargin, margin, opt, pixmap, qCeil(), qMax(), qMin(), QWidgetPrivate::rightmargin, QRect::setSize(), QWidgetTextControl::setTextWidth(), QStyle::SH_UnderlineShortcut, QWidgetTextControl::size(), text, textDirection(), Qt::TextHideMnemonic, Qt::TextShowMnemonic, QWidgetTextControl::textWidth(), Qt::TextWordWrap, QWidgetPrivate::topmargin, QStyle::visualAlignment(), QRect::width(), and QSizeF::width().
Qt::LayoutDirection QLabelPrivate::textDirection | ( | ) | const |
Definition at line 1464 of file qlabel.cpp.
References control, QTextDocument::defaultTextOption(), QWidgetTextControl::document(), QString::isRightToLeft(), Qt::LeftToRight, opt, Qt::RightToLeft, and text.
Referenced by documentRect(), and sizeForWidth().
void QLabelPrivate::updateLabel | ( | ) |
Updates the label, but not the frame.
Definition at line 1124 of file qlabel.cpp.
References align, isTextLabel, policy, QSizePolicy::setHeightForWidth(), textLayoutDirty, Qt::TextWordWrap, valid_hints, and wrap().
void QLabelPrivate::updateShortcut | ( | ) |
Definition at line 1207 of file qlabel.cpp.
References QString::contains(), hasShortcut, QKeySequence::mnemonic(), Q_ASSERT, shortcutId, and text.
|
friend |
Definition at line 129 of file qlabel_p.h.
ushort QLabelPrivate::align |
Definition at line 113 of file qlabel_p.h.
Referenced by documentRect(), ensureTextLayouted(), layoutRect(), sizeForWidth(), and updateLabel().
Definition at line 105 of file qlabel_p.h.
std::optional<QImage> QLabelPrivate::cachedimage |
Definition at line 91 of file qlabel_p.h.
Referenced by clearContents().
|
mutable |
Definition at line 99 of file qlabel_p.h.
Referenced by clearContents(), createStandardContextMenu(), ensureTextControl(), ensureTextLayouted(), ensureTextPopulated(), layoutRect(), sendControlEvent(), sizeForWidth(), and textDirection().
QCursor QLabelPrivate::cursor |
Definition at line 102 of file qlabel_p.h.
Referenced by clearContents(), ensureTextPopulated(), and linkHovered().
Qt::TextFormat QLabelPrivate::effectiveTextFormat |
Definition at line 109 of file qlabel_p.h.
Referenced by ensureTextPopulated().
|
mutable |
Definition at line 120 of file qlabel_p.h.
Referenced by clearContents(), ensureTextPopulated(), sizeForWidth(), and updateShortcut().
short QLabelPrivate::indent |
Definition at line 114 of file qlabel_p.h.
Referenced by documentRect(), and sizeForWidth().
|
mutable |
Definition at line 119 of file qlabel_p.h.
Referenced by clearContents(), documentRect(), ensureTextControl(), sendControlEvent(), sizeForWidth(), and updateLabel().
int QLabelPrivate::margin |
Definition at line 112 of file qlabel_p.h.
Referenced by documentRect(), and sizeForWidth().
|
mutable |
Definition at line 87 of file qlabel_p.h.
uint QLabelPrivate::onAnchor |
Definition at line 123 of file qlabel_p.h.
Referenced by clearContents(), and linkHovered().
uint QLabelPrivate::openExternalLinks |
Definition at line 125 of file qlabel_p.h.
Referenced by ensureTextControl().
std::optional<QPicture> QLabelPrivate::picture |
Definition at line 93 of file qlabel_p.h.
std::optional<QPixmap> QLabelPrivate::pixmap |
Definition at line 89 of file qlabel_p.h.
Referenced by clearContents(), and sizeForWidth().
QTextDocument::ResourceProvider QLabelPrivate::resourceProvider |
Definition at line 127 of file qlabel_p.h.
Referenced by ensureTextControl().
uint QLabelPrivate::scaledcontents |
Definition at line 116 of file qlabel_p.h.
std::optional<QPixmap> QLabelPrivate::scaledpixmap |
Definition at line 90 of file qlabel_p.h.
Referenced by clearContents().
|
mutable |
Definition at line 86 of file qlabel_p.h.
|
mutable |
Definition at line 100 of file qlabel_p.h.
Referenced by ensureTextPopulated().
int QLabelPrivate::shortcutId |
Definition at line 106 of file qlabel_p.h.
Referenced by clearContents(), and updateShortcut().
|
mutable |
Definition at line 111 of file qlabel_p.h.
QString QLabelPrivate::text |
Definition at line 88 of file qlabel_p.h.
Referenced by clearContents(), ensureTextPopulated(), sizeForWidth(), textDirection(), and updateShortcut().
|
mutable |
Definition at line 118 of file qlabel_p.h.
Referenced by ensureTextControl(), and ensureTextPopulated().
Qt::TextFormat QLabelPrivate::textformat |
Definition at line 108 of file qlabel_p.h.
Qt::TextInteractionFlags QLabelPrivate::textInteractionFlags |
Definition at line 110 of file qlabel_p.h.
Referenced by ensureTextControl(), and sendControlEvent().
|
mutable |
Definition at line 117 of file qlabel_p.h.
Referenced by ensureTextControl(), ensureTextLayouted(), and updateLabel().
|
mutable |
Definition at line 115 of file qlabel_p.h.
Referenced by updateLabel().
uint QLabelPrivate::validCursor |
Definition at line 122 of file qlabel_p.h.
Referenced by clearContents(), and linkHovered().