6#include "QskSkinnable.h"
8#include "QskAnimationHint.h"
9#include "QskArcMetrics.h"
11#include "QskColorFilter.h"
12#include "QskControl.h"
13#include "QskHintAnimator.h"
14#include "QskMargins.h"
15#include "QskSkinManager.h"
17#include "QskSkinHintTable.h"
18#include "QskSkinTransition.h"
19#include "QskSkinlet.h"
22#include "QskBoxShapeMetrics.h"
23#include "QskBoxBorderMetrics.h"
24#include "QskBoxBorderColors.h"
25#include "QskShadowMetrics.h"
26#include "QskStippleMetrics.h"
27#include "QskBoxHints.h"
28#include "QskGradient.h"
29#include "QskTextOptions.h"
30#include "QskGraphic.h"
31#include "QskFontRole.h"
34#include <qfontmetrics.h>
38#define DEBUG_ANIMATOR 0
41static inline bool qskIsControl(
const QskSkinnable* skinnable )
43 return skinnable->
metaObject()->inherits( &QskControl::staticMetaObject );
49 return skinnable->
setSkinHint( aspect, QVariant( flag ) );
59 const QskAspect aspect,
const QVariant& metric )
64static inline bool qskMoveMetric(
QskSkinnable* skinnable,
65 const QskAspect aspect,
const QVariant& metric )
74 return qskSetMetric( skinnable, aspect, QVariant::fromValue( metric ) );
78static inline bool qskMoveMetric(
QskSkinnable* skinnable,
81 return qskMoveMetric( skinnable, aspect, QVariant::fromValue( metric ) );
93 const QskAspect aspect,
const QVariant& color )
99 const QskAspect aspect,
const QVariant& color )
104template<
typename T >
108 return qskSetColor( skinnable, aspect, QVariant::fromValue( color ) );
111template<
typename T >
112static inline bool qskMoveColor(
QskSkinnable* skinnable,
115 return qskMoveColor( skinnable, aspect, QVariant::fromValue( color ) );
118template<
typename T >
136static inline void qskTriggerUpdates(
QskAspect aspect, QQuickItem* item )
157 auto control = qskControlCast( item );
158 if ( control ==
nullptr )
161 bool maybeLayout =
false;
163 switch( aspect.
type() )
171 control->resetImplicitSize();
199 control->resetImplicitSize();
206 if ( maybeLayout && control->hasChildItems() )
208 if ( control->polishOnResize() || control->autoLayoutChildren() )
213static inline QskAspect qskSubstitutedAspect(
219 qWarning() <<
"QskSkinnable::(re)setSkinHint: setting hints with states "
220 "is discouraged - use QskSkinTableEditor if you are sure, that you need this.";
222 qWarning() <<
"QskAspect:" << aspect.
stateless()
223 << skinnable->skinStatesAsPrintable( aspect.
states() );
235class QskSkinnable::PrivateData
240 if ( hasLocalSkinlet )
242 if ( skinlet && skinlet->isOwnedBySkinnable() )
246 delete subcontrolProxies;
252 int sampleIndex = -1;
254 typedef std::map< QskAspect::Subcontrol, QskAspect::Subcontrol > ProxyMap;
255 ProxyMap* subcontrolProxies =
nullptr;
259 QskAspect::States skinStates;
260 bool hasLocalSkinlet =
false;
264 : m_data( new PrivateData() )
274 if (
skinlet == m_data->skinlet )
279 m_data->hasLocalSkinlet =
true;
284 if ( m_data->skinlet && m_data->skinlet->isOwnedBySkinnable() )
285 delete m_data->skinlet;
288 m_data->hasLocalSkinlet = (
skinlet != nullptr );
290 if (
auto item = owningItem() )
292 if (
auto control = qskControlCast( item ) )
293 control->resetImplicitSize();
297 if ( item->flags() & QQuickItem::ItemHasContents )
304 return m_data->hasLocalSkinlet ? m_data->skinlet :
nullptr;
309 if ( m_data->skinlet ==
nullptr )
312 m_data->hasLocalSkinlet =
false;
315 return m_data->skinlet;
318void QskSkinnable::setSubcontrolProxy(
321 if ( subControl == QskAspect::NoSubcontrol )
324 if ( proxy == QskAspect::NoSubcontrol || subControl == proxy )
326 resetSubcontrolProxy( subControl );
330 if ( m_data->subcontrolProxies ==
nullptr )
331 m_data->subcontrolProxies =
new PrivateData::ProxyMap();
333 ( *m_data->subcontrolProxies )[ subControl ] = proxy;
338 if (
auto& proxies = m_data->subcontrolProxies )
340 auto it = proxies->find( subcontrol );
341 if ( it != proxies->end() )
343 proxies->erase( it );
344 if ( proxies->empty() )
355 if (
const auto proxies = m_data->subcontrolProxies )
357 auto it = proxies->find( subControl );
358 if ( it != proxies->end() )
362 return QskAspect::NoSubcontrol;
367 return m_data->hintTable;
372 return m_data->hintTable;
377 return qskSetFlag(
this, aspect, flag );
392 return qskSetColor(
this, aspect,
color );
397 return qskSetColor(
this, aspect, QColor(
color ) );
402 return qskSetColor(
this, aspect, QColor::fromRgba( rgb ) );
405bool QskSkinnable::moveColor(
const QskAspect aspect,
const QColor& color )
407 return qskMoveColor(
this, aspect,
color );
410bool QskSkinnable::moveColor(
const QskAspect aspect, Qt::GlobalColor color )
412 return qskMoveColor(
this, aspect, QColor(
color ) );
415bool QskSkinnable::moveColor(
const QskAspect aspect, QRgb rgb )
417 return qskMoveColor(
this, aspect, QColor::fromRgba( rgb ) );
422 return qskColor< QColor >(
this, aspect, status );
427 return qskSetMetric(
this, aspect, metric );
430bool QskSkinnable::moveMetric(
QskAspect aspect, qreal metric )
432 return qskMoveMetric(
this, aspect, metric );
437 return qskMetric< qreal >(
this, aspect, status );
440qreal QskSkinnable::metric(
QskAspect aspect, qreal defaultValue )
const
444 const auto value = qskMetric< qreal >(
this, aspect, &status );
445 return status.
isValid() ? value : defaultValue;
448bool QskSkinnable::setPositionHint(
QskAspect aspect, qreal position )
453bool QskSkinnable::movePositionHint(
QskAspect aspect, qreal position )
458bool QskSkinnable::movePositionHint(
QskAspect aspect, qreal from, qreal to )
461 QVariant::fromValue( from ), QVariant::fromValue( to ) );
464bool QskSkinnable::resetPositionHint(
QskAspect aspect )
475 const QskAspect aspect, qreal width, qreal height )
541 return qskSetColor(
this, aspect, gradient );
547 return qskColor< QskGradient >(
this, aspect, status );
564 return qskMetric< QskBoxShapeMetrics >(
582 return qskMetric< QskBoxBorderMetrics >(
600 return qskColor< QskBoxBorderColors >(
604bool QskSkinnable::setShadowMetricsHint(
610bool QskSkinnable::resetShadowMetricsHint(
QskAspect aspect )
618 return qskMetric< QskShadowMetrics >(
622bool QskSkinnable::setShadowColorHint(
QskAspect aspect,
const QColor& color )
627bool QskSkinnable::resetShadowColorHint(
QskAspect aspect )
642 shadowMetricsHint( aspect ), shadowColorHint( aspect ) );
645bool QskSkinnable::setArcMetricsHint(
651bool QskSkinnable::resetArcMetricsHint(
const QskAspect aspect )
659 return qskMetric< QskArcMetrics >(
663bool QskSkinnable::setStippleMetricsHint(
669bool QskSkinnable::resetStippleMetricsHint(
QskAspect aspect )
677 return qskMetric< QskStippleMetrics >(
697bool QskSkinnable::setTextOptionsHint(
701 QVariant::fromValue( options ) );
704bool QskSkinnable::resetTextOptionsHint(
const QskAspect aspect )
720 QVariant::fromValue( role ) );
738 if ( hint.canConvert< QFont >() )
745 return hint.value< QFont >();
752 if (
auto item = owningItem() )
754 const auto v = QskSkinTransition::animatedFontSize(
755 item->window(), fontRole );
757 if ( v.canConvert<
int >() )
759 font.setPixelSize( v.value<
int >() );
767qreal QskSkinnable::effectiveFontHeight(
const QskAspect aspect )
const
789bool QskSkinnable::setSymbolHint(
793 QVariant::fromValue( symbol ) );
796bool QskSkinnable::resetSymbolHint(
const QskAspect aspect )
805 aspect | QskAspect::Symbol, status ).value<
QskGraphic >();
819 aspect.setSection( section() );
824 const auto hint = storedHint( aspect | skinStates(), &status );
829 aspect.setSection( QskAspect::Body );
833 const auto v = animatedHint( aspect,
nullptr );
839 if (
auto item = owningItem() )
841 const auto graphicRole = hint.toInt();
843 const auto v = QskSkinTransition::animatedGraphicFilter(
844 item->window(), graphicRole );
868 return m_data->hintTable.setAnimation( aspect, hint );
878bool QskSkinnable::hasAnimationHint(
QskAspect aspect )
const
892 auto aspect = subControl | type | states;
898 const auto a = m_data->hintTable.resolvedAnimator( aspect, hint );
899 if ( a.isAnimator() )
913 const auto a = skin->hintTable().resolvedAnimator( aspect, hint );
914 if ( a.isAnimator() )
937 aspect = qskSubstitutedAspect(
this, aspect );
939 if ( m_data->hintTable.setHint( aspect, hint ) )
941 qskTriggerUpdates( aspect, owningItem() );
950 aspect = qskSubstitutedAspect(
this, aspect );
952 if ( m_data->hintTable.removeHint( aspect ) )
954 qskTriggerUpdates( aspect, owningItem() );
968 const auto v = animatedHint( aspect, status );
973 if ( aspect.section() == QskAspect::Body )
974 aspect.setSection( section() );
982 if ( !aspect.
isAnimator() && QskSkinTransition::isRunning() )
988 const auto v = interpolatedHint( aspect, status );
993 return storedHint( aspect, status );
1004bool QskSkinnable::moveSkinHint(
QskAspect aspect,
1005 const QVariant& oldValue,
const QVariant& newValue )
1012 if ( ok && oldValue.isValid() && newValue.isValid() )
1015 if ( animation.isValid() )
1017 if ( newValue != oldValue )
1018 startTransition( aspect, animation, oldValue, newValue );
1025bool QskSkinnable::moveSkinHint(
QskAspect aspect,
const QVariant& value )
1033 const auto& animators = m_data->animators;
1035 if ( animators.isEmpty() )
1038 aspect = qskAnimatorAspect( aspect );
1040 auto animator = animators.animator( aspect, index );
1041 if ( animator ==
nullptr && index >= 0 )
1042 animator = animators.animator( aspect, -1 );
1047QVariant QskSkinnable::animatedHint(
1052 if ( !m_data->animators.isEmpty() )
1054 const auto a = qskAnimatorAspect( aspect );
1056 v = m_data->animators.currentValue( a, m_data->sampleIndex );
1057 if ( !v.isValid() && m_data->sampleIndex >= 0 )
1058 v = m_data->animators.currentValue( a, -1 );
1061 if ( status && v.isValid() )
1070QVariant QskSkinnable::interpolatedHint(
1073 if ( !QskSkinTransition::isRunning() || m_data->hintTable.hasHint( aspect ) )
1076 const auto item = owningItem();
1077 if ( item ==
nullptr )
1086 v = QskSkinTransition::animatedHint( item->window(), aspect );
1090 if (
const auto topState = aspect.
topState() )
1106 if ( a.section() != QskAspect::Body )
1110 a.setSection( QskAspect::Body );
1119 if ( status && v.isValid() )
1128const QVariant& QskSkinnable::storedHint(
1135 const auto& localTable = m_data->hintTable;
1136 if ( localTable.hasHints() )
1138 if (
const auto value = localTable.resolvedHint( aspect, &resolvedAspect ) )
1143 status->
aspect = resolvedAspect;
1151 const auto& skinTable = skin->hintTable();
1152 if ( skinTable.hasHints() )
1154 if (
const auto value = skinTable.resolvedHint( aspect, &resolvedAspect ) )
1159 status->
aspect = resolvedAspect;
1165 if ( aspect.hasSubcontrol() )
1169 aspect.clearSubcontrol();
1172 if (
const auto value = skinTable.resolvedHint( aspect, &resolvedAspect ) )
1177 status->
aspect = resolvedAspect;
1191 static QVariant hintInvalid;
1197 return ( m_data->skinStates & state ) == state;
1200QskAspect::States QskSkinnable::skinStates()
const
1202 return m_data->skinStates;
1205const char* QskSkinnable::skinStatesAsPrintable()
const
1207 return skinStatesAsPrintable( skinStates() );
1210const char* QskSkinnable::skinStatesAsPrintable( QskAspect::States states )
const
1214 QDebug
debug( &tmp );
1218 static QByteArray bytes[ 10 ];
1219 static int counter = 0;
1221 counter = ( counter + 1 ) % 10;
1223 bytes[ counter ] = tmp.toUtf8();
1224 return bytes[ counter ].constData();
1228 QskAspect aspect,
const QSizeF& size,
bool inner )
1230 const auto shape = skinnable->
boxShapeHint( aspect ).toAbsolute( size );
1233 const qreal left = qMax( shape.radius( Qt::TopLeftCorner ).width(),
1234 shape.radius( Qt::BottomLeftCorner ).width() );
1236 const qreal top = qMax( shape.radius( Qt::TopLeftCorner ).height(),
1237 shape.radius( Qt::TopRightCorner ).height() );
1239 const qreal right = qMax( shape.radius( Qt::TopRightCorner ).width(),
1240 shape.radius( Qt::BottomRightCorner ).width() );
1242 const qreal bottom = qMax( shape.radius( Qt::BottomLeftCorner ).height(),
1243 shape.radius( Qt::BottomRightCorner ).height() );
1245 QskMargins padding( left, top, right, bottom );
1248 const auto borderMargins = borderMetrics.toAbsolute( size ).widths() * 0.5;
1252 padding -= borderMargins;
1257 padding += borderMargins;
1261 padding *= 1.0 - 0.70710678;
1263 return padding.expandedTo( skinnable->
paddingHint( aspect ) );
1267 QskAspect aspect,
const QSizeF& outerBoxSize )
const
1269 return qskEffectivePadding(
this, aspect,
outerBoxSize,
true );
1273 QskAspect aspect,
const QSizeF& outerBoxSize )
const
1275 const auto pd = qskEffectivePadding(
this, aspect,
outerBoxSize,
true );
1282 QskAspect aspect,
const QRectF& outerBox )
const
1284 const auto pd = qskEffectivePadding(
this, aspect,
outerBox.size(),
true );
1285 return outerBox.marginsRemoved( pd );
1289 QskAspect aspect,
const QSizeF& innerBoxSize )
const
1291 const auto pd = qskEffectivePadding(
this, aspect,
innerBoxSize,
false );
1296 QskAspect aspect,
const QRectF& innerBox )
const
1298 const auto m = qskEffectivePadding(
this, aspect,
innerBox.size(),
false );
1305 return effectiveSkinlet()->subControlRect(
this, contentsRect, subControl );
1318 if (
auto control = qskControlCast( owningItem() ) )
1326 if ( control->flags() & QQuickItem::ItemHasContents )
1327 return control->isInitiallyPainted();
1335void QskSkinnable::startTransition(
QskAspect aspect,
1341void QskSkinnable::startTransition(
QskAspect aspect,
int index,
1345 startHintTransition( aspect, index,
animationHint, from, to );
1348void QskSkinnable::startHintTransition(
QskAspect aspect,
int index,
1354 auto control = qskControlCast( owningItem() );
1358 if ( !QskVariantAnimator::maybeInterpolate( from, to,
false ) )
1364 if ( aspect.
type() == QskAspect::NoType &&
1369 v1.setValue( skin->graphicFilter( v1.toInt() ) );
1370 v2.setValue( skin->graphicFilter( v2.toInt() ) );
1373 aspect = qskAnimatorAspect( aspect );
1379 auto animator = m_data->animators.animator( aspect, index );
1380 if ( animator && animator->isRunning() )
1381 v1 = animator->currentValue();
1383 m_data->animators.start( control, aspect, index,
animationHint, v1, v2 );
1388 const auto newState = on
1389 ? ( m_data->skinStates | stateFlag )
1390 : ( m_data->skinStates & ~stateFlag );
1392 setSkinStates( newState );
1395void QskSkinnable::replaceSkinStates(
1396 QskAspect::States newStates,
int sampleIndex )
1407 m_data->skinStates = newStates;
1408 m_data->sampleIndex = sampleIndex;
1411void QskSkinnable::addSkinStates( QskAspect::States states )
1413 setSkinStates( m_data->skinStates | states );
1416void QskSkinnable::clearSkinStates( QskAspect::States states )
1418 setSkinStates( m_data->skinStates & ~states );
1421void QskSkinnable::setSkinStates( QskAspect::States newStates )
1423 if ( m_data->skinStates == newStates )
1426 auto item = owningItem();
1429 const auto className = item ? item->className() :
"QskSkinnable";
1431 qDebug() << className <<
":"
1432 << skinStateAsPrintable( m_data->skinState ) <<
"->"
1433 << skinStateAsPrintable( newState );
1436 if ( item && item->window() )
1440 const auto mask = m_data->hintTable.states() | skin->hintTable().states();
1441 if ( ( newStates & mask ) != ( m_data->skinStates & mask ) )
1448 startHintTransitions( m_data->skinStates, newStates );
1452 if ( item->flags() & QQuickItem::ItemHasContents )
1456 m_data->skinStates = newStates;
1459bool QskSkinnable::startHintTransitions(
1460 QskAspect::States oldStates, QskAspect::States newStates,
int index )
1462 QVector< QskAspect::Subcontrol > subControls;
1464 if (
const auto control = qskControlCast( owningItem() ) )
1465 subControls = control->subControls();
1467 return startHintTransitions( subControls, oldStates, newStates, index );
1470bool QskSkinnable::startHintTransitions(
1471 const QVector< QskAspect::Subcontrol >& subControls,
1472 QskAspect::States oldStates, QskAspect::States newStates,
int index )
1480 bool started =
false;
1484 aspect.setSection( section() );
1487 const auto control = qskControlCast( owningItem() );
1488 if ( control ==
nullptr )
1491 const auto primitiveCount = QskAspect::primitiveCount();
1493 for (
const auto subControl : subControls )
1495 aspect.setSubcontrol( subControl );
1497 const auto& skinTable = skin->hintTable();
1499 for ( uint i = 0; i < QskAspect::typeCount; i++ )
1505 if ( hint.duration > 0 )
1512 for ( uint j = 0; j < primitiveCount; j++ )
1517 const auto a1 = aspect | oldStates;
1518 const auto a2 = aspect | newStates;
1520 bool doTransition =
true;
1531 doTransition = !skinTable.isResolutionMatching( a1, a2 );
1536 startHintTransition( aspect, index, hint,
1537 storedHint( a1 ), storedHint( a2 ) );
1553 if ( m_data->skinlet )
1554 skin = m_data->skinlet->skin();
1556 if ( skin ==
nullptr )
1558 if (
const auto item = owningItem() )
1559 skin = qskEffectiveSkin( item->window() );
1562 return skin ? skin : qskSkinManager->skin();
1570QskAspect::Section QskSkinnable::section()
const
1572 return QskAspect::Body;
1583 if (
const auto proxies = m_data->subcontrolProxies )
1585 auto it = proxies->find( subControl );
1586 if ( it != proxies->end() )
1590 return substitutedSubcontrol( subControl );
1602 return qskIsControl(
this )
1603 ?
static_cast< QskControl*
>( this ) :
nullptr;
1608 return qskIsControl(
this )
1609 ?
static_cast< const QskControl*
>( this ) :
nullptr;
1624 qskDebugAspect( qDebug(),
metaObject(), aspect );
1629 qskDebugStates( qDebug(),
metaObject(), state );
1632#ifndef QT_NO_DEBUG_STREAM
1638 QDebugStateSaver saver( debug );
1644 debug <<
"Skinnable";
1650 debug <<
"Animator";
1657 debug <<
": " << status.
aspect;
Lookup key for a QskSkinHintTable.
State topState() const noexcept
void clearStates(States=AllStates) noexcept
constexpr bool hasStates() const noexcept
constexpr bool isAnimator() const noexcept
void setStates(States) noexcept
Variation
Some sort of variation.
constexpr Primitive primitive() const noexcept
constexpr Subcontrol subControl() const noexcept
constexpr Variation variation() const noexcept
constexpr Type type() const noexcept
void setAnimator(bool on) noexcept
constexpr States states() const noexcept
Primitive
Represents a specific element or attribute.
void setPrimitive(Type, Primitive primitive) noexcept
void setVariation(Variation) noexcept
Type
Represents the type of the Aspect.
Subcontrol
For use within the rendering or lay-outing of a specific QskSkinnable.
void clearState(State) noexcept
constexpr QskAspect stateless() const noexcept
constexpr Primitive metricPrimitive() const noexcept
Base class of all controls.
A paint device for scalable graphics.
Describes the rendering interface of a QskControl. Change the skinlet to change the appearance of the...
QVariant effectiveSkinHint(QskAspect, QskSkinHintStatus *=nullptr) const
Find the value for a specific aspect.
bool resetGraphicRoleHint(QskAspect)
Removes a graphic role hint from the local table.
qreal spacingHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a spacing hint.
QRectF subControlRect(const QRectF &, QskAspect::Subcontrol) const
Calculate position and size of a subControl.
QMarginsF paddingHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a padding hint.
bool resetColor(QskAspect)
Removes a color hint from the local table.
bool resetSkinHint(QskAspect)
Remove a hint from the local hint table.
bool setAlignmentHint(QskAspect, Qt::Alignment)
Sets an alignment hint.
bool setStrutSizeHint(QskAspect, const QSizeF &)
Sets a metric hint.
bool resetFontRoleHint(QskAspect)
Removes a font role hint from the local table.
QMarginsF marginHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a margin hint.
QskControl * controlCast()
void debug(QskAspect) const
QskGradient gradientHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a color hint as gradient.
QSizeF innerBoxSize(QskAspect, const QSizeF &outerBoxSize) const
Calculate the size, with paddings, indentations being subtracted.
bool setBoxBorderColorsHint(QskAspect, const QskBoxBorderColors &)
Sets a border colors hint.
QskAnimationHint effectiveAnimation(QskAspect::Type, QskAspect::Subcontrol, QskAspect::States, QskSkinHintStatus *status=nullptr) const
bool setPaddingHint(QskAspect, qreal)
Sets a padding hint.
bool resetBoxBorderColorsHint(QskAspect)
Removes a border colors hint from the local table.
bool setColor(QskAspect, Qt::GlobalColor)
Sets a color hint.
bool setGradientHint(QskAspect, const QskGradient &)
Sets a gradient as color hint.
bool setSkinHint(QskAspect, const QVariant &)
Insert a hint into the local hint table.
QMarginsF innerPadding(QskAspect, const QSizeF &) const
Calculate the padding from attributes for the given aspect.
virtual bool isTransitionAccepted(QskAspect) const
Additional check if an transition should be started.
bool setBoxBorderMetricsHint(QskAspect, const QskBoxBorderMetrics &)
Sets a border metrics hint.
QFont effectiveFont(QskAspect) const
QSizeF strutSizeHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a strut size hint.
bool resetBoxBorderMetricsHint(QskAspect)
Removes a border metrics hint from the local table.
QSizeF outerBoxSize(QskAspect, const QSizeF &innerBoxSize) const
Calculate the size, when being expanded by paddings, indentations.
virtual const QMetaObject * metaObject() const =0
const QskSkinlet * skinlet() const
bool setAnimationHint(QskAspect, QskAnimationHint)
const QskSkinHintTable & hintTable() const
Accessor for local skin hint table.
QskBoxShapeMetrics boxShapeHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a shape hint.
bool setFontRoleHint(QskAspect, const QskFontRole &)
Sets a font role hint.
QskSkin * effectiveSkin() const
QskSkinHintStatus hintStatus(QskAspect) const
QskAnimationHint animationHint(QskAspect, QskSkinHintStatus *=nullptr) const
const QskSkinlet * effectiveSkinlet() const
QskBoxBorderColors boxBorderColorsHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves border colors hint.
bool setMarginHint(QskAspect, qreal)
Sets a margin hint.
bool setGraphicRoleHint(QskAspect, int role)
Sets a graphic role hint.
bool setSpacingHint(QskAspect, qreal)
Sets a spacing hint.
virtual QskAspect::Variation effectiveVariation() const
QRectF outerBox(QskAspect, const QRectF &innerBox) const
Calculate the rectangle, when being expanded by paddings, indentations.
void setSkinlet(const QskSkinlet *)
Set an individual skinlet to render/display the content.
QskFontRole fontRoleHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a font role hint.
void setSkinStateFlag(QskAspect::State, bool on=true)
bool setFlagHint(QskAspect, int flag)
Sets a flag hint.
int graphicRoleHint(QskAspect, QskSkinHintStatus *=nullptr) const
A Retrieves a graphic role hint.
bool resetAlignmentHint(QskAspect)
Removes an alignment hint from the local table.
QRectF subControlContentsRect(const QRectF &, QskAspect::Subcontrol) const
Calculate the inner rectangle for subControl.
QskAspect::Subcontrol effectiveSubcontrol(QskAspect::Subcontrol) const
bool setBoxShapeHint(QskAspect, const QskBoxShapeMetrics &)
Sets a shape hint.
bool resetStrutSizeHint(QskAspect)
Removes a strut size hint from the local table.
QskColorFilter effectiveGraphicFilter(QskAspect::Subcontrol) const
QColor color(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a color hint.
QRectF innerBox(QskAspect, const QRectF &outerBox) const
Calculate the rectangle, whith paddings, indentations being subtracted.
QskBoxBorderMetrics boxBorderMetricsHint(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a border hint.
bool resetPaddingHint(QskAspect)
Removes a padding hint from the local table.
virtual void updateNode(QSGNode *)
bool setMetric(QskAspect, qreal)
Sets a metric hint.
bool resetBoxShapeHint(QskAspect)
Removes a shape hint from the local table.
bool resetSpacingHint(QskAspect)
Removes a spacing hint from the local table.
bool resetMetric(QskAspect)
Removes a metric hint from the local table.
bool resetMarginHint(QskAspect)
Removes a margin hint from the local table.