![]() |
Qt 6.x
The Qt SDK
|
#include <qlabel_p.h>
Friends | |
class | QMessageBoxPrivate |
Additional Inherited Members | |
![]() | |
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 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 QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Definition at line 40 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::_q_buddyDeleted | ( | ) |
Definition at line 1222 of file qlabel.cpp.
Definition at line 1604 of file qlabel.cpp.
References cursor, emit, QString::isEmpty(), onAnchor, Qt::PointingHandCursor, validCursor, and Qt::WA_SetCursor.
Referenced by ensureTextControl().
void QLabelPrivate::clearContents | ( | ) |
Clears any contents, without updating/repainting the label.
Definition at line 1298 of file qlabel.cpp.
References cachedimage, QString::clear(), control, cursor, QObject::disconnect(), hasShortcut, isTextLabel, onAnchor, pixmap, scaledpixmap, shortcutId, SIGNAL, SLOT, text, and validCursor.
Definition at line 1653 of file qlabel.cpp.
References control, QWidgetTextControl::createStandardContextMenu(), layoutPoint(), and pos.
QRect QLabelPrivate::documentRect | ( | ) | const |
Definition at line 1474 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 1568 of file qlabel.cpp.
References _q_linkHovered(), QObject::connect(), control, QWidgetTextControl::document(), isTextLabel, openExternalLinks, resourceProvider, QTextDocument::setDefaultFont(), QWidgetTextControl::setFocus(), QWidgetTextControl::setOpenExternalLinks(), QWidgetTextControl::setPalette(), QTextDocument::setResourceProvider(), QWidgetTextControl::setTextInteractionFlags(), QTextDocument::setUndoRedoEnabled(), SIGNAL, SLOT, textDirty, textInteractionFlags, textLayoutDirty, and QWidgetPrivate::update().
void QLabelPrivate::ensureTextLayouted | ( | ) | const |
Definition at line 1542 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(), QTextDocument::setTextWidth(), QTextOption::setWrapMode(), textLayoutDirty, Qt::TextWordWrap, and QTextOption::WordWrap.
Referenced by layoutRect(), and sizeForWidth().
void QLabelPrivate::ensureTextPopulated | ( | ) | const |
Definition at line 1498 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 1646 of file qlabel.cpp.
References layoutRect(), QRect::topLeft(), and QRectF::toRect().
Referenced by createStandardContextMenu().
QRectF QLabelPrivate::layoutRect | ( | ) | const |
Definition at line 1629 of file qlabel.cpp.
References align, Qt::AlignBottom, Qt::AlignVCenter, control, QWidgetTextControl::document(), QTextDocument::documentLayout(), documentRect(), QAbstractTextDocumentLayout::documentSize(), ensureTextLayouted(), QRectF::height(), QSizeF::height(), qMax(), QRectF::width(), QRectF::x(), and QRectF::y().
Referenced by layoutPoint(), and sendControlEvent().
|
inline |
Definition at line 60 of file qlabel_p.h.
References Qt::NoFocus, Qt::PlainText, Qt::TextSelectableByKeyboard, and Qt::TextSelectableByMouse.
Definition at line 1594 of file qlabel.cpp.
References control, e, 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, QFontMetrics::averageCharWidth(), QWidgetPrivate::bottommargin, QFontMetrics::boundingRect(), control, ensureTextLayouted(), QFramePrivate::frameWidth, hasShortcut, QRect::height(), QSizeF::height(), QFontMetrics::horizontalAdvance(), indent, QStyleOption::initFrom(), isTextLabel, QWidgetPrivate::leftmargin, QFontMetrics::lineSpacing(), 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(), QSize::width(), and QSizeF::width().
Qt::LayoutDirection QLabelPrivate::textDirection | ( | ) | const |
Definition at line 1462 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 1205 of file qlabel.cpp.
References QString::contains(), hasShortcut, QKeySequence::mnemonic(), Q_ASSERT, shortcutId, and text.
|
friend |
Definition at line 125 of file qlabel_p.h.
ushort QLabelPrivate::align |
Definition at line 109 of file qlabel_p.h.
Referenced by documentRect(), ensureTextLayouted(), layoutRect(), sizeForWidth(), and updateLabel().
Definition at line 101 of file qlabel_p.h.
std::optional<QImage> QLabelPrivate::cachedimage |
Definition at line 88 of file qlabel_p.h.
Referenced by clearContents().
|
mutable |
Definition at line 95 of file qlabel_p.h.
Referenced by clearContents(), createStandardContextMenu(), ensureTextControl(), ensureTextLayouted(), ensureTextPopulated(), layoutRect(), sendControlEvent(), sizeForWidth(), and textDirection().
QCursor QLabelPrivate::cursor |
Definition at line 98 of file qlabel_p.h.
Referenced by _q_linkHovered(), clearContents(), and ensureTextPopulated().
Qt::TextFormat QLabelPrivate::effectiveTextFormat |
Definition at line 105 of file qlabel_p.h.
Referenced by ensureTextPopulated().
|
mutable |
Definition at line 116 of file qlabel_p.h.
Referenced by clearContents(), ensureTextPopulated(), sizeForWidth(), and updateShortcut().
short QLabelPrivate::indent |
Definition at line 110 of file qlabel_p.h.
Referenced by documentRect(), and sizeForWidth().
|
mutable |
Definition at line 115 of file qlabel_p.h.
Referenced by clearContents(), documentRect(), ensureTextControl(), sendControlEvent(), sizeForWidth(), and updateLabel().
int QLabelPrivate::margin |
Definition at line 108 of file qlabel_p.h.
Referenced by documentRect(), and sizeForWidth().
|
mutable |
Definition at line 84 of file qlabel_p.h.
uint QLabelPrivate::onAnchor |
Definition at line 119 of file qlabel_p.h.
Referenced by _q_linkHovered(), and clearContents().
uint QLabelPrivate::openExternalLinks |
Definition at line 121 of file qlabel_p.h.
Referenced by ensureTextControl().
std::optional<QPicture> QLabelPrivate::picture |
Definition at line 90 of file qlabel_p.h.
std::optional<QPixmap> QLabelPrivate::pixmap |
Definition at line 86 of file qlabel_p.h.
Referenced by clearContents(), and sizeForWidth().
QTextDocument::ResourceProvider QLabelPrivate::resourceProvider |
Definition at line 123 of file qlabel_p.h.
Referenced by ensureTextControl().
uint QLabelPrivate::scaledcontents |
Definition at line 112 of file qlabel_p.h.
std::optional<QPixmap> QLabelPrivate::scaledpixmap |
Definition at line 87 of file qlabel_p.h.
Referenced by clearContents().
|
mutable |
Definition at line 83 of file qlabel_p.h.
|
mutable |
Definition at line 96 of file qlabel_p.h.
Referenced by ensureTextPopulated().
int QLabelPrivate::shortcutId |
Definition at line 102 of file qlabel_p.h.
Referenced by clearContents(), and updateShortcut().
|
mutable |
Definition at line 107 of file qlabel_p.h.
QString QLabelPrivate::text |
Definition at line 85 of file qlabel_p.h.
Referenced by clearContents(), ensureTextPopulated(), sizeForWidth(), textDirection(), and updateShortcut().
|
mutable |
Definition at line 114 of file qlabel_p.h.
Referenced by ensureTextControl(), and ensureTextPopulated().
Qt::TextFormat QLabelPrivate::textformat |
Definition at line 104 of file qlabel_p.h.
Qt::TextInteractionFlags QLabelPrivate::textInteractionFlags |
Definition at line 106 of file qlabel_p.h.
Referenced by ensureTextControl(), and sendControlEvent().
|
mutable |
Definition at line 113 of file qlabel_p.h.
Referenced by ensureTextControl(), ensureTextLayouted(), and updateLabel().
|
mutable |
Definition at line 111 of file qlabel_p.h.
Referenced by updateLabel().
uint QLabelPrivate::validCursor |
Definition at line 118 of file qlabel_p.h.
Referenced by _q_linkHovered(), and clearContents().