X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmirroraction.cpp;h=998a0e1f16b5f90344e355d1423b59b0fa44c3c4;hb=a42277d4d950d32459b16b3ec8ee8287c9c0afab;hp=500f59d9e6cd89633c1571e85ee2fe8b0de21083;hpb=428876081ee41d40e32f5b4f2bfcfdb7a835e6e1;p=architektonas diff --git a/src/mirroraction.cpp b/src/mirroraction.cpp index 500f59d..998a0e1 100644 --- a/src/mirroraction.cpp +++ b/src/mirroraction.cpp @@ -12,7 +12,9 @@ // #include "mirroraction.h" +#include "applicationwindow.h" #include "line.h" +#include "mathconstants.h" #include "painter.h" //#include "vector.h" @@ -48,8 +50,13 @@ MirrorAction::~MirrorAction() painter->DrawLine(p1, p2); painter->DrawHandle(p2); - QString text = tr("Length: %1 in."); - text = text.arg(Vector::Magnitude(p1, p2)); + double absAngle = (Vector(p2 - p1).Angle()) * RADIANS_TO_DEGREES; +// double absLength = Vector(position - endpoint).Magnitude(); + + QString text = QChar(0x2221) + QObject::tr(": %1"); + text = text.arg(absAngle); +// QString text = tr("Length: %1 in."); +// text = text.arg(Vector::Magnitude(p1, p2)); painter->DrawInformativeText(text); } } @@ -72,7 +79,9 @@ MirrorAction::~MirrorAction() if (state == FIRST_POINT) p1 = point; else + { p2 = point; + } }