mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Add help line for assist alignement of element
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3591 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -62,6 +62,37 @@ bool Qet::surLeMemeAxe(Qet::Orientation a, Qet::Orientation b) {
|
||||
else return(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Qet::isOpposed
|
||||
* @param a
|
||||
* @param b
|
||||
* @return true if a and b is opposed, else false;
|
||||
*/
|
||||
bool Qet::isOpposed(Qet::Orientation a, Qet::Orientation b)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
switch (a)
|
||||
{
|
||||
case Qet::North:
|
||||
if (b == Qet::South) result = true;
|
||||
break;
|
||||
case Qet::East:
|
||||
if (b == Qet::West) result = true;
|
||||
break;
|
||||
case Qet::South:
|
||||
if (b == Qet::North) result = true;
|
||||
break;
|
||||
case Qet::West:
|
||||
if (b == Qet::East) result = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
Indique si une orientation de borne est horizontale (Est / Ouest).
|
||||
@param a L'orientation de borne
|
||||
|
||||
Reference in New Issue
Block a user