more convenience setter/getter
This commit is contained in:
parent
a3e1065096
commit
46707cc507
@ -65,6 +65,11 @@ namespace
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline QskAspect aspectPosition( QskAspect aspect )
|
||||||
|
{
|
||||||
|
return aspect | QskAspect::Position;
|
||||||
|
}
|
||||||
|
|
||||||
inline QskAspect aspectStrutSize( QskAspect aspect )
|
inline QskAspect aspectStrutSize( QskAspect aspect )
|
||||||
{
|
{
|
||||||
return aspect | QskAspect::StrutSize;
|
return aspect | QskAspect::StrutSize;
|
||||||
@ -233,6 +238,23 @@ QskGradient QskSkinHintTableEditor::gradient( QskAspect aspect ) const
|
|||||||
return colorHint< QskGradient >( aspect );
|
return colorHint< QskGradient >( aspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setPosition(
|
||||||
|
QskAspect aspect, qreal position, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
setMetricHint( aspectPosition( aspect ), position, combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::removePosition(
|
||||||
|
QskAspect aspect, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
removeMetricHint( aspectPosition( aspect ), combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal QskSkinHintTableEditor::position( QskAspect aspect ) const
|
||||||
|
{
|
||||||
|
return metricHint< qreal >( aspectPosition( aspect ) );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setStrutSize(
|
void QskSkinHintTableEditor::setStrutSize(
|
||||||
QskAspect aspect, const QSizeF& size, QskStateCombination combination )
|
QskAspect aspect, const QSizeF& size, QskStateCombination combination )
|
||||||
{
|
{
|
||||||
|
@ -50,6 +50,9 @@ class QSK_EXPORT QskSkinHintTableEditor
|
|||||||
void setAnimation( QskAspect, QskAnimationHint,
|
void setAnimation( QskAspect, QskAnimationHint,
|
||||||
QskStateCombination = QskStateCombination() );
|
QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
void setAnimation( QskAspect, uint duration, QEasingCurve::Type,
|
||||||
|
QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
QskAnimationHint animation( QskAspect ) const;
|
QskAnimationHint animation( QskAspect ) const;
|
||||||
|
|
||||||
// flag
|
// flag
|
||||||
@ -118,6 +121,15 @@ class QSK_EXPORT QskSkinHintTableEditor
|
|||||||
|
|
||||||
QskGradient gradient( QskAspect ) const;
|
QskGradient gradient( QskAspect ) const;
|
||||||
|
|
||||||
|
// position
|
||||||
|
|
||||||
|
void setPosition( QskAspect, qreal,
|
||||||
|
QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
void removePosition( QskAspect, QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
qreal position( QskAspect ) const;
|
||||||
|
|
||||||
// strutSize
|
// strutSize
|
||||||
|
|
||||||
void setStrutSize( QskAspect, const QSizeF&,
|
void setStrutSize( QskAspect, const QSizeF&,
|
||||||
@ -376,4 +388,10 @@ inline void QskSkinHintTableEditor::setAnimation(
|
|||||||
setHint( aspect, hint, combination );
|
setHint( aspect, hint, combination );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void QskSkinHintTableEditor::setAnimation( QskAspect aspect,
|
||||||
|
uint duration, QEasingCurve::Type curveType, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
setAnimation( aspect, QskAnimationHint( duration, curveType ), combination );
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user