6#include "QskBoxSkinlet.h"
9QskBoxSkinlet::QskBoxSkinlet(
QskSkin* skin )
12 setNodeRoles( { PanelRole } );
15QskBoxSkinlet::~QskBoxSkinlet()
19QRectF QskBoxSkinlet::subControlRect(
const QskSkinnable* skinnable,
22 if ( subControl == QskBox::Panel )
27 return Inherited::subControlRect( skinnable, contentsRect, subControl );
30QSGNode* QskBoxSkinlet::updateSubNode(
31 const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node )
const
33 const auto box =
static_cast< const QskBox*
>( skinnable );
39 if ( !box->hasPanel() )
42 return updateBoxNode( skinnable, node, QskBox::Panel );
46 return Inherited::updateSubNode( skinnable, nodeRole, node );
49QSizeF QskBoxSkinlet::sizeHint(
const QskSkinnable* skinnable,
50 Qt::SizeHint which,
const QSizeF& constraint )
const
52 const auto box =
static_cast< const QskBox*
>( skinnable );
54 if ( box->hasPanel() && which == Qt::PreferredSize )
57 return Inherited::sizeHint( skinnable, which, constraint );
60#include "moc_QskBoxSkinlet.cpp"
Subcontrol
For use within the rendering or lay-outing of a specific QskSkinnable.
QSizeF strutSizeHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a strut size hint.