QskSkinHintTableEditor extended
This commit is contained in:
parent
e0d2fdf8bc
commit
f51f3b65ab
|
@ -32,12 +32,14 @@ CustomSlider::CustomSlider( QQuickItem* parentItem )
|
||||||
ed.setStrutSize( Handle, 80, 80 );
|
ed.setStrutSize( Handle, 80, 80 );
|
||||||
ed.setColor( Handle, Grey800 );
|
ed.setColor( Handle, Grey800 );
|
||||||
|
|
||||||
for ( auto state : { Pressed, Focused | Hovered, Hovered, Focused } )
|
ed.setColor( Handle | Pressed, Orange600 );
|
||||||
ed.setColor( Handle | state, Orange600 );
|
|
||||||
|
const auto mask = Focused | Hovered;
|
||||||
|
|
||||||
|
ed.setColorForAllStateCombinations( mask, Handle, Orange600 );
|
||||||
|
ed.setAnimationForAllStateCombinations( mask, Handle | QskAspect::Color, 300 );
|
||||||
|
|
||||||
ed.setAnimation( Handle | QskAspect::Color, 1000 );
|
ed.setAnimation( Handle | QskAspect::Color, 1000 );
|
||||||
for ( auto state : { Focused | Hovered, Hovered, Focused } )
|
|
||||||
ed.setAnimation( Handle | QskAspect::Color | state, 300 );
|
|
||||||
|
|
||||||
// using an individual skinlet, not known by the skin
|
// using an individual skinlet, not known by the skin
|
||||||
|
|
||||||
|
|
|
@ -126,33 +126,22 @@ QskSkinHintTable* QskSkinHintTableEditor::table() const
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setHintForAllStateCombinations(
|
void QskSkinHintTableEditor::setHintForAllStateCombinations(
|
||||||
QskAspect aspect, const QVariant& hint, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, const QVariant& hint )
|
||||||
{
|
{
|
||||||
setHintStateMask( m_table, aspect, hint, QskAspect::NoState, stateMask );
|
setHintStateMask( m_table, aspect, hint, QskAspect::NoState, stateMask );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QskSkinHintTableEditor::removeHintForAllStateCombinations(
|
bool QskSkinHintTableEditor::removeHintForAllStateCombinations(
|
||||||
QskAspect aspect, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect )
|
||||||
{
|
{
|
||||||
return removeHintStateMask( m_table, aspect, QskAspect::NoState, stateMask );
|
return removeHintStateMask( m_table, aspect, QskAspect::NoState, stateMask );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setFlagHintForAllStateCombinations(
|
void QskSkinHintTableEditor::setAnimationForAllStateCombinations(
|
||||||
QskAspect aspect, const QVariant& hint, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, QskAnimationHint hint )
|
||||||
{
|
{
|
||||||
setHintForAllStateCombinations( aspect | QskAspect::Flag, hint, stateMask );
|
aspect.setAnimator( true );
|
||||||
}
|
setHintForAllStateCombinations( stateMask, aspect, QVariant::fromValue( hint ) );
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setMetricHintForAllStateCombinations(
|
|
||||||
QskAspect aspect, const QVariant& hint, QskAspect::State stateMask )
|
|
||||||
{
|
|
||||||
setHintForAllStateCombinations( aspect | QskAspect::Metric, hint, stateMask );
|
|
||||||
}
|
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setColorHintForAllStateCombinations(
|
|
||||||
QskAspect aspect, const QVariant& hint, QskAspect::State stateMask )
|
|
||||||
{
|
|
||||||
setHintForAllStateCombinations( aspect | QskAspect::Color, hint, stateMask );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setFlag( QskAspect aspect, int flag )
|
void QskSkinHintTableEditor::setFlag( QskAspect aspect, int flag )
|
||||||
|
@ -165,6 +154,12 @@ int QskSkinHintTableEditor::flag( QskAspect aspect ) const
|
||||||
return flagHint< int >( aspect );
|
return flagHint< int >( aspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setFlagForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, int flag )
|
||||||
|
{
|
||||||
|
setFlagHintForAllStateCombinations( stateMask, aspect, flag );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setMetric( QskAspect aspect, qreal metric )
|
void QskSkinHintTableEditor::setMetric( QskAspect aspect, qreal metric )
|
||||||
{
|
{
|
||||||
setMetricHint( aspect, metric );
|
setMetricHint( aspect, metric );
|
||||||
|
@ -175,6 +170,12 @@ qreal QskSkinHintTableEditor::metric( QskAspect aspect ) const
|
||||||
return metricHint< qreal >( aspect );
|
return metricHint< qreal >( aspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setMetricForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, qreal metric )
|
||||||
|
{
|
||||||
|
setMetricHintForAllStateCombinations( stateMask, aspect, metric );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setColor( QskAspect aspect, Qt::GlobalColor color )
|
void QskSkinHintTableEditor::setColor( QskAspect aspect, Qt::GlobalColor color )
|
||||||
{
|
{
|
||||||
setColorHint( aspect, QColor( color ) );
|
setColorHint( aspect, QColor( color ) );
|
||||||
|
@ -195,6 +196,24 @@ QColor QskSkinHintTableEditor::color( QskAspect aspect ) const
|
||||||
return colorHint< QColor >( aspect );
|
return colorHint< QColor >( aspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setColorForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, Qt::GlobalColor color )
|
||||||
|
{
|
||||||
|
setColorHintForAllStateCombinations( stateMask, aspect, QColor( color ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setColorForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, QRgb rgb )
|
||||||
|
{
|
||||||
|
setColorHintForAllStateCombinations( stateMask, aspect, QColor::fromRgba( rgb ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setColorForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QColor& color )
|
||||||
|
{
|
||||||
|
setColorHintForAllStateCombinations( stateMask, aspect, color );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setHGradient(
|
void QskSkinHintTableEditor::setHGradient(
|
||||||
QskAspect aspect, const QColor& color1, const QColor& color2 )
|
QskAspect aspect, const QColor& color1, const QColor& color2 )
|
||||||
{
|
{
|
||||||
|
@ -213,9 +232,9 @@ void QskSkinHintTableEditor::setGradient( QskAspect aspect, const QskGradient& g
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setGradientForAllStateCombinations(
|
void QskSkinHintTableEditor::setGradientForAllStateCombinations(
|
||||||
QskAspect aspect, const QskGradient& gradient, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, const QskGradient& gradient )
|
||||||
{
|
{
|
||||||
setColorHintForAllStateCombinations( aspect, QVariant::fromValue( gradient ), stateMask );
|
setColorHintForAllStateCombinations( stateMask, aspect, QVariant::fromValue( gradient ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskGradient QskSkinHintTableEditor::gradient( QskAspect aspect ) const
|
QskGradient QskSkinHintTableEditor::gradient( QskAspect aspect ) const
|
||||||
|
@ -225,7 +244,7 @@ QskGradient QskSkinHintTableEditor::gradient( QskAspect aspect ) const
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, const QSizeF& size )
|
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, const QSizeF& size )
|
||||||
{
|
{
|
||||||
setMetricHint( aspect | QskAspect::StrutSize, size );
|
setMetricHint( aspectStrutSize( aspect ), size );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, qreal width, qreal height )
|
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, qreal width, qreal height )
|
||||||
|
@ -233,6 +252,12 @@ void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, qreal width, qreal
|
||||||
setMetricHint( aspectStrutSize( aspect ), QSizeF( width, height ) );
|
setMetricHint( aspectStrutSize( aspect ), QSizeF( width, height ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setStrutSizeForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QSizeF& size )
|
||||||
|
{
|
||||||
|
setMetricHintForAllStateCombinations( stateMask, aspectStrutSize( aspect ), size );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removeStrutSize( QskAspect aspect )
|
void QskSkinHintTableEditor::removeStrutSize( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeMetricHint( aspectStrutSize( aspect ) );
|
removeMetricHint( aspectStrutSize( aspect ) );
|
||||||
|
@ -254,6 +279,12 @@ void QskSkinHintTableEditor::setMargin( QskAspect aspect,
|
||||||
setMetricHint( aspectMargin( aspect ), QskMargins( left, top, right, bottom ) );
|
setMetricHint( aspectMargin( aspect ), QskMargins( left, top, right, bottom ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setMarginForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QskMargins& margins )
|
||||||
|
{
|
||||||
|
setMetricHintForAllStateCombinations( stateMask, aspectMargin( aspect ), margins );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removeMargin( QskAspect aspect )
|
void QskSkinHintTableEditor::removeMargin( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeMetricHint( aspectMargin( aspect ) );
|
removeMetricHint( aspectMargin( aspect ) );
|
||||||
|
@ -275,6 +306,12 @@ void QskSkinHintTableEditor::setPadding( QskAspect aspect,
|
||||||
setMetricHint( aspectPadding( aspect ), QskMargins( left, top, right, bottom ) );
|
setMetricHint( aspectPadding( aspect ), QskMargins( left, top, right, bottom ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setPaddingForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QskMargins& margins )
|
||||||
|
{
|
||||||
|
setMetricHintForAllStateCombinations( stateMask, aspectPadding( aspect ), margins );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removePadding( QskAspect aspect )
|
void QskSkinHintTableEditor::removePadding( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeMetricHint( aspectPadding( aspect ) );
|
removeMetricHint( aspectPadding( aspect ) );
|
||||||
|
@ -302,7 +339,7 @@ qreal QskSkinHintTableEditor::spacing( QskAspect aspect ) const
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setAlignment( QskAspect aspect, Qt::Alignment alignment )
|
void QskSkinHintTableEditor::setAlignment( QskAspect aspect, Qt::Alignment alignment )
|
||||||
{
|
{
|
||||||
setFlagHint( aspectAlignment( aspect ), static_cast< int >( alignment ) );
|
setFlagHint( aspectAlignment( aspect ), static_cast< int >( alignment ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removeAlignment( QskAspect aspect )
|
void QskSkinHintTableEditor::removeAlignment( QskAspect aspect )
|
||||||
|
@ -366,10 +403,10 @@ void QskSkinHintTableEditor::setBoxShape(
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setBoxShapeForAllStateCombinations(
|
void QskSkinHintTableEditor::setBoxShapeForAllStateCombinations(
|
||||||
QskAspect aspect, const QskBoxShapeMetrics& shape, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxShapeMetrics& shape )
|
||||||
{
|
{
|
||||||
setMetricHintForAllStateCombinations(
|
setMetricHintForAllStateCombinations(
|
||||||
aspectShape( aspect ), QVariant::fromValue( shape ), stateMask );
|
stateMask, aspectShape( aspect ), QVariant::fromValue( shape ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removeBoxShape( QskAspect aspect )
|
void QskSkinHintTableEditor::removeBoxShape( QskAspect aspect )
|
||||||
|
@ -403,10 +440,10 @@ void QskSkinHintTableEditor::setBoxBorderMetrics(
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setBoxBorderMetricsForAllStateCombinations(
|
void QskSkinHintTableEditor::setBoxBorderMetricsForAllStateCombinations(
|
||||||
QskAspect aspect, const QskBoxBorderMetrics& borderMetrics, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxBorderMetrics& borderMetrics )
|
||||||
{
|
{
|
||||||
setMetricHintForAllStateCombinations( aspectBorder( aspect ),
|
setMetricHintForAllStateCombinations( stateMask,
|
||||||
QVariant::fromValue( borderMetrics ), stateMask );
|
aspectBorder( aspect ), QVariant::fromValue( borderMetrics ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::removeBoxBorderMetric( QskAspect aspect )
|
void QskSkinHintTableEditor::removeBoxBorderMetric( QskAspect aspect )
|
||||||
|
@ -426,10 +463,10 @@ void QskSkinHintTableEditor::setBoxBorderColors(
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setBoxBorderColorsForAllStateCombinations(
|
void QskSkinHintTableEditor::setBoxBorderColorsForAllStateCombinations(
|
||||||
QskAspect aspect, const QskBoxBorderColors& borderColors, QskAspect::State stateMask )
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxBorderColors& borderColors )
|
||||||
{
|
{
|
||||||
setColorHintForAllStateCombinations( aspectBorder( aspect ),
|
setColorHintForAllStateCombinations( stateMask, aspectBorder( aspect ),
|
||||||
QVariant::fromValue( borderColors ), stateMask );
|
QVariant::fromValue( borderColors ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setBoxBorderColors( QskAspect aspect,
|
void QskSkinHintTableEditor::setBoxBorderColors( QskAspect aspect,
|
||||||
|
|
|
@ -31,10 +31,15 @@ class QSK_EXPORT QskSkinHintTableEditor
|
||||||
|
|
||||||
void setHint( QskAspect, const QVariant& );
|
void setHint( QskAspect, const QVariant& );
|
||||||
const QVariant& hint( QskAspect ) const;
|
const QVariant& hint( QskAspect ) const;
|
||||||
void setHintForAllStateCombinations( QskAspect, const QVariant&, QskAspect::State );
|
|
||||||
|
void setHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QVariant& );
|
||||||
|
|
||||||
|
template< typename T > void setHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const T& );
|
||||||
|
|
||||||
bool removeHint( QskAspect );
|
bool removeHint( QskAspect );
|
||||||
bool removeHintForAllStateCombinations( QskAspect, QskAspect::State );
|
bool removeHintForAllStateCombinations( QskAspect::State, QskAspect );
|
||||||
|
|
||||||
QVariant takeHint( QskAspect );
|
QVariant takeHint( QskAspect );
|
||||||
|
|
||||||
|
@ -48,30 +53,55 @@ class QSK_EXPORT QskSkinHintTableEditor
|
||||||
void setAnimation( QskAspect, QskAnimationHint );
|
void setAnimation( QskAspect, QskAnimationHint );
|
||||||
QskAnimationHint animation( QskAspect ) const;
|
QskAnimationHint animation( QskAspect ) const;
|
||||||
|
|
||||||
// flag/metric/color
|
void setAnimationForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, QskAnimationHint );
|
||||||
|
|
||||||
|
// flag
|
||||||
|
|
||||||
void setFlagHint( QskAspect, const QVariant& );
|
void setFlagHint( QskAspect, const QVariant& );
|
||||||
void setFlagHintForAllStateCombinations( QskAspect, const QVariant&, QskAspect::State );
|
|
||||||
void removeFlagHint( QskAspect );
|
|
||||||
QVariant flagHint( QskAspect ) const;
|
|
||||||
|
|
||||||
template< typename T > void setFlagHint( QskAspect, const T& );
|
template< typename T > void setFlagHint( QskAspect, const T& );
|
||||||
|
|
||||||
|
void setFlagHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QVariant& );
|
||||||
|
|
||||||
|
template< typename T > void setFlagHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const T& );
|
||||||
|
|
||||||
|
void removeFlagHint( QskAspect );
|
||||||
|
|
||||||
|
QVariant flagHint( QskAspect ) const;
|
||||||
template< typename T > T flagHint( QskAspect ) const;
|
template< typename T > T flagHint( QskAspect ) const;
|
||||||
|
|
||||||
void setMetricHint( QskAspect, const QVariant& );
|
// metric
|
||||||
void setMetricHintForAllStateCombinations( QskAspect, const QVariant&, QskAspect::State );
|
|
||||||
void removeMetricHint( QskAspect );
|
|
||||||
QVariant metricHint( QskAspect ) const;
|
|
||||||
|
|
||||||
|
void setMetricHint( QskAspect, const QVariant& );
|
||||||
template< typename T > void setMetricHint( QskAspect, const T& );
|
template< typename T > void setMetricHint( QskAspect, const T& );
|
||||||
|
|
||||||
|
void setMetricHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QVariant& );
|
||||||
|
|
||||||
|
template< typename T > void setMetricHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const T& );
|
||||||
|
|
||||||
|
void removeMetricHint( QskAspect );
|
||||||
|
|
||||||
|
QVariant metricHint( QskAspect ) const;
|
||||||
template< typename T > T metricHint( QskAspect ) const;
|
template< typename T > T metricHint( QskAspect ) const;
|
||||||
|
|
||||||
void setColorHint( QskAspect, const QVariant& );
|
// color
|
||||||
void setColorHintForAllStateCombinations( QskAspect, const QVariant&, QskAspect::State );
|
|
||||||
void removeColorHint( QskAspect );
|
|
||||||
QVariant colorHint( QskAspect ) const;
|
|
||||||
|
|
||||||
|
void setColorHint( QskAspect, const QVariant& );
|
||||||
template< typename T > void setColorHint( QskAspect, const T& );
|
template< typename T > void setColorHint( QskAspect, const T& );
|
||||||
|
|
||||||
|
void setColorHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QVariant& );
|
||||||
|
|
||||||
|
template< typename T > void setColorHintForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const T& );
|
||||||
|
|
||||||
|
void removeColorHint( QskAspect );
|
||||||
|
|
||||||
|
QVariant colorHint( QskAspect ) const;
|
||||||
template< typename T > T colorHint( QskAspect ) const;
|
template< typename T > T colorHint( QskAspect ) const;
|
||||||
|
|
||||||
// type specific
|
// type specific
|
||||||
|
@ -79,74 +109,133 @@ class QSK_EXPORT QskSkinHintTableEditor
|
||||||
void setFlag( QskAspect, int );
|
void setFlag( QskAspect, int );
|
||||||
int flag( QskAspect ) const;
|
int flag( QskAspect ) const;
|
||||||
|
|
||||||
|
void setFlagForAllStateCombinations( QskAspect::State, QskAspect, int );
|
||||||
|
|
||||||
void setMetric( QskAspect, qreal metric );
|
void setMetric( QskAspect, qreal metric );
|
||||||
qreal metric( QskAspect ) const;
|
qreal metric( QskAspect ) const;
|
||||||
|
|
||||||
|
void setMetricForAllStateCombinations( QskAspect::State, QskAspect, qreal );
|
||||||
|
|
||||||
void setColor( QskAspect, Qt::GlobalColor );
|
void setColor( QskAspect, Qt::GlobalColor );
|
||||||
void setColor( QskAspect, QRgb );
|
void setColor( QskAspect, QRgb );
|
||||||
void setColor( QskAspect, const QColor& );
|
void setColor( QskAspect, const QColor& );
|
||||||
|
|
||||||
|
void setColorForAllStateCombinations( QskAspect::State, QskAspect, Qt::GlobalColor );
|
||||||
|
void setColorForAllStateCombinations( QskAspect::State, QskAspect, QRgb );
|
||||||
|
void setColorForAllStateCombinations( QskAspect::State, QskAspect, const QColor& );
|
||||||
|
|
||||||
QColor color( QskAspect ) const;
|
QColor color( QskAspect ) const;
|
||||||
|
|
||||||
|
// gradients
|
||||||
|
|
||||||
void setHGradient( QskAspect, const QColor&, const QColor& );
|
void setHGradient( QskAspect, const QColor&, const QColor& );
|
||||||
void setVGradient( QskAspect, const QColor&, const QColor& );
|
void setVGradient( QskAspect, const QColor&, const QColor& );
|
||||||
void setGradient( QskAspect, const QskGradient& );
|
void setGradient( QskAspect, const QskGradient& );
|
||||||
void setGradientForAllStateCombinations( QskAspect, const QskGradient&, QskAspect::State );
|
|
||||||
|
void setGradientForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskGradient& );
|
||||||
|
|
||||||
QskGradient gradient( QskAspect ) const;
|
QskGradient gradient( QskAspect ) const;
|
||||||
|
|
||||||
|
// strutSize
|
||||||
|
|
||||||
void setStrutSize( QskAspect, const QSizeF& );
|
void setStrutSize( QskAspect, const QSizeF& );
|
||||||
void setStrutSize( QskAspect, qreal width, qreal height );
|
void setStrutSize( QskAspect, qreal width, qreal height );
|
||||||
|
|
||||||
void removeStrutSize( QskAspect );
|
void removeStrutSize( QskAspect );
|
||||||
|
|
||||||
|
void setStrutSizeForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QSizeF& );
|
||||||
|
|
||||||
QSizeF strutSize( QskAspect ) const;
|
QSizeF strutSize( QskAspect ) const;
|
||||||
|
|
||||||
|
// margin
|
||||||
|
|
||||||
void setMargin( QskAspect, const QskMargins& );
|
void setMargin( QskAspect, const QskMargins& );
|
||||||
void setMargin( QskAspect,
|
void setMargin( QskAspect, qreal left, qreal top, qreal right, qreal bottom );
|
||||||
qreal left, qreal top, qreal right, qreal bottom );
|
|
||||||
|
void setMarginForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskMargins& );
|
||||||
|
|
||||||
void removeMargin( QskAspect );
|
void removeMargin( QskAspect );
|
||||||
|
|
||||||
QskMargins margin( QskAspect ) const;
|
QskMargins margin( QskAspect ) const;
|
||||||
|
|
||||||
|
// padding
|
||||||
|
|
||||||
void setPadding( QskAspect, const QskMargins& );
|
void setPadding( QskAspect, const QskMargins& );
|
||||||
void setPadding( QskAspect,
|
void setPadding( QskAspect, qreal left, qreal top, qreal right, qreal bottom );
|
||||||
qreal left, qreal top, qreal right, qreal bottom );
|
|
||||||
|
void setPaddingForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskMargins& );
|
||||||
|
|
||||||
void removePadding( QskAspect );
|
void removePadding( QskAspect );
|
||||||
|
|
||||||
QskMargins padding( QskAspect ) const;
|
QskMargins padding( QskAspect ) const;
|
||||||
|
|
||||||
|
// spacing
|
||||||
|
|
||||||
void setSpacing( QskAspect, qreal );
|
void setSpacing( QskAspect, qreal );
|
||||||
void removeSpacing( QskAspect );
|
void removeSpacing( QskAspect );
|
||||||
qreal spacing( QskAspect ) const;
|
qreal spacing( QskAspect ) const;
|
||||||
|
|
||||||
|
// alignment
|
||||||
|
|
||||||
void setAlignment( QskAspect, Qt::Alignment );
|
void setAlignment( QskAspect, Qt::Alignment );
|
||||||
void removeAlignment( QskAspect );
|
void removeAlignment( QskAspect );
|
||||||
Qt::Alignment alignment( QskAspect ) const;
|
Qt::Alignment alignment( QskAspect ) const;
|
||||||
|
|
||||||
|
// fontRole
|
||||||
|
|
||||||
void setFontRole( QskAspect, int );
|
void setFontRole( QskAspect, int );
|
||||||
void removeFontRole( QskAspect );
|
void removeFontRole( QskAspect );
|
||||||
int fontRole( QskAspect ) const;
|
int fontRole( QskAspect ) const;
|
||||||
|
|
||||||
|
// graphicRole
|
||||||
|
|
||||||
void setGraphicRole( QskAspect, int );
|
void setGraphicRole( QskAspect, int );
|
||||||
void removeGraphicRole( QskAspect );
|
void removeGraphicRole( QskAspect );
|
||||||
int graphicRole( QskAspect ) const;
|
int graphicRole( QskAspect ) const;
|
||||||
|
|
||||||
|
// boxShape
|
||||||
|
|
||||||
void setBoxShape( QskAspect, qreal radius, Qt::SizeMode = Qt::AbsoluteSize );
|
void setBoxShape( QskAspect, qreal radius, Qt::SizeMode = Qt::AbsoluteSize );
|
||||||
void setBoxShape( QskAspect, qreal topLeft, qreal topRight,
|
void setBoxShape( QskAspect, qreal topLeft, qreal topRight,
|
||||||
qreal bottomLeft, qreal bottomRight, Qt::SizeMode = Qt::AbsoluteSize );
|
qreal bottomLeft, qreal bottomRight, Qt::SizeMode = Qt::AbsoluteSize );
|
||||||
void setBoxShape( QskAspect, const QskBoxShapeMetrics& );
|
void setBoxShape( QskAspect, const QskBoxShapeMetrics& );
|
||||||
void setBoxShapeForAllStateCombinations( QskAspect, const QskBoxShapeMetrics&, QskAspect::State );
|
|
||||||
|
void setBoxShapeForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskBoxShapeMetrics& );
|
||||||
|
|
||||||
void removeBoxShape( QskAspect );
|
void removeBoxShape( QskAspect );
|
||||||
|
|
||||||
QskBoxShapeMetrics boxShape( QskAspect ) const;
|
QskBoxShapeMetrics boxShape( QskAspect ) const;
|
||||||
|
|
||||||
|
// boxBorderMetrics
|
||||||
|
|
||||||
void setBoxBorderMetrics( QskAspect,
|
void setBoxBorderMetrics( QskAspect,
|
||||||
qreal borderWidth, Qt::SizeMode = Qt::AbsoluteSize );
|
qreal borderWidth, Qt::SizeMode = Qt::AbsoluteSize );
|
||||||
|
|
||||||
void setBoxBorderMetrics( QskAspect, qreal left, qreal top,
|
void setBoxBorderMetrics( QskAspect, qreal left, qreal top,
|
||||||
qreal right, qreal bottom, Qt::SizeMode = Qt::AbsoluteSize );
|
qreal right, qreal bottom, Qt::SizeMode = Qt::AbsoluteSize );
|
||||||
|
|
||||||
void setBoxBorderMetrics( QskAspect, const QskBoxBorderMetrics& );
|
void setBoxBorderMetrics( QskAspect, const QskBoxBorderMetrics& );
|
||||||
void setBoxBorderMetricsForAllStateCombinations( QskAspect, const QskBoxBorderMetrics&, QskAspect::State );
|
void setBoxBorderMetricsForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskBoxBorderMetrics& );
|
||||||
|
|
||||||
void removeBoxBorderMetric( QskAspect );
|
void removeBoxBorderMetric( QskAspect );
|
||||||
|
|
||||||
QskBoxBorderMetrics boxBorderMetrics( QskAspect ) const;
|
QskBoxBorderMetrics boxBorderMetrics( QskAspect ) const;
|
||||||
|
|
||||||
|
// boxBorderColors
|
||||||
|
|
||||||
void setBoxBorderColors( QskAspect, const QskBoxBorderColors& );
|
void setBoxBorderColors( QskAspect, const QskBoxBorderColors& );
|
||||||
void setBoxBorderColorsForAllStateCombinations( QskAspect, const QskBoxBorderColors&, QskAspect::State );
|
void setBoxBorderColorsForAllStateCombinations(
|
||||||
|
QskAspect::State, QskAspect, const QskBoxBorderColors& );
|
||||||
|
|
||||||
void setBoxBorderColors( QskAspect, const QColor& left, const QColor& top,
|
void setBoxBorderColors( QskAspect, const QColor& left, const QColor& top,
|
||||||
const QColor& right, const QColor& bottom );
|
const QColor& right, const QColor& bottom );
|
||||||
|
|
||||||
void removeBoxBorderColors( QskAspect );
|
void removeBoxBorderColors( QskAspect );
|
||||||
QskBoxBorderColors boxBorderColors( QskAspect ) const;
|
QskBoxBorderColors boxBorderColors( QskAspect ) const;
|
||||||
|
|
||||||
|
@ -193,6 +282,13 @@ inline bool QskSkinHintTableEditor::hasHint( QskAspect aspect ) const
|
||||||
return m_table->hasHint( aspect );
|
return m_table->hasHint( aspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
void QskSkinHintTableEditor::setHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const T& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect, QVariant::fromValue( hint ) );
|
||||||
|
}
|
||||||
|
|
||||||
// --- flag ---
|
// --- flag ---
|
||||||
|
|
||||||
inline void QskSkinHintTableEditor::setFlagHint( QskAspect aspect, const QVariant& hint )
|
inline void QskSkinHintTableEditor::setFlagHint( QskAspect aspect, const QVariant& hint )
|
||||||
|
@ -206,6 +302,19 @@ inline void QskSkinHintTableEditor::setFlagHint( QskAspect aspect, const T& hint
|
||||||
setHint( aspect | QskAspect::Flag, hint );
|
setHint( aspect | QskAspect::Flag, hint );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void QskSkinHintTableEditor::setFlagHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QVariant& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Flag, hint );
|
||||||
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
inline void QskSkinHintTableEditor::setFlagHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const T& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Flag, hint );
|
||||||
|
}
|
||||||
|
|
||||||
inline void QskSkinHintTableEditor::removeFlagHint( QskAspect aspect )
|
inline void QskSkinHintTableEditor::removeFlagHint( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeHint( aspect | QskAspect::Flag );
|
removeHint( aspect | QskAspect::Flag );
|
||||||
|
@ -235,6 +344,19 @@ inline void QskSkinHintTableEditor::setMetricHint( QskAspect aspect, const T& hi
|
||||||
setHint( aspect | QskAspect::Metric, hint );
|
setHint( aspect | QskAspect::Metric, hint );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void QskSkinHintTableEditor::setMetricHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QVariant& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Metric, hint );
|
||||||
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
inline void QskSkinHintTableEditor::setMetricHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const T& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Metric, hint );
|
||||||
|
}
|
||||||
|
|
||||||
inline void QskSkinHintTableEditor::removeMetricHint( QskAspect aspect )
|
inline void QskSkinHintTableEditor::removeMetricHint( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeHint( aspect | QskAspect::Metric );
|
removeHint( aspect | QskAspect::Metric );
|
||||||
|
@ -264,6 +386,19 @@ inline void QskSkinHintTableEditor::setColorHint( QskAspect aspect, const T& hin
|
||||||
setHint( aspect | QskAspect::Color, hint );
|
setHint( aspect | QskAspect::Color, hint );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void QskSkinHintTableEditor::setColorHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const QVariant& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Color, hint );
|
||||||
|
}
|
||||||
|
|
||||||
|
template< typename T >
|
||||||
|
inline void QskSkinHintTableEditor::setColorHintForAllStateCombinations(
|
||||||
|
QskAspect::State stateMask, QskAspect aspect, const T& hint )
|
||||||
|
{
|
||||||
|
setHintForAllStateCombinations( stateMask, aspect | QskAspect::Color, hint );
|
||||||
|
}
|
||||||
|
|
||||||
inline void QskSkinHintTableEditor::removeColorHint( QskAspect aspect )
|
inline void QskSkinHintTableEditor::removeColorHint( QskAspect aspect )
|
||||||
{
|
{
|
||||||
removeHint( aspect | QskAspect::Color );
|
removeHint( aspect | QskAspect::Color );
|
||||||
|
|
Loading…
Reference in New Issue