8#include "QskBoxBorderMetrics.h"
9#include "QskBoxBorderColors.h"
10#include "QskGradient.h"
12QSK_SUBCONTROL(
QskBox, Panel )
14QskBox::QskBox( QQuickItem* parent )
19QskBox::QskBox(
bool hasPanel, QQuickItem* parent )
21 , m_hasPanel( hasPanel )
29void QskBox::setPanel(
bool on )
31 if ( on != m_hasPanel )
41bool QskBox::hasPanel()
const
54 Q_EMIT borderMetricsChanged( borderMetrics() );
57void QskBox::resetBorderMetrics()
60 Q_EMIT borderMetricsChanged( borderMetrics() );
71 Q_EMIT borderColorsChanged( borderColors() );
74void QskBox::resetBorderColors()
77 Q_EMIT borderColorsChanged( borderColors() );
85void QskBox::setFillGradient(
const QskGradient& gradient )
88 Q_EMIT fillGradientChanged( gradient );
91void QskBox::resetFillGradient()
94 Q_EMIT fillGradientChanged( fillGradient() );
97void QskBox::setPadding( qreal padding )
102void QskBox::setPadding(
const QMarginsF& padding )
104 const auto pd =
QskMargins().expandedTo( padding );
107 Q_EMIT paddingChanged( pd );
110void QskBox::resetPadding()
116QMarginsF QskBox::padding()
const
129#include "moc_QskBox.cpp"
QRectF layoutRectForSize(const QSizeF &) const override
QRectF subControlContentsRect(QskAspect::Subcontrol) const
virtual QRectF layoutRectForSize(const QSizeF &) const
QMarginsF paddingHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a padding hint.
bool resetColor(QskAspect)
Removes a color hint from the local table.
QskGradient gradientHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a color hint as gradient.
bool setBoxBorderColorsHint(QskAspect, const QskBoxBorderColors &)
Sets a border colors hint.
bool setPaddingHint(QskAspect, qreal)
Sets a padding hint.
bool resetBoxBorderColorsHint(QskAspect)
Removes a border colors hint from the local table.
bool setGradientHint(QskAspect, const QskGradient &)
Sets a gradient as color hint.
bool setBoxBorderMetricsHint(QskAspect, const QskBoxBorderMetrics &)
Sets a border metrics hint.
bool resetBoxBorderMetricsHint(QskAspect)
Removes a border metrics hint from the local table.
QskBoxBorderColors boxBorderColorsHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves border colors hint.
QskBoxBorderMetrics boxBorderMetricsHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a border hint.
bool resetPaddingHint(QskAspect)
Removes a padding hint from the local table.