X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawcircleaction.cpp;h=0a2ac79126f4a5322b041703143d86edc9c4e1b7;hb=dbfab6256efe6b03e9750e33081d9dcdcdfc1c34;hp=fad31580b283bde7e5f9ed4f906660c44bc8e11b;hpb=043ecf4d074909ba2f7f53237962f9eaa72f19c2;p=architektonas diff --git a/src/drawcircleaction.cpp b/src/drawcircleaction.cpp index fad3158..0a2ac79 100644 --- a/src/drawcircleaction.cpp +++ b/src/drawcircleaction.cpp @@ -17,8 +17,7 @@ #include "vector.h" -#define FIRST_POINT 0 -#define NEXT_POINT 1 +enum { FIRST_POINT, NEXT_POINT }; DrawCircleAction::DrawCircleAction(): state(0), circle(NULL) @@ -32,14 +31,16 @@ DrawCircleAction::~DrawCircleAction() /*virtual*/ void DrawCircleAction::Draw(Painter * painter) { - // Need to fix pen colors, etc... + painter->SetPen(QPen(Qt::red, 2.0, Qt::DotLine)); + // I think stuff like crosshairs should be done in the DrawingView, tho if (state == FIRST_POINT) { - painter->DrawPoint(p1.x, p1.y); + painter->DrawHandle(p1); } else { + painter->DrawHandle(p1); double radius = Vector::Magnitude(p1, p2); painter->DrawEllipse(p1, radius, radius); } @@ -80,3 +81,14 @@ DrawCircleAction::~DrawCircleAction() p1 = p2; } } + + +/*virtual*/ void DrawCircleAction::KeyDown(int /*key*/) +{ +} + + +/*virtual*/ void DrawCircleAction::KeyReleased(int /*key*/) +{ +} +