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 );
440bool QskSkinnable::setPositionHint(
QskAspect aspect, qreal position )
445bool QskSkinnable::movePositionHint(
QskAspect aspect, qreal position )
450bool QskSkinnable::movePositionHint(
QskAspect aspect, qreal from, qreal to )
453 QVariant::fromValue( from ), QVariant::fromValue( to ) );
456bool QskSkinnable::resetPositionHint(
QskAspect aspect )
467 const QskAspect aspect, qreal width, qreal height )
533 return qskSetColor(
this, aspect, gradient );
539 return qskColor< QskGradient >(
this, aspect, status );
556 return qskMetric< QskBoxShapeMetrics >(
574 return qskMetric< QskBoxBorderMetrics >(
592 return qskColor< QskBoxBorderColors >(
596bool QskSkinnable::setShadowMetricsHint(
602bool QskSkinnable::resetShadowMetricsHint(
QskAspect aspect )
610 return qskMetric< QskShadowMetrics >(
614bool QskSkinnable::setShadowColorHint(
QskAspect aspect,
const QColor& color )
619bool QskSkinnable::resetShadowColorHint(
QskAspect aspect )
634 shadowMetricsHint( aspect ), shadowColorHint( aspect ) );
637bool QskSkinnable::setArcMetricsHint(
643bool QskSkinnable::resetArcMetricsHint(
const QskAspect aspect )
651 return qskMetric< QskArcMetrics >(
655bool QskSkinnable::setStippleMetricsHint(
661bool QskSkinnable::resetStippleMetricsHint(
QskAspect aspect )
669 return qskMetric< QskStippleMetrics >(
689bool QskSkinnable::setTextOptionsHint(
693 QVariant::fromValue( options ) );
696bool QskSkinnable::resetTextOptionsHint(
const QskAspect aspect )
712 QVariant::fromValue( role ) );
730 if ( hint.canConvert< QFont >() )
737 return hint.value< QFont >();
744 if (
auto item = owningItem() )
746 const auto v = QskSkinTransition::animatedFontSize(
747 item->window(), fontRole );
749 if ( v.canConvert<
int >() )
751 font.setPixelSize( v.value<
int >() );
759qreal QskSkinnable::effectiveFontHeight(
const QskAspect aspect )
const
781bool QskSkinnable::setSymbolHint(
785 QVariant::fromValue( symbol ) );
788bool QskSkinnable::resetSymbolHint(
const QskAspect aspect )
797 aspect | QskAspect::Symbol, status ).value<
QskGraphic >();
811 aspect.setSection( section() );
816 const auto hint = storedHint( aspect | skinStates(), &status );
821 aspect.setSection( QskAspect::Body );
825 const auto v = animatedHint( aspect,
nullptr );
831 if (
auto item = owningItem() )
833 const auto graphicRole = hint.toInt();
835 const auto v = QskSkinTransition::animatedGraphicFilter(
836 item->window(), graphicRole );
860 return m_data->hintTable.setAnimation( aspect, hint );
870bool QskSkinnable::hasAnimationHint(
QskAspect aspect )
const
884 auto aspect = subControl | type | states;
890 const auto a = m_data->hintTable.resolvedAnimator( aspect, hint );
891 if ( a.isAnimator() )
905 const auto a = skin->hintTable().resolvedAnimator( aspect, hint );
906 if ( a.isAnimator() )
929 aspect = qskSubstitutedAspect(
this, aspect );
931 if ( m_data->hintTable.setHint( aspect, hint ) )
933 qskTriggerUpdates( aspect, owningItem() );
942 aspect = qskSubstitutedAspect(
this, aspect );
944 if ( m_data->hintTable.removeHint( aspect ) )
946 qskTriggerUpdates( aspect, owningItem() );
960 const auto v = animatedHint( aspect, status );
965 if ( aspect.section() == QskAspect::Body )
966 aspect.setSection( section() );
974 if ( !aspect.
isAnimator() && QskSkinTransition::isRunning() )
980 const auto v = interpolatedHint( aspect, status );
985 return storedHint( aspect, status );
996bool QskSkinnable::moveSkinHint(
QskAspect aspect,
997 const QVariant& oldValue,
const QVariant& newValue )
1004 if ( ok && oldValue.isValid() && newValue.isValid() )
1007 if ( animation.isValid() )
1009 if ( newValue != oldValue )
1010 startTransition( aspect, animation, oldValue, newValue );
1017bool QskSkinnable::moveSkinHint(
QskAspect aspect,
const QVariant& value )
1025 const auto& animators = m_data->animators;
1027 if ( animators.isEmpty() )
1030 aspect = qskAnimatorAspect( aspect );
1032 auto animator = animators.animator( aspect, index );
1033 if ( animator ==
nullptr && index >= 0 )
1034 animator = animators.animator( aspect, -1 );
1039QVariant QskSkinnable::animatedHint(
1044 if ( !m_data->animators.isEmpty() )
1046 const auto a = qskAnimatorAspect( aspect );
1048 v = m_data->animators.currentValue( a, m_data->sampleIndex );
1049 if ( !v.isValid() && m_data->sampleIndex >= 0 )
1050 v = m_data->animators.currentValue( a, -1 );
1053 if ( status && v.isValid() )
1062QVariant QskSkinnable::interpolatedHint(
1065 if ( !QskSkinTransition::isRunning() || m_data->hintTable.hasHint( aspect ) )
1068 const auto item = owningItem();
1069 if ( item ==
nullptr )
1078 v = QskSkinTransition::animatedHint( item->window(), aspect );
1082 if (
const auto topState = aspect.
topState() )
1098 if ( a.section() != QskAspect::Body )
1102 a.setSection( QskAspect::Body );
1111 if ( status && v.isValid() )
1120const QVariant& QskSkinnable::storedHint(
1127 const auto& localTable = m_data->hintTable;
1128 if ( localTable.hasHints() )
1130 if (
const auto value = localTable.resolvedHint( aspect, &resolvedAspect ) )
1135 status->
aspect = resolvedAspect;
1143 const auto& skinTable = skin->hintTable();
1144 if ( skinTable.hasHints() )
1146 if (
const auto value = skinTable.resolvedHint( aspect, &resolvedAspect ) )
1151 status->
aspect = resolvedAspect;
1157 if ( aspect.hasSubcontrol() )
1161 aspect.clearSubcontrol();
1164 if (
const auto value = skinTable.resolvedHint( aspect, &resolvedAspect ) )
1169 status->
aspect = resolvedAspect;
1183 static QVariant hintInvalid;
1189 return ( m_data->skinStates & state ) == state;
1192QskAspect::States QskSkinnable::skinStates()
const
1194 return m_data->skinStates;
1197const char* QskSkinnable::skinStatesAsPrintable()
const
1199 return skinStatesAsPrintable( skinStates() );
1202const char* QskSkinnable::skinStatesAsPrintable( QskAspect::States states )
const
1206 QDebug
debug( &tmp );
1210 static QByteArray bytes[ 10 ];
1211 static int counter = 0;
1213 counter = ( counter + 1 ) % 10;
1215 bytes[ counter ] = tmp.toUtf8();
1216 return bytes[ counter ].constData();
1220 QskAspect aspect,
const QSizeF& size,
bool inner )
1222 const auto shape = skinnable->
boxShapeHint( aspect ).toAbsolute( size );
1225 const qreal left = qMax( shape.radius( Qt::TopLeftCorner ).width(),
1226 shape.radius( Qt::BottomLeftCorner ).width() );
1228 const qreal top = qMax( shape.radius( Qt::TopLeftCorner ).height(),
1229 shape.radius( Qt::TopRightCorner ).height() );
1231 const qreal right = qMax( shape.radius( Qt::TopRightCorner ).width(),
1232 shape.radius( Qt::BottomRightCorner ).width() );
1234 const qreal bottom = qMax( shape.radius( Qt::BottomLeftCorner ).height(),
1235 shape.radius( Qt::BottomRightCorner ).height() );
1237 QskMargins padding( left, top, right, bottom );
1240 const auto borderMargins = borderMetrics.toAbsolute( size ).widths() * 0.5;
1244 padding -= borderMargins;
1249 padding += borderMargins;
1253 padding *= 1.0 - 0.70710678;
1255 return padding.expandedTo( skinnable->
paddingHint( aspect ) );
1259 QskAspect aspect,
const QSizeF& outerBoxSize )
const
1261 return qskEffectivePadding(
this, aspect,
outerBoxSize,
true );
1265 QskAspect aspect,
const QSizeF& outerBoxSize )
const
1267 const auto pd = qskEffectivePadding(
this, aspect,
outerBoxSize,
true );
1274 QskAspect aspect,
const QRectF& outerBox )
const
1276 const auto pd = qskEffectivePadding(
this, aspect,
outerBox.size(),
true );
1277 return outerBox.marginsRemoved( pd );
1281 QskAspect aspect,
const QSizeF& innerBoxSize )
const
1283 const auto pd = qskEffectivePadding(
this, aspect,
innerBoxSize,
false );
1288 QskAspect aspect,
const QRectF& innerBox )
const
1290 const auto m = qskEffectivePadding(
this, aspect,
innerBox.size(),
false );
1297 return effectiveSkinlet()->subControlRect(
this, contentsRect, subControl );
1310 if (
auto control = qskControlCast( owningItem() ) )
1318 if ( control->flags() & QQuickItem::ItemHasContents )
1319 return control->isInitiallyPainted();
1327void QskSkinnable::startTransition(
QskAspect aspect,
1333void QskSkinnable::startTransition(
QskAspect aspect,
int index,
1337 startHintTransition( aspect, index,
animationHint, from, to );
1340void QskSkinnable::startHintTransition(
QskAspect aspect,
int index,
1346 auto control = qskControlCast( owningItem() );
1350 if ( !QskVariantAnimator::maybeInterpolate( from, to,
false ) )
1356 if ( aspect.
type() == QskAspect::NoType &&
1361 v1.setValue( skin->graphicFilter( v1.toInt() ) );
1362 v2.setValue( skin->graphicFilter( v2.toInt() ) );
1365 aspect = qskAnimatorAspect( aspect );
1371 auto animator = m_data->animators.animator( aspect, index );
1372 if ( animator && animator->isRunning() )
1373 v1 = animator->currentValue();
1375 m_data->animators.start( control, aspect, index,
animationHint, v1, v2 );
1380 const auto newState = on
1381 ? ( m_data->skinStates | stateFlag )
1382 : ( m_data->skinStates & ~stateFlag );
1384 setSkinStates( newState );
1387void QskSkinnable::replaceSkinStates(
1388 QskAspect::States newStates,
int sampleIndex )
1399 m_data->skinStates = newStates;
1400 m_data->sampleIndex = sampleIndex;
1403void QskSkinnable::addSkinStates( QskAspect::States states )
1405 setSkinStates( m_data->skinStates | states );
1408void QskSkinnable::clearSkinStates( QskAspect::States states )
1410 setSkinStates( m_data->skinStates & ~states );
1413void QskSkinnable::setSkinStates( QskAspect::States newStates )
1415 if ( m_data->skinStates == newStates )
1418 auto item = owningItem();
1421 const auto className = item ? item->className() :
"QskSkinnable";
1423 qDebug() << className <<
":"
1424 << skinStateAsPrintable( m_data->skinState ) <<
"->"
1425 << skinStateAsPrintable( newState );
1428 if ( item && item->window() )
1432 const auto mask = m_data->hintTable.states() | skin->hintTable().states();
1433 if ( ( newStates & mask ) != ( m_data->skinStates & mask ) )
1440 startHintTransitions( m_data->skinStates, newStates );
1444 if ( item->flags() & QQuickItem::ItemHasContents )
1448 m_data->skinStates = newStates;
1451bool QskSkinnable::startHintTransitions(
1452 QskAspect::States oldStates, QskAspect::States newStates,
int index )
1454 QVector< QskAspect::Subcontrol > subControls;
1456 if (
const auto control = qskControlCast( owningItem() ) )
1457 subControls = control->subControls();
1459 return startHintTransitions( subControls, oldStates, newStates, index );
1462bool QskSkinnable::startHintTransitions(
1463 const QVector< QskAspect::Subcontrol >& subControls,
1464 QskAspect::States oldStates, QskAspect::States newStates,
int index )
1472 bool started =
false;
1476 aspect.setSection( section() );
1479 const auto control = qskControlCast( owningItem() );
1480 if ( control ==
nullptr )
1483 const auto primitiveCount = QskAspect::primitiveCount();
1485 for (
const auto subControl : subControls )
1487 aspect.setSubcontrol( subControl );
1489 const auto& skinTable = skin->hintTable();
1491 for ( uint i = 0; i < QskAspect::typeCount; i++ )
1497 if ( hint.duration > 0 )
1504 for ( uint j = 0; j < primitiveCount; j++ )
1509 const auto a1 = aspect | oldStates;
1510 const auto a2 = aspect | newStates;
1512 bool doTransition =
true;
1523 doTransition = !skinTable.isResolutionMatching( a1, a2 );
1528 startHintTransition( aspect, index, hint,
1529 storedHint( a1 ), storedHint( a2 ) );
1545 if ( m_data->skinlet )
1546 skin = m_data->skinlet->skin();
1548 if ( skin ==
nullptr )
1550 if (
const auto item = owningItem() )
1551 skin = qskEffectiveSkin( item->window() );
1554 return skin ? skin : qskSkinManager->skin();
1562QskAspect::Section QskSkinnable::section()
const
1564 return QskAspect::Body;
1575 if (
const auto proxies = m_data->subcontrolProxies )
1577 auto it = proxies->find( subControl );
1578 if ( it != proxies->end() )
1582 return substitutedSubcontrol( subControl );
1594 return qskIsControl(
this )
1595 ?
static_cast< QskControl*
>( this ) :
nullptr;
1600 return qskIsControl(
this )
1601 ?
static_cast< const QskControl*
>( this ) :
nullptr;
1616 qskDebugAspect( qDebug(),
metaObject(), aspect );
1621 qskDebugStates( qDebug(),
metaObject(), state );
1624#ifndef QT_NO_DEBUG_STREAM
1630 QDebugStateSaver saver( debug );
1636 debug <<
"Skinnable";
1642 debug <<
"Animator";
1649 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.
qreal metric(QskAspect, QskSkinHintStatus *=nullptr) const
Retrieves a metric hint.
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.