Remove angle related members and methods

This commit is contained in:
Michael Gregorius
2023-07-08 14:55:03 +02:00
parent 9a5896fab1
commit e1b3a4415c
2 changed files with 1 additions and 62 deletions

View File

@@ -65,8 +65,7 @@ FloatModelEditorBase::FloatModelEditorBase(QWidget * _parent, const QString & _n
m_tdRenderer(nullptr),
m_volumeKnob( false ),
m_volumeRatio( 100.0, 0.0, 1000000.0 ),
m_buttonPressed( false ),
m_angle( -10 )
m_buttonPressed( false )
{
initUi( _name );
}
@@ -88,53 +87,6 @@ void FloatModelEditorBase::initUi( const QString & _name )
void FloatModelEditorBase::setTotalAngle( float angle )
{
if( angle < 10.0 )
{
m_totalAngle = 10.0;
}
else
{
m_totalAngle = angle;
}
update();
}
QLineF FloatModelEditorBase::calculateLine( const QPointF & _mid, float _radius, float _innerRadius ) const
{
const float rarc = m_angle * F_PI / 180.0;
const float ca = cos( rarc );
const float sa = -sin( rarc );
return QLineF( _mid.x() - sa*_innerRadius, _mid.y() - ca*_innerRadius,
_mid.x() - sa*_radius, _mid.y() - ca*_radius );
}
bool FloatModelEditorBase::updateAngle()
{
int angle = 0;
if( model() && model()->maxValue() != model()->minValue() )
{
angle = angleFromValue( model()->inverseScaledValue( model()->value() ), model()->minValue(), model()->maxValue(), m_totalAngle );
}
if( qAbs( angle - m_angle ) > 0 )
{
m_angle = angle;
return true;
}
return false;
}
float FloatModelEditorBase::getValue( const QPoint & _p )
{
float value;