X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawlineaction.cpp;h=b0b992a3de7e1d077d2222087ecc40eb54464da3;hb=f3110724be7ad4d4e8c6b97d350ff8af7fbf3799;hp=ffa2e7eaea35c71cd39ca24be6c9dbe785860eb7;hpb=043ecf4d074909ba2f7f53237962f9eaa72f19c2;p=architektonas diff --git a/src/drawlineaction.cpp b/src/drawlineaction.cpp index ffa2e7e..b0b992a 100644 --- a/src/drawlineaction.cpp +++ b/src/drawlineaction.cpp @@ -26,6 +26,7 @@ DrawLineAction::DrawLineAction(): state(0), line(NULL) { } + DrawLineAction::~DrawLineAction() { } @@ -33,18 +34,21 @@ DrawLineAction::~DrawLineAction() /*virtual*/ void DrawLineAction::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->DrawLine(p1, p2); + painter->DrawHandle(p2); } } + /*virtual*/ void DrawLineAction::MouseDown(Vector point) { if (state == FIRST_POINT) @@ -53,6 +57,7 @@ DrawLineAction::~DrawLineAction() p2 = point; } + /*virtual*/ void DrawLineAction::MouseMoved(Vector point) { if (state == FIRST_POINT) @@ -61,6 +66,7 @@ DrawLineAction::~DrawLineAction() p2 = point; } + /*virtual*/ void DrawLineAction::MouseReleased(void) { if (state == FIRST_POINT) @@ -79,3 +85,4 @@ DrawLineAction::~DrawLineAction() p1 = p2; } } +