Loading...
Searching...
No Matches
Public Member Functions |
Static Public Member Functions |
Protected Attributes |
List of all members
score::GraphicsLayout Class Reference
Inheritance diagram for score::GraphicsLayout:
Public Member Functions | |
| GraphicsLayout (QGraphicsItem *parent) | |
| virtual void | layout () |
| virtual void | centerContent () |
| void | setBrush (score::BrushSet &b) |
| void | setBackground (const QString &b) |
| bool | hasBackground () const noexcept |
| Whether the layout paints a box of its own. | |
| void | setMargin (qreal m) |
| void | setPadding (qreal p) |
| void | setSpacing (qreal s) |
| Gap between box layout children. Default: 2 * padding. | |
| qreal | spacing () const noexcept |
| void | setAlignment (Qt::Alignment a) |
| Qt::Alignment | alignment () const noexcept |
| void | updateChildrenRects (const QList< QGraphicsItem * > &) |
| void | setFitMargins (qreal right, qreal bottom) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
Public Member Functions inherited from score::BackgroundItem | |
| BackgroundItem (QGraphicsItem *parent) | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| void | setRect (const QRectF &r) |
| const QRectF & | rect () const noexcept |
| QRectF | boundingRect () const final override |
| void | fitChildrenRect () |
| int | type () const override |
Public Member Functions inherited from score::ResizeableItem | |
| ResizeableItem (QGraphicsItem *parent) | |
| void | sizeChanged (QSizeF sz) |
| void | childrenSizeChanged () |
| double | minimumHeight () const noexcept |
| void | setMinimumHeight (double w) |
| void | minimumHeightChanged (double w) |
| double | minimumWidth () const noexcept |
| void | setMinimumWidth (double w) |
| void | minimumWidthChanged (double w) |
| int | type () const override |
Static Public Member Functions | |
| static void | relayoutAround (QGraphicsItem *item) |
Protected Attributes | |
| score::BrushSet * | m_bg {} |
| QPixmap * | m_pix {} |
| qreal | m_margin {} |
| qreal | m_padding {} |
| qreal | m_spacing {-1.} |
| qreal | m_fitRight {-1.} |
| qreal | m_fitBottom {-1.} |
| Qt::Alignment | m_alignment {} |
Protected Attributes inherited from score::ResizeableItem | |
| double | m_minimumHeight {} |
| double | m_minimumWidth {} |
Additional Inherited Members | |
Public Types inherited from score::BackgroundItem | |
| enum | { Type = UserType + 80003 } |
Public Types inherited from score::ResizeableItem | |
| enum | { Type = UserType + 80000 } |
Member Function Documentation
◆ relayoutAround()
|
static |
Lays out again the containers and layouts around an item whose size changed, innermost first, and reports it to the outermost layout's owner through its childrenSizeChanged().
◆ setAlignment()
| void score::GraphicsLayout::setAlignment | ( | Qt::Alignment | a | ) |
Where children sit across the free space of their cell, row or column. Only the horizontal flags count. None: the layout's own placement.
◆ setFitMargins()
| void score::GraphicsLayout::setFitMargins | ( | qreal | right, |
| qreal | bottom | ||
| ) |
The layout keeps its children's bounding rect plus these margins as its size, also when relayoutAround() lays it out again.
The documentation for this class was generated from the following files:
- GraphicsLayout.hpp
- GraphicsLayout.cpp
Public Member Functions inherited from