src/lddocument.cpp

changeset 1291
9c570a30c98a
parent 1288
d1e45f90654b
child 1295
ac8f0297885b
equal deleted inserted replaced
1290:8db26042f3d1 1291:9c570a30c98a
67 QString LDDocument::name() const 67 QString LDDocument::name() const
68 { 68 {
69 return m_name; 69 return m_name;
70 } 70 }
71 71
72 void LDDocument::setHeader(LDHeader&& header)
73 {
74 this->m_header = header;
75 }
76
77 void LDDocument::setName (QString value) 72 void LDDocument::setName (QString value)
78 { 73 {
79 m_name = value; 74 m_name = value;
80 } 75 }
81 76
452 { 447 {
453 m_verticesOutdated = true; 448 m_verticesOutdated = true;
454 } 449 }
455 450
456 /* 451 /*
457 * Special operator definition that implements the XOR operator for the winding. 452 * Special operator definition that implements the XOR operator for windings.
458 * However, if either winding is NoWinding, then this function returns NoWinding. 453 * However, if either winding is NoWinding, then this function returns NoWinding.
459 */ 454 */
460 decltype(LDHeader::winding) operator^( 455 Winding operator^(Winding one, Winding other)
461 decltype(LDHeader::winding) one, 456 {
462 decltype(LDHeader::winding) other 457 if (one == NoWinding or other == NoWinding)
463 ) { 458 return NoWinding;
464 if (one == LDHeader::NoWinding or other == LDHeader::NoWinding)
465 return LDHeader::NoWinding;
466 else if (one != other)
467 return LDHeader::Clockwise;
468 else 459 else
469 return LDHeader::CounterClockwise; 460 return static_cast<Winding>(static_cast<int>(one) ^ static_cast<int>(other));
470 } 461 }

mercurial