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>.
Loading...
Searching...
No Matches
QLabelPrivate Class Reference

#include <qlabel_p.h>

+ Inheritance diagram for QLabelPrivate:
+ Collaboration diagram for QLabelPrivate:

Public Member Functions

 QLabelPrivate ()
 
 ~QLabelPrivate ()
 
void init ()
 
void clearContents ()
 
void updateLabel ()
 Updates the label, but not the frame.
 
QSize sizeForWidth (int w) const
 Returns the size that will be used if the width of the label is w.
 
void updateShortcut ()
 
void buddyDeleted ()
 
bool needTextControl () const
 
void ensureTextPopulated () const
 
void ensureTextLayouted () const
 
void ensureTextControl () const
 
void sendControlEvent (QEvent *e)
 
void linkHovered (const QString &link)
 
QRectF layoutRect () const
 
QRect documentRect () const
 
QPoint layoutPoint (const QPoint &p) const
 
Qt::LayoutDirection textDirection () const
 
QMenucreateStandardContextMenu (const QPoint &pos)
 
- Public Member Functions inherited from QFramePrivate
 QFramePrivate ()
 
 ~QFramePrivate ()
 
void updateFrameWidth ()
 
void updateStyledFrameWidths ()
 
void init ()
 
- Public Member Functions inherited from QWidgetPrivate
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
 ~QWidgetPrivate ()
 
QWExtraextraData () const
 
QTLWExtratopData () const
 
QTLWExtramaybeTopData () const
 
QPaintersharedPainter () const
 
void setSharedPainter (QPainter *painter)
 
QWidgetRepaintManagermaybeRepaintManager () const
 
QRhirhi () const
 
QWindowwindowHandle (WindowHandleMode mode=WindowHandleMode::Direct) const
 
QWindow_q_closestWindowHandle () const
 
QScreenassociatedScreen () const
 
template<typename T >
void repaint (T t)
 
template<typename T >
void update (T t)
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
void create ()
 
void createRecursively ()
 
void createWinId ()
 
bool setScreenForPoint (const QPoint &pos)
 
bool setScreen (QScreen *screen)
 
void createTLExtra ()
 
void createExtra ()
 
void deleteExtra ()
 
void createSysExtra ()
 
void deleteSysExtra ()
 
void createTLSysExtra ()
 
void deleteTLSysExtra ()
 
void updateSystemBackground ()
 
void propagatePaletteChange ()
 
void setPalette_helper (const QPalette &)
 
void resolvePalette ()
 
QPalette naturalWidgetPalette (QPalette::ResolveMask inheritedMask) const
 
void setMask_sys (const QRegion &)
 
void raise_sys ()
 
void lower_sys ()
 
void stackUnder_sys (QWidget *)
 
QWidgetdeepestFocusProxy () const
 
void setFocus_sys ()
 
void updateFocusChild ()
 
void updateFont (const QFont &)
 
void setFont_helper (const QFont &font)
 
QFont localFont () const
 
void resolveFont ()
 
QFont naturalWidgetFont (uint inheritedMask) const
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void resolveLayoutDirection ()
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void resolveLocale ()
 
void setStyle_helper (QStyle *newStyle, bool propagate)
 
void inheritStyle ()
 
void setUpdatesEnabled_helper (bool)
 
bool updateBrushOrigin (QPainter *, const QBrush &brush) const
 
void paintBackground (QPainter *, const QRegion &, DrawWidgetFlags flags=DrawAsRoot) const
 
bool isAboutToShow () const
 The graphicsEffect function returns a pointer to the widget's graphics effect.
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter=nullptr, QWidgetRepaintManager *repaintManager=nullptr)
 
void sendPaintEvent (const QRegion &toBePainted)
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, DrawWidgetFlags flags, QPainter *sharedPainter, QWidgetRepaintManager *repaintManager)
 
bool shouldPaintOnScreen () const
 
void paintOnScreen (const QRegion &rgn)
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void setSystemClip (QPaintEngine *paintEngine, qreal devicePixelRatio, const QRegion &region)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=nullptr, bool alsoNonOpaque=false) const
 
void clipToEffectiveMask (QRegion &region) const
 
void updateIsOpaque ()
 
void setOpaque (bool opaque)
 
void updateIsTranslucent ()
 
const QRegiongetOpaqueChildren () const
 
void setDirtyOpaqueRegion ()
 
bool close ()
 
bool handleClose (CloseMode mode)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys ()
 
void setWindowOpacity_sys (qreal opacity)
 
void adjustQuitOnCloseAttribute ()
 
void scrollChildren (int dx, int dy)
 
void moveRect (const QRect &, int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void invalidateBackingStore_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the backing store when the widget is resized.
 
template<class T >
void invalidateBackingStore (const T &)
 
QRegion overlappedRegion (const QRect &rect, bool breakAfterFirst=false) const
 
bool isOverlapped (const QRect &rect) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
bool shouldDiscardSyncRequest () const
 
void updateWidgetTransform (QEvent *event)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void setWinId (WId)
 
void showChildren (bool spontaneous)
 
void hideChildren (bool spontaneous)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void reparentWidgetWindows (QWidget *parentWithWindow, Qt::WindowFlags windowFlags={})
 
void reparentWidgetWindowChildren (QWidget *parentWithWindow)
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void deactivateWidgetCleanup ()
 
void setGeometry_sys (int, int, int, int, bool)
 
void fixPosIncludesFrame ()
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void activateChildLayoutsRecursively ()
 
void show_recursive ()
 
void show_helper ()
 
void show_sys ()
 
void hide_sys ()
 
void hide_helper ()
 
bool isExplicitlyHidden () const
 
void _q_showIfNotHidden ()
 
void setVisible (bool)
 
void setEnabled_helper (bool)
 
void updateFrameStrut ()
 
QRect frameStrut () const
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWindowFilePath_sys (const QString &filePath)
 
void setCursor_sys (const QCursor &cursor)
 
void unsetCursor_sys ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowModified_helper ()
 
virtual void setWindowFlags (Qt::WindowFlags windowFlags)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
void setConstraints_sys ()
 
bool pointInsideRectAndMask (const QPoint &) const
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool) const
 
void updateGeometry_helper (bool forceUpdate)
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=nullptr)
 
void updateContentsRect ()
 
QMargins safeAreaMargins () const
 
virtual void aboutToDestroy ()
 
QWidgeteffectiveFocusWidget ()
 
void setModal_sys ()
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
QPaintDeviceredirected (QPoint *offset) const
 
void restoreRedirected ()
 
void enforceNativeChildren ()
 
bool nativeChildrenForced () const
 
QRect effectiveRectFor (const QRegion &region) const
 
QRect effectiveRectFor (const QRect &rect) const
 
QSize adjustedSize () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
void handleSoftwareInputPanel (bool clickCausedFocus=false)
 
void setWSGeometry ()
 
QPoint mapToWS (const QPoint &p) const
 
QPoint mapFromWS (const QPoint &p) const
 
QRect mapToWS (const QRect &r) const
 
QRect mapFromWS (const QRect &r) const
 
virtual QObjectfocusObject ()
 
virtual QPlatformBackingStoreRhiConfig rhiConfig () const
 
virtual TextureData texture () const
 
virtual QPlatformTextureList::Flags textureListFlags ()
 
virtual QImage grabFramebuffer ()
 
virtual void beginBackingStorePainting ()
 
virtual void endBackingStorePainting ()
 
virtual void beginCompose ()
 
virtual void endCompose ()
 
void setRenderToTexture ()
 
void setTextureChildSeen ()
 
virtual void initializeViewportFramebuffer ()
 
virtual void resizeViewportFramebuffer ()
 
virtual void resolveSamples ()
 
virtual bool isStereoEnabled ()
 
virtual bool toggleStereoTargetBuffer ()
 
std::string flagsForDumping () const override
 
QWidgetclosestParentWidgetWithWindowHandle () const
 
QWidgetnextPrevElementInFocusChain (FocusDirection direction) const
 
bool removeFromFocusChain (FocusChainRemovalRules rules=FocusChainRemovalRules(), FocusDirection direction=FocusDirection::Next)
 
bool insertIntoFocusChain (FocusDirection direction, QWidget *position)
 
bool insertIntoFocusChainBefore (QWidget *position)
 
bool insertIntoFocusChainAfter (QWidget *position)
 
void reparentFocusChildren (FocusDirection direction)
 
QWidgetdetermineLastFocusChild (QWidget *noFurtherThan)
 
void initFocusChain ()
 
bool isInFocusChain () const
 
bool isFocusChainConsistent () const
 
void setNetWmWindowTypes (bool skipIfMissing=false)
 
bool stealKeyboardGrab (bool grab)
 
bool stealMouseGrab (bool grab)
 
bool hasChildWithFocusPolicy (Qt::FocusPolicy policy, const QWidget *excludeChildrenOf=nullptr) const
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

QSize sh
 
QSize msh
 
QString text
 
std::optional< QPixmappixmap
 
std::optional< QPixmapscaledpixmap
 
std::optional< QImagecachedimage
 
std::optional< QPicturepicture
 
QWidgetTextControlcontrol
 
QTextCursor shortcutCursor
 
QCursor cursor
 
QPointer< QWidgetbuddy
 
int shortcutId
 
Qt::TextFormat textformat
 
Qt::TextFormat effectiveTextFormat
 
Qt::TextInteractionFlags textInteractionFlags
 
QSizePolicy sizePolicy
 
int margin
 
ushort align
 
short indent
 
uint valid_hints: 1
 
uint scaledcontents: 1
 
uint textLayoutDirty: 1
 
uint textDirty: 1
 
uint isTextLabel: 1
 
uint hasShortcut: 1
 
uint validCursor: 1
 
uint onAnchor: 1
 
uint openExternalLinks: 1
 
QTextDocument::ResourceProvider resourceProvider
 
- Public Attributes inherited from QFramePrivate
QRect frect
 
int frameStyle
 
short lineWidth
 
short midLineWidth
 
short frameWidth
 
short leftFrameWidth
 
short rightFrameWidth
 
short topFrameWidth
 
short bottomFrameWidth
 
- Public Attributes inherited from QWidgetPrivate
std::unique_ptr< QWExtraextra
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QWidgetfocus_child
 
QLayoutlayout
 
QRegionneedsFlush
 
QPaintDeviceredirectDev
 
QWidgetItemV2widgetItem
 
QPaintEngineextraPaintEngine
 
const QMetaObjectpolished
 
QGraphicsEffectgraphicsEffect
 
Qt::InputMethodHints imHints
 
QRegion opaqueChildren
 
QRegion dirty
 
uint directFontResolveMask
 
uint inheritedFontResolveMask
 
decltype(std::declval< QPalette >().resolveMask()) directPaletteResolveMask
 
QPalette::ResolveMask inheritedPaletteResolveMask
 
short leftmargin
 
short topmargin
 
short rightmargin
 
short bottommargin
 
signed char leftLayoutItemMargin
 
signed char topLayoutItemMargin
 
signed char rightLayoutItemMargin
 
signed char bottomLayoutItemMargin
 
Qt::HANDLE hd
 
QWidgetData data
 
QSizePolicy size_policy
 
QLocale locale
 
QPoint redirectOffset
 
QList< QAction * > actions
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
uint high_attributes [4]
 
QPalette::ColorRole fg_role: 8
 
QPalette::ColorRole bg_role: 8
 
uint dirtyOpaqueChildren: 1
 
uint isOpaque: 1
 
uint retainSizeWhenHiddenChanged: 1
 
uint inDirtyList: 1
 
uint isScrolled: 1
 
uint isMoved: 1
 
uint usesDoubleBufferedGLContext: 1
 
uint mustHaveWindowHandle: 1
 
uint renderToTexture: 1
 
uint textureChildSeen: 1
 
uint inheritsInputMethodHints: 1
 
uint renderToTextureReallyDirty: 1
 
uint usesRhiFlush: 1
 
uint childrenHiddenByWState: 1
 
uint childrenShownByExpose: 1
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Friends

class QMessageBoxPrivate
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
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 }
 
enum class  FocusDirection { Previous , Next }
 
enum class  FocusChainRemovalRule { EnsureFocusOut = 0x01 , AssertConsistency = 0x02 }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 
- Static Public Member Functions inherited from QWidgetPrivate
static QWidgetPrivateget (QWidget *w)
 
static const QWidgetPrivateget (const QWidget *w)
 
static void checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight)
 
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr)
 
static QWidgetparentGraphicsView (const QWidget *widget)
 
static QRect screenGeometry (const QWidget *widget)
 
static QRect availableScreenGeometry (const QWidget *widget)
 
static QScreenscreen (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 insertIntoFocusChain (const QWidgetList &toBeInserted, FocusDirection direction, QWidget *position)
 
static QWidgetList takeFromFocusChain (QWidget *from, QWidget *to, FocusDirection direction=FocusDirection::Next)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (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 inherited from QWidgetPrivate
static QWidgetMappermapper = nullptr
 
static QWidgetSetallWidgets = nullptr
 
static int instanceCounter = 0
 
static int maxInstances = 0
 

Detailed Description

Definition at line 43 of file qlabel_p.h.

Constructor & Destructor Documentation

◆ QLabelPrivate()

QLabelPrivate::QLabelPrivate ( )

Definition at line 29 of file qlabel.cpp.

◆ ~QLabelPrivate()

QLabelPrivate::~QLabelPrivate ( )

Definition at line 74 of file qlabel.cpp.

Member Function Documentation

◆ buddyDeleted()

void QLabelPrivate::buddyDeleted ( )

Definition at line 1224 of file qlabel.cpp.

Referenced by QLabel::setBuddy().

+ Here is the caller graph for this function:

◆ clearContents()

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.

+ Here is the call graph for this function:

◆ createStandardContextMenu()

QMenu * QLabelPrivate::createStandardContextMenu ( const QPoint & pos)

Definition at line 1655 of file qlabel.cpp.

References control, QWidgetTextControl::createStandardContextMenu(), layoutPoint(), and pos.

+ Here is the call graph for this function:

◆ documentRect()

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().

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

◆ ensureTextControl()

◆ ensureTextLayouted()

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().

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

◆ ensureTextPopulated()

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().

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

◆ init()

void QLabelPrivate::init ( )

Definition at line 224 of file qlabel.cpp.

References QSizePolicy::Label, QSizePolicy::Preferred, QStyle::SE_LabelLayoutItem, and QWidgetPrivate::setLayoutItemMargins().

+ Here is the call graph for this function:

◆ layoutPoint()

QPoint QLabelPrivate::layoutPoint ( const QPoint & p) const

Definition at line 1648 of file qlabel.cpp.

References layoutRect(), and QRectF::toRect().

Referenced by createStandardContextMenu().

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

◆ layoutRect()

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().

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

◆ linkHovered()

void QLabelPrivate::linkHovered ( const QString & link)

Definition at line 1606 of file qlabel.cpp.

References cursor, emit, QString::isEmpty(), onAnchor, Qt::PointingHandCursor, validCursor, and Qt::WA_SetCursor.

Referenced by ensureTextControl().

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

◆ needTextControl()

bool QLabelPrivate::needTextControl ( ) const
inline

◆ sendControlEvent()

void QLabelPrivate::sendControlEvent ( QEvent * e)

Definition at line 1596 of file qlabel.cpp.

References control, QEvent::ignore(), isTextLabel, layoutRect(), Qt::NoTextInteraction, QWidgetTextControl::processEvent(), and textInteractionFlags.

+ Here is the call graph for this function:

◆ sizeForWidth()

QSize QLabelPrivate::sizeForWidth ( int w) const

◆ textDirection()

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().

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

◆ updateLabel()

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().

+ Here is the call graph for this function:

◆ updateShortcut()

void QLabelPrivate::updateShortcut ( )

Definition at line 1207 of file qlabel.cpp.

References QString::contains(), hasShortcut, QKeySequence::mnemonic(), Q_ASSERT, shortcutId, and text.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QMessageBoxPrivate

friend class QMessageBoxPrivate
friend

Definition at line 129 of file qlabel_p.h.

Member Data Documentation

◆ align

ushort QLabelPrivate::align

Definition at line 113 of file qlabel_p.h.

Referenced by documentRect(), ensureTextLayouted(), layoutRect(), sizeForWidth(), and updateLabel().

◆ buddy

QPointer<QWidget> QLabelPrivate::buddy

Definition at line 105 of file qlabel_p.h.

◆ cachedimage

std::optional<QImage> QLabelPrivate::cachedimage

Definition at line 91 of file qlabel_p.h.

Referenced by clearContents().

◆ control

◆ cursor

QCursor QLabelPrivate::cursor

Definition at line 102 of file qlabel_p.h.

Referenced by clearContents(), ensureTextPopulated(), and linkHovered().

◆ effectiveTextFormat

Qt::TextFormat QLabelPrivate::effectiveTextFormat

Definition at line 109 of file qlabel_p.h.

Referenced by ensureTextPopulated().

◆ hasShortcut

uint QLabelPrivate::hasShortcut
mutable

Definition at line 120 of file qlabel_p.h.

Referenced by clearContents(), ensureTextPopulated(), sizeForWidth(), and updateShortcut().

◆ indent

short QLabelPrivate::indent

Definition at line 114 of file qlabel_p.h.

Referenced by documentRect(), and sizeForWidth().

◆ isTextLabel

uint QLabelPrivate::isTextLabel
mutable

◆ margin

int QLabelPrivate::margin

Definition at line 112 of file qlabel_p.h.

Referenced by documentRect(), and sizeForWidth().

◆ msh

QSize QLabelPrivate::msh
mutable

Definition at line 87 of file qlabel_p.h.

◆ onAnchor

uint QLabelPrivate::onAnchor

Definition at line 123 of file qlabel_p.h.

Referenced by clearContents(), and linkHovered().

◆ openExternalLinks

uint QLabelPrivate::openExternalLinks

Definition at line 125 of file qlabel_p.h.

Referenced by ensureTextControl().

◆ picture

std::optional<QPicture> QLabelPrivate::picture

Definition at line 93 of file qlabel_p.h.

◆ pixmap

std::optional<QPixmap> QLabelPrivate::pixmap

Definition at line 89 of file qlabel_p.h.

Referenced by clearContents(), and sizeForWidth().

◆ resourceProvider

QTextDocument::ResourceProvider QLabelPrivate::resourceProvider

Definition at line 127 of file qlabel_p.h.

Referenced by ensureTextControl().

◆ scaledcontents

uint QLabelPrivate::scaledcontents

Definition at line 116 of file qlabel_p.h.

◆ scaledpixmap

std::optional<QPixmap> QLabelPrivate::scaledpixmap

Definition at line 90 of file qlabel_p.h.

Referenced by clearContents().

◆ sh

QSize QLabelPrivate::sh
mutable

Definition at line 86 of file qlabel_p.h.

◆ shortcutCursor

QTextCursor QLabelPrivate::shortcutCursor
mutable

Definition at line 100 of file qlabel_p.h.

Referenced by ensureTextPopulated().

◆ shortcutId

int QLabelPrivate::shortcutId

Definition at line 106 of file qlabel_p.h.

Referenced by clearContents(), and updateShortcut().

◆ sizePolicy

QSizePolicy QLabelPrivate::sizePolicy
mutable

Definition at line 111 of file qlabel_p.h.

◆ text

QString QLabelPrivate::text

◆ textDirty

uint QLabelPrivate::textDirty
mutable

Definition at line 118 of file qlabel_p.h.

Referenced by ensureTextControl(), and ensureTextPopulated().

◆ textformat

Qt::TextFormat QLabelPrivate::textformat

Definition at line 108 of file qlabel_p.h.

◆ textInteractionFlags

Qt::TextInteractionFlags QLabelPrivate::textInteractionFlags

Definition at line 110 of file qlabel_p.h.

Referenced by ensureTextControl(), and sendControlEvent().

◆ textLayoutDirty

uint QLabelPrivate::textLayoutDirty
mutable

Definition at line 117 of file qlabel_p.h.

Referenced by ensureTextControl(), ensureTextLayouted(), and updateLabel().

◆ valid_hints

uint QLabelPrivate::valid_hints
mutable

Definition at line 115 of file qlabel_p.h.

Referenced by updateLabel().

◆ validCursor

uint QLabelPrivate::validCursor

Definition at line 122 of file qlabel_p.h.

Referenced by clearContents(), and linkHovered().


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