/*virtual*/ void DrawLineAction::Draw(Painter * painter)
{
// Need to fix pen colors, etc...
+ // I think stuff like crosshairs should be done in the DrawingView, tho
if (state == FIRST_POINT)
{
painter->DrawPoint(p1.x, p1.y);
/*virtual*/ void DrawLineAction::MouseReleased(void)
{
if (state == FIRST_POINT)
+ {
+ p2 = p1;
state = NEXT_POINT;
+ }
else if (state == NEXT_POINT)
{
- // We create the new object here, and then pass it off to the document.
+ // We create the new object here, and then pass it off to the
+ // DrawingView which stuffs it into the document.
line = new Line(p1, p2);
// We don't need no stinkin' sentinels, when we have signals & slots!
emit ObjectReady(line);
-
+
p1 = p2;
}
}