Move some LABEL_SPIN_STYLE to the cpp to add back warnings
This commit is contained in:
parent
c8f308dd36
commit
5f581aa6ad
|
@ -130,6 +130,74 @@ static int* TemplateShape[5][4] =
|
|||
};
|
||||
|
||||
|
||||
LABEL_SPIN_STYLE LABEL_SPIN_STYLE::RotateCW()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: wxLogWarning( "RotateCW encountered unknown current spin style" ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
|
||||
|
||||
LABEL_SPIN_STYLE LABEL_SPIN_STYLE::RotateCCW()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: wxLogWarning( "RotateCCW encountered unknown current spin style" ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
|
||||
|
||||
LABEL_SPIN_STYLE LABEL_SPIN_STYLE::MirrorX()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::LEFT: break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: break;
|
||||
default: wxLogWarning( "MirrorX encountered unknown current spin style" ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
|
||||
|
||||
LABEL_SPIN_STYLE LABEL_SPIN_STYLE::MirrorY()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
case LABEL_SPIN_STYLE::UP: break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: break;
|
||||
default: wxLogWarning( "MirrorY encountered unknown current spin style" ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
|
||||
|
||||
SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType ) :
|
||||
SCH_ITEM( NULL, aType ),
|
||||
EDA_TEXT( text ),
|
||||
|
|
|
@ -71,75 +71,19 @@ public:
|
|||
return static_cast<int>( m_spin );
|
||||
}
|
||||
|
||||
LABEL_SPIN_STYLE RotateCW()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
LABEL_SPIN_STYLE RotateCW();
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
|
||||
LABEL_SPIN_STYLE RotateCCW()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
LABEL_SPIN_STYLE RotateCCW();
|
||||
|
||||
/*
|
||||
* Mirrors the label spin style across the X axis or simply swaps up and bottom
|
||||
*/
|
||||
LABEL_SPIN_STYLE MirrorX()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::LEFT: break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
LABEL_SPIN_STYLE MirrorX();
|
||||
|
||||
/*
|
||||
* Mirrors the label spin style across the Y axis or simply swaps left and right
|
||||
*/
|
||||
LABEL_SPIN_STYLE MirrorY()
|
||||
{
|
||||
SPIN newSpin = m_spin;
|
||||
|
||||
switch( m_spin )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
case LABEL_SPIN_STYLE::UP: break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
}
|
||||
LABEL_SPIN_STYLE MirrorY();
|
||||
|
||||
private:
|
||||
SPIN m_spin;
|
||||
|
|
Loading…
Reference in New Issue