2020-12-26 12:57:08 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include "QskSkinHintTableEditor.h"
|
|
|
|
#include "QskSkinHintTable.h"
|
|
|
|
|
|
|
|
#include "QskMargins.h"
|
|
|
|
#include "QskBoxShapeMetrics.h"
|
|
|
|
#include "QskBoxBorderMetrics.h"
|
|
|
|
#include "QskBoxBorderColors.h"
|
|
|
|
#include "QskGradient.h"
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
2021-09-02 08:11:53 +02:00
|
|
|
inline QskAspect::State lowestState( QskAspect::State mask )
|
|
|
|
{
|
|
|
|
using StateInt = typename std::underlying_type< QskAspect::State >::type;
|
|
|
|
|
|
|
|
const auto count = qCountTrailingZeroBits( static_cast< StateInt >( mask ) );
|
|
|
|
return static_cast< QskAspect::State >( 1 << count );
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void setHintStateMask(
|
2021-08-31 17:59:00 +02:00
|
|
|
QskSkinHintTable* table, QskAspect aspect, const QVariant& hint,
|
|
|
|
QskAspect::State state, QskAspect::State mask )
|
|
|
|
{
|
|
|
|
if ( mask == 0 )
|
|
|
|
{
|
|
|
|
if ( state != 0 )
|
|
|
|
table->setHint( aspect | state, hint );
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
const auto stateBit = lowestState( mask );
|
2021-08-31 17:59:00 +02:00
|
|
|
|
|
|
|
mask &= ~stateBit;
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
setHintStateMask( table, aspect, hint, state, mask );
|
|
|
|
setHintStateMask( table, aspect, hint, state | stateBit, mask );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
inline bool removeHintStateMask(
|
2021-08-31 17:59:00 +02:00
|
|
|
QskSkinHintTable* table, QskAspect aspect,
|
|
|
|
QskAspect::State state, QskAspect::State mask )
|
|
|
|
{
|
|
|
|
if ( mask == 0 )
|
|
|
|
{
|
|
|
|
if ( state != 0 )
|
|
|
|
return table->removeHint( aspect | state );
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-09-02 13:12:29 +02:00
|
|
|
const auto stateBit = lowestState( mask );
|
|
|
|
|
2021-08-31 17:59:00 +02:00
|
|
|
mask &= ~stateBit;
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
bool ret = removeHintStateMask( table, aspect, state, mask );
|
|
|
|
ret |= removeHintStateMask( table, aspect, state | stateBit, mask );
|
2021-08-31 17:59:00 +02:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
inline QskAspect aspectStrutSize( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::StrutSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectMargin( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Margin;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectPadding( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Padding;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectSpacing( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Spacing;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectAlignment( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Alignment;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectFontRole( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::FontRole;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectGraphicRole( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::GraphicRole;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectShape( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Shape;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskAspect aspectBorder( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return aspect | QskAspect::Border;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QskSkinHintTableEditor::QskSkinHintTableEditor( QskSkinHintTable* table )
|
|
|
|
: m_table( table )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setTable( QskSkinHintTable* table )
|
|
|
|
{
|
|
|
|
m_table = table;
|
|
|
|
}
|
|
|
|
|
|
|
|
QskSkinHintTable* QskSkinHintTableEditor::table() const
|
|
|
|
{
|
|
|
|
return m_table;
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
void QskSkinHintTableEditor::setHintForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QVariant& hint )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-02 08:11:53 +02:00
|
|
|
setHintStateMask( m_table, aspect, hint, QskAspect::NoState, stateMask );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
bool QskSkinHintTableEditor::removeHintForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-02 08:11:53 +02:00
|
|
|
return removeHintStateMask( m_table, aspect, QskAspect::NoState, stateMask );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setAnimationForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, QskAnimationHint hint )
|
|
|
|
{
|
|
|
|
aspect.setAnimator( true );
|
|
|
|
setHintForAllStateCombinations( stateMask, aspect, QVariant::fromValue( hint ) );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::setFlag( QskAspect aspect, int flag )
|
|
|
|
{
|
|
|
|
setFlagHint( aspect, flag );
|
|
|
|
}
|
|
|
|
|
|
|
|
int QskSkinHintTableEditor::flag( QskAspect aspect ) const
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
return flagHint< int >( aspect );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setFlagForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, int flag )
|
|
|
|
{
|
|
|
|
setFlagHintForAllStateCombinations( stateMask, aspect, flag );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::setMetric( QskAspect aspect, qreal metric )
|
|
|
|
{
|
|
|
|
setMetricHint( aspect, metric );
|
|
|
|
}
|
|
|
|
|
|
|
|
qreal QskSkinHintTableEditor::metric( QskAspect aspect ) const
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
return metricHint< qreal >( aspect );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setMetricForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, qreal metric )
|
|
|
|
{
|
|
|
|
setMetricHintForAllStateCombinations( stateMask, aspect, metric );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::setColor( QskAspect aspect, Qt::GlobalColor color )
|
|
|
|
{
|
|
|
|
setColorHint( aspect, QColor( color ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setColor( QskAspect aspect, QRgb rgb )
|
|
|
|
{
|
|
|
|
setColorHint( aspect, QColor::fromRgba( rgb ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setColor( QskAspect aspect, const QColor& color )
|
|
|
|
{
|
|
|
|
setColorHint( aspect, color );
|
|
|
|
}
|
|
|
|
|
|
|
|
QColor QskSkinHintTableEditor::color( QskAspect aspect ) const
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
return colorHint< QColor >( aspect );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
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 );
|
|
|
|
}
|
|
|
|
|
2021-01-07 13:48:56 +01:00
|
|
|
void QskSkinHintTableEditor::setHGradient(
|
|
|
|
QskAspect aspect, const QColor& color1, const QColor& color2 )
|
|
|
|
{
|
|
|
|
setGradient( aspect, QskGradient( QskGradient::Horizontal, color1, color2 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setVGradient(
|
|
|
|
QskAspect aspect, const QColor& color1, const QColor& color2 )
|
|
|
|
{
|
|
|
|
setGradient( aspect, QskGradient( QskGradient::Vertical, color1, color2 ) );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::setGradient( QskAspect aspect, const QskGradient& gradient )
|
|
|
|
{
|
|
|
|
setColorHint( aspect, gradient );
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
void QskSkinHintTableEditor::setGradientForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskGradient& gradient )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-03 06:51:50 +02:00
|
|
|
setColorHintForAllStateCombinations( stateMask, aspect, QVariant::fromValue( gradient ) );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
QskGradient QskSkinHintTableEditor::gradient( QskAspect aspect ) const
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
return colorHint< QskGradient >( aspect );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, const QSizeF& size )
|
|
|
|
{
|
2021-09-03 06:51:50 +02:00
|
|
|
setMetricHint( aspectStrutSize( aspect ), size );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setStrutSize( QskAspect aspect, qreal width, qreal height )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectStrutSize( aspect ), QSizeF( width, height ) );
|
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setStrutSizeForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QSizeF& size )
|
|
|
|
{
|
|
|
|
setMetricHintForAllStateCombinations( stateMask, aspectStrutSize( aspect ), size );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removeStrutSize( QskAspect aspect )
|
|
|
|
{
|
|
|
|
removeMetricHint( aspectStrutSize( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QSizeF QskSkinHintTableEditor::strutSize( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< QSizeF >( aspectStrutSize( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setMargin( QskAspect aspect, const QskMargins& margins )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectMargin( aspect ), margins );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setMargin( QskAspect aspect,
|
|
|
|
qreal left, qreal top, qreal right, qreal bottom )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectMargin( aspect ), QskMargins( left, top, right, bottom ) );
|
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setMarginForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskMargins& margins )
|
|
|
|
{
|
|
|
|
setMetricHintForAllStateCombinations( stateMask, aspectMargin( aspect ), margins );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removeMargin( QskAspect aspect )
|
|
|
|
{
|
|
|
|
removeMetricHint( aspectMargin( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QskMargins QskSkinHintTableEditor::margin( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< QskMargins >( aspectMargin( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setPadding( QskAspect aspect, const QskMargins& padding )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectPadding( aspect ), padding );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setPadding( QskAspect aspect,
|
|
|
|
qreal left, qreal top, qreal right, qreal bottom )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectPadding( aspect ), QskMargins( left, top, right, bottom ) );
|
|
|
|
}
|
|
|
|
|
2021-09-03 06:51:50 +02:00
|
|
|
void QskSkinHintTableEditor::setPaddingForAllStateCombinations(
|
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskMargins& margins )
|
|
|
|
{
|
|
|
|
setMetricHintForAllStateCombinations( stateMask, aspectPadding( aspect ), margins );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removePadding( QskAspect aspect )
|
|
|
|
{
|
|
|
|
removeMetricHint( aspectPadding( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QskMargins QskSkinHintTableEditor::padding( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< QskMargins >( aspectPadding( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setSpacing( QskAspect aspect, qreal spacing )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectSpacing( aspect ), spacing );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::removeSpacing( QskAspect aspect )
|
|
|
|
{
|
|
|
|
removeMetricHint( aspectSpacing( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
qreal QskSkinHintTableEditor::spacing( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< qreal >( aspectSpacing( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setAlignment( QskAspect aspect, Qt::Alignment alignment )
|
|
|
|
{
|
2021-09-03 06:51:50 +02:00
|
|
|
setFlagHint( aspectAlignment( aspect ), static_cast< int >( alignment ) );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::removeAlignment( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeFlagHint( aspectAlignment( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
Qt::Alignment QskSkinHintTableEditor::alignment( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return flagHint< Qt::Alignment >( aspectAlignment( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setFontRole( QskAspect aspect, int fontRole )
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
setFlagHint( aspectFontRole( aspect ), fontRole );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::removeFontRole( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeFlagHint( aspectFontRole( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
int QskSkinHintTableEditor::fontRole( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return flagHint< int >( aspectFontRole( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setGraphicRole( QskAspect aspect, int graphicRole )
|
|
|
|
{
|
2021-08-04 09:31:16 +02:00
|
|
|
setFlagHint( aspectGraphicRole( aspect ), graphicRole );
|
2020-12-26 12:57:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::removeGraphicRole( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeFlagHint( aspectGraphicRole( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
int QskSkinHintTableEditor::graphicRole( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return flagHint< int >( aspectGraphicRole( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxShape(
|
|
|
|
QskAspect aspect, qreal radius, Qt::SizeMode sizeMode )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectShape( aspect ),
|
|
|
|
QskBoxShapeMetrics( radius, sizeMode ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxShape( QskAspect aspect, qreal topLeft, qreal topRight,
|
|
|
|
qreal bottomLeft, qreal bottomRight, Qt::SizeMode sizeMode )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectShape( aspect ),
|
|
|
|
QskBoxShapeMetrics( topLeft, topRight, bottomLeft, bottomRight, sizeMode ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxShape(
|
|
|
|
QskAspect aspect, const QskBoxShapeMetrics& shape )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectShape( aspect ), shape );
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
void QskSkinHintTableEditor::setBoxShapeForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxShapeMetrics& shape )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-02 08:11:53 +02:00
|
|
|
setMetricHintForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
stateMask, aspectShape( aspect ), QVariant::fromValue( shape ) );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removeBoxShape( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeMetricHint( aspectShape( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QskBoxShapeMetrics QskSkinHintTableEditor::boxShape( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< QskBoxShapeMetrics >( aspectShape( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxBorderMetrics( QskAspect aspect,
|
|
|
|
qreal borderWidth, Qt::SizeMode sizeMode )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectBorder( aspect ),
|
|
|
|
QskBoxBorderMetrics( borderWidth, sizeMode ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxBorderMetrics( QskAspect aspect,
|
|
|
|
qreal left, qreal top, qreal right, qreal bottom, Qt::SizeMode sizeMode )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectBorder( aspect ),
|
|
|
|
QskBoxBorderMetrics( left, top, right, bottom, sizeMode ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxBorderMetrics(
|
|
|
|
QskAspect aspect, const QskBoxBorderMetrics& borderMetrics )
|
|
|
|
{
|
|
|
|
setMetricHint( aspectBorder( aspect ), borderMetrics );
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
void QskSkinHintTableEditor::setBoxBorderMetricsForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxBorderMetrics& borderMetrics )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-03 06:51:50 +02:00
|
|
|
setMetricHintForAllStateCombinations( stateMask,
|
|
|
|
aspectBorder( aspect ), QVariant::fromValue( borderMetrics ) );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removeBoxBorderMetric( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeMetricHint( aspectBorder( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QskBoxBorderMetrics QskSkinHintTableEditor::boxBorderMetrics( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return metricHint< QskBoxBorderMetrics >( aspectBorder( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void QskSkinHintTableEditor::setBoxBorderColors(
|
|
|
|
QskAspect aspect, const QskBoxBorderColors& borderColors )
|
|
|
|
{
|
|
|
|
setColorHint( aspectBorder( aspect ), borderColors );
|
|
|
|
}
|
|
|
|
|
2021-09-02 08:11:53 +02:00
|
|
|
void QskSkinHintTableEditor::setBoxBorderColorsForAllStateCombinations(
|
2021-09-03 06:51:50 +02:00
|
|
|
QskAspect::State stateMask, QskAspect aspect, const QskBoxBorderColors& borderColors )
|
2021-08-31 17:59:00 +02:00
|
|
|
{
|
2021-09-03 06:51:50 +02:00
|
|
|
setColorHintForAllStateCombinations( stateMask, aspectBorder( aspect ),
|
|
|
|
QVariant::fromValue( borderColors ) );
|
2021-08-31 17:59:00 +02:00
|
|
|
}
|
|
|
|
|
2021-02-01 10:23:47 +01:00
|
|
|
void QskSkinHintTableEditor::setBoxBorderColors( QskAspect aspect,
|
|
|
|
const QColor& left, const QColor& top, const QColor& right, const QColor& bottom )
|
|
|
|
{
|
|
|
|
setColorHint( aspectBorder( aspect ),
|
|
|
|
QskBoxBorderColors( left, top, right, bottom ) );
|
|
|
|
}
|
|
|
|
|
2020-12-26 12:57:08 +01:00
|
|
|
void QskSkinHintTableEditor::removeBoxBorderColors( QskAspect aspect )
|
|
|
|
{
|
|
|
|
return removeColorHint( aspectBorder( aspect ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QskBoxBorderColors QskSkinHintTableEditor::boxBorderColors( QskAspect aspect ) const
|
|
|
|
{
|
|
|
|
return colorHint< QskBoxBorderColors >( aspectBorder( aspect ) );
|
|
|
|
}
|