oldPoint = point;
needUpdate = true;
+
+//doesn't work QMainWindow::statusBar()->setText("You are manipulating a line");
}
/*
More elegant ways:
- Pass the point in a notification function (how?)
- - Pass the point as a reference to the class instance object (&endpoint). This way, the line
- doesn't have to care about keeping track of Dimensions connected to it. But still have to
- care about other connected entities (other Lines, Circles, Arcs, Splines, Texts, etc). I
- think I'd be OK with this.
- Since the Dimension has a pointer to our object, all we have to do is update our coordinates
- and the Dimension object will adjust itself on the next repaint. Problem solved, and we don't
- have to know anything about how many Dimensions are connected to us, or where! \o/
+ - Pass the point as a reference to the class instance object (&endpoint). This
+ way, the line doesn't have to care about keeping track of Dimensions
+ connected to it. But still have to care about other connected entities
+ (other Lines, Circles, Arcs, Splines, Texts, etc). I think I'd be OK with
+ this. Since the Dimension has a pointer to our object, all we have to do is
+ update our coordinates and the Dimension object will adjust itself on the
+ next repaint. Problem solved, and we don't have to know anything about how
+ many Dimensions are connected to us, or where! \o/
The question then becomes, how do we do this kind of coupling???
-We need to know about connected entities so that we can have them either move in expected ways
-or constrain the movement of this Line object. This is how we will be a cut above all other CAD
-software currently out there: the GUI will try to do the right thing, most of the time. :-)
+We need to know about connected entities so that we can have them either move
+in expected ways or constrain the movement of this Line object. This is how we
+will be a cut above all other CAD software currently out there: the GUI will
+try to do the right thing, most of the time. :-)
*/
if (needUpdate)
{