Formatting.

This commit is contained in:
Jeff Young
2025-08-19 18:33:18 +01:00
parent 5fa635602b
commit 941ea9edbb
+22 -3
View File
@@ -78,18 +78,28 @@
TUNING_STATUS_VIEW_ITEM::TUNING_STATUS_VIEW_ITEM( PCB_BASE_EDIT_FRAME* aFrame ) :
EDA_ITEM( NOT_USED ), // Never added to anything - just a preview
m_frame( aFrame ), m_min( 0.0 ), m_max( 0.0 ), m_current( 0.0 ), m_isTimeDomain( false )
m_frame( aFrame ),
m_min( 0.0 ),
m_max( 0.0 ),
m_current( 0.0 ),
m_isTimeDomain( false )
{ }
wxString TUNING_STATUS_VIEW_ITEM::GetClass() const { return wxT( "TUNING_STATUS" ); }
wxString TUNING_STATUS_VIEW_ITEM::GetClass() const
{
return wxT( "TUNING_STATUS" );
}
#if defined(DEBUG)
void TUNING_STATUS_VIEW_ITEM::Show( int nestLevel, std::ostream& os ) const {}
#endif
VECTOR2I TUNING_STATUS_VIEW_ITEM::GetPosition() const { return m_pos; }
void TUNING_STATUS_VIEW_ITEM::SetPosition( const VECTOR2I& aPos ) { m_pos = aPos; };
void TUNING_STATUS_VIEW_ITEM::SetMinMax( const double aMin, const double aMax )
{
const EDA_DATA_TYPE unitType = m_isTimeDomain ? EDA_DATA_TYPE::TIME : EDA_DATA_TYPE::DISTANCE;
@@ -100,6 +110,7 @@ void TUNING_STATUS_VIEW_ITEM::SetMinMax( const double aMin, const double aMax )
m_maxText = m_frame->MessageTextFromValue( m_max, false, unitType );
}
void TUNING_STATUS_VIEW_ITEM::ClearMinMax()
{
m_min = 0.0;
@@ -108,6 +119,7 @@ void TUNING_STATUS_VIEW_ITEM::ClearMinMax()
m_maxText = wxT( "---" );
}
void TUNING_STATUS_VIEW_ITEM::SetCurrent( const double aCurrent, const wxString& aLabel )
{
const EDA_DATA_TYPE unitType = m_isTimeDomain ? EDA_DATA_TYPE::TIME : EDA_DATA_TYPE::DISTANCE;
@@ -117,7 +129,12 @@ void TUNING_STATUS_VIEW_ITEM::SetCurrent( const double aCurrent, const wxString&
m_currentLabel = aLabel;
}
void TUNING_STATUS_VIEW_ITEM::SetIsTimeDomain( const bool aIsTimeDomain ) { m_isTimeDomain = aIsTimeDomain; }
void TUNING_STATUS_VIEW_ITEM::SetIsTimeDomain( const bool aIsTimeDomain )
{
m_isTimeDomain = aIsTimeDomain;
}
const BOX2I TUNING_STATUS_VIEW_ITEM::ViewBBox() const
{
@@ -129,11 +146,13 @@ const BOX2I TUNING_STATUS_VIEW_ITEM::ViewBBox() const
return tmp;
}
std::vector<int> TUNING_STATUS_VIEW_ITEM::ViewGetLayers() const
{
return { LAYER_UI_START, LAYER_UI_START + 1 };
}
void TUNING_STATUS_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
{
KIGFX::GAL* gal = aView->GetGAL();