QtBase  v6.3.1
Public Member Functions | Protected Member Functions | List of all members
PixmapWidget Class Reference
Inheritance diagram for PixmapWidget:
Inheritance graph
[legend]
Collaboration diagram for PixmapWidget:
Collaboration graph
[legend]

Public Member Functions

 PixmapWidget (const QPixmap &pix)
 
 ~PixmapWidget ()
 
void setZValue (qreal z)
 
void setGeometry (const QRectF &rect) override
 
- Public Member Functions inherited from QGraphicsLayoutItem
 QGraphicsLayoutItem (QGraphicsLayoutItem *parent=nullptr, bool isLayout=false)
 
virtual ~QGraphicsLayoutItem ()
 
void setSizePolicy (const QSizePolicy &policy)
 
void setSizePolicy (QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType=QSizePolicy::DefaultType)
 
QSizePolicy sizePolicy () const
 
void setMinimumSize (const QSizeF &size)
 
void setMinimumSize (qreal w, qreal h)
 
QSizeF minimumSize () const
 
void setMinimumWidth (qreal width)
 
qreal minimumWidth () const
 
void setMinimumHeight (qreal height)
 
qreal minimumHeight () const
 
void setPreferredSize (const QSizeF &size)
 
void setPreferredSize (qreal w, qreal h)
 
QSizeF preferredSize () const
 
void setPreferredWidth (qreal width)
 
qreal preferredWidth () const
 
void setPreferredHeight (qreal height)
 
qreal preferredHeight () const
 
void setMaximumSize (const QSizeF &size)
 
void setMaximumSize (qreal w, qreal h)
 
QSizeF maximumSize () const
 
void setMaximumWidth (qreal width)
 
qreal maximumWidth () const
 
void setMaximumHeight (qreal height)
 
qreal maximumHeight () const
 
QRectF geometry () const
 
virtual void getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const
 
QRectF contentsRect () const
 
QSizeF effectiveSizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
 
virtual void updateGeometry ()
 
virtual bool isEmpty () const
 
QGraphicsLayoutItemparentLayoutItem () const
 
void setParentLayoutItem (QGraphicsLayoutItem *parent)
 
bool isLayout () const
 
QGraphicsItemgraphicsItem () const
 
bool ownedByLayout () const
 

Protected Member Functions

QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const override
 
- Protected Member Functions inherited from QGraphicsLayoutItem
void setGraphicsItem (QGraphicsItem *item)
 
void setOwnedByLayout (bool ownedByLayout)
 
 QGraphicsLayoutItem (QGraphicsLayoutItemPrivate &dd)
 

Additional Inherited Members

- Protected Attributes inherited from QGraphicsLayoutItem
QScopedPointer< QGraphicsLayoutItemPrivated_ptr
 

Detailed Description

Definition at line 79 of file main.cpp.

Constructor & Destructor Documentation

◆ PixmapWidget()

PixmapWidget::PixmapWidget ( const QPixmap pix)
inline

Definition at line 82 of file main.cpp.

Here is the call graph for this function:

◆ ~PixmapWidget()

PixmapWidget::~PixmapWidget ( )
inline

Definition at line 90 of file main.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ setGeometry()

void PixmapWidget::setGeometry ( const QRectF rect)
inlineoverridevirtual

This virtual function sets the geometry of the QGraphicsLayoutItem to rect, which is in parent coordinates (e.g., the top-left corner of rect is equivalent to the item's position in parent coordinates).

You must reimplement this function in a subclass of QGraphicsLayoutItem to receive geometry updates. The layout will call this function when it does a rearrangement.

If rect is outside of the bounds of minimumSize and maximumSize, it will be adjusted to its closest size so that it is within the legal bounds.

See also
geometry()

Reimplemented from QGraphicsLayoutItem.

Definition at line 101 of file main.cpp.

Here is the call graph for this function:

◆ setZValue()

void PixmapWidget::setZValue ( qreal  z)
inline

Definition at line 96 of file main.cpp.

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

◆ sizeHint()

QSizeF PixmapWidget::sizeHint ( Qt::SizeHint  which,
const QSizeF constraint = QSizeF() 
) const
inlineoverrideprotectedvirtual

This pure virtual function returns the size hint for which of the QGraphicsLayoutItem, using the width or height of constraint to constrain the output.

Reimplement this function in a subclass of QGraphicsLayoutItem to provide the necessary size hints for your items.

See also
effectiveSizeHint()

Implements QGraphicsLayoutItem.

Definition at line 110 of file main.cpp.

Here is the call graph for this function:

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