clang-format
This commit is contained in:
parent
00d98fd1d0
commit
6222667f58
|
@ -270,9 +270,8 @@ QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::OuterDisk >(
|
||||||
const auto cY = center( sensor ).y();
|
const auto cY = center( sensor ).y();
|
||||||
const auto rZ = 0.0;
|
const auto rZ = 0.0;
|
||||||
|
|
||||||
const auto matrix = matrix_deg( 0.0, cX, cY ) *
|
const auto matrix =
|
||||||
matrix_deg( rZ, 0, 0 ) *
|
matrix_deg( 0.0, cX, cY ) * matrix_deg( rZ, 0, 0 ) * matrix_deg( 0.0, -size, -size );
|
||||||
matrix_deg( 0.0, -size, -size );
|
|
||||||
|
|
||||||
root->setMatrix( matrix );
|
root->setMatrix( matrix );
|
||||||
return root;
|
return root;
|
||||||
|
@ -312,12 +311,9 @@ QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::Horizon >(
|
||||||
return tNode;
|
return tNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_REQUIRED_RESULT QSGNode* updateLinearTickmarksNode(
|
Q_REQUIRED_RESULT QSGNode* updateLinearTickmarksNode( const QskLevelingSensor* const sensor,
|
||||||
const QskLevelingSensor* const sensor,
|
const QskAspect::Subcontrol subControl, const QskScaleTickmarks& tickmarks,
|
||||||
const QskAspect::Subcontrol subControl,
|
const Qt::Orientation orientation, QSGNode* const node )
|
||||||
const QskScaleTickmarks& tickmarks,
|
|
||||||
const Qt::Orientation orientation,
|
|
||||||
QSGNode* const node )
|
|
||||||
{
|
{
|
||||||
const auto state = State< QskAspect::Subcontrol >( sensor, subControl );
|
const auto state = State< QskAspect::Subcontrol >( sensor, subControl );
|
||||||
const auto color = sensor->color( subControl );
|
const auto color = sensor->color( subControl );
|
||||||
|
@ -401,12 +397,14 @@ QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksXLabels >(
|
||||||
const auto dX = qFastCos( qDegreesToRadians( 90 + state.rZ ) ) * r3;
|
const auto dX = qFastCos( qDegreesToRadians( 90 + state.rZ ) ) * r3;
|
||||||
const auto dY = qFastSin( qDegreesToRadians( 90 + state.rZ ) ) * r3;
|
const auto dY = qFastSin( qDegreesToRadians( 90 + state.rZ ) ) * r3;
|
||||||
|
|
||||||
auto* const cNode = ensureNodes< RadialClipNode, QSGTransformNode, LinearTickmarksLabelsNode >( node );
|
auto* const cNode =
|
||||||
|
ensureNodes< RadialClipNode, QSGTransformNode, LinearTickmarksLabelsNode >( node );
|
||||||
auto* const tNode = static_cast< QSGTransformNode* >( cNode->firstChild() );
|
auto* const tNode = static_cast< QSGTransformNode* >( cNode->firstChild() );
|
||||||
auto* const lNode = static_cast< LinearTickmarksLabelsNode* >( tNode->firstChild() );
|
auto* const lNode = static_cast< LinearTickmarksLabelsNode* >( tNode->firstChild() );
|
||||||
cNode->setGeometryProperties( state.r1, state.cX, state.cY );
|
cNode->setGeometryProperties( state.r1, state.cX, state.cY );
|
||||||
tNode->setMatrix( matrix_deg( state.rZ, state.cX + state.tX + dX, state.cY + state.tY + dY ) );
|
tNode->setMatrix( matrix_deg( state.rZ, state.cX + state.tX + dX, state.cY + state.tY + dY ) );
|
||||||
lNode->update( sensor, subControl, sensor->tickmarkLabels( Qt::XAxis ), { state.scale().x(), 0.0 } );
|
lNode->update(
|
||||||
|
sensor, subControl, sensor->tickmarkLabels( Qt::XAxis ), { state.scale().x(), 0.0 } );
|
||||||
return cNode;
|
return cNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,12 +419,14 @@ QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksYLabels >(
|
||||||
const auto dX = qFastCos( qDegreesToRadians( state.rZ ) ) * r3;
|
const auto dX = qFastCos( qDegreesToRadians( state.rZ ) ) * r3;
|
||||||
const auto dY = qFastSin( qDegreesToRadians( state.rZ ) ) * r3;
|
const auto dY = qFastSin( qDegreesToRadians( state.rZ ) ) * r3;
|
||||||
|
|
||||||
auto* const cNode = ensureNodes< RadialClipNode, QSGTransformNode, LinearTickmarksLabelsNode >( node );
|
auto* const cNode =
|
||||||
|
ensureNodes< RadialClipNode, QSGTransformNode, LinearTickmarksLabelsNode >( node );
|
||||||
auto* const tNode = static_cast< QSGTransformNode* >( cNode->firstChild() );
|
auto* const tNode = static_cast< QSGTransformNode* >( cNode->firstChild() );
|
||||||
auto* const lNode = static_cast< LinearTickmarksLabelsNode* >( tNode->firstChild() );
|
auto* const lNode = static_cast< LinearTickmarksLabelsNode* >( tNode->firstChild() );
|
||||||
cNode->setGeometryProperties( state.r1, state.cX, state.cY );
|
cNode->setGeometryProperties( state.r1, state.cX, state.cY );
|
||||||
tNode->setMatrix( matrix_deg( state.rZ, state.cX + state.tX + dX, state.cY + state.tY + dY ) );
|
tNode->setMatrix( matrix_deg( state.rZ, state.cX + state.tX + dX, state.cY + state.tY + dY ) );
|
||||||
lNode->update( sensor, subControl, sensor->tickmarkLabels( Qt::YAxis ), { 0.0, state.scale().y() } );
|
lNode->update(
|
||||||
|
sensor, subControl, sensor->tickmarkLabels( Qt::YAxis ), { 0.0, state.scale().y() } );
|
||||||
return cNode;
|
return cNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue