1.1 --- a/ornamentedobj.cpp Tue Jan 03 09:44:41 2006 +0000
1.2 +++ b/ornamentedobj.cpp Tue Jan 03 09:44:41 2006 +0000
1.3 @@ -53,9 +53,6 @@
1.4 standardFlags=new FlagRowObj(canvas);
1.5 standardFlags->clone(standardFlagsDefault);
1.6 standardFlags->setName ("standardFlags");
1.7 -
1.8 -
1.9 -
1.10 }
1.11
1.12 void OrnamentedObj::copy (OrnamentedObj* other)
1.13 @@ -89,21 +86,26 @@
1.14 }
1.15
1.16
1.17 -void OrnamentedObj::move (double x, double y)
1.18 +void OrnamentedObj::positionContents()
1.19 {
1.20 - MapObj::move (x,y);
1.21 - double dx=frame->getBorder()/2; // care for border around object
1.22 - double dy=frame->getBorder()/2;
1.23 - systemFlags-> move (x + dx, y + dy);
1.24 + double d=frame->getBorder()/2;
1.25 + double x=absPos.x();
1.26 + double y=absPos.y();
1.27 + systemFlags-> move (x + d, y + d );
1.28
1.29 // vertical align heading to bottom
1.30 int h=max (systemFlags->getBBox().height(), standardFlags->getBBox().height());
1.31 h=max (h,heading->getHeight());
1.32 - heading->move (x + dx + systemFlags->getBBox().width(),
1.33 - y + dy + h - heading->getHeight()
1.34 + heading->move (x + d + systemFlags->getBBox().width(),
1.35 + y + d + h - heading->getHeight()
1.36 );
1.37 - standardFlags->move (x + heading->getWidth() + systemFlags->getBBox().width(), y + dy );
1.38 + standardFlags->move (x + heading->getWidth() + systemFlags->getBBox().width() + d , y + d );
1.39 +}
1.40
1.41 +void OrnamentedObj::move (double x, double y)
1.42 +{
1.43 + MapObj::move (x,y);
1.44 + positionContents();
1.45 updateLink();
1.46 requestReposition();
1.47 }
2.1 --- a/ornamentedobj.h Tue Jan 03 09:44:41 2006 +0000
2.2 +++ b/ornamentedobj.h Tue Jan 03 09:44:41 2006 +0000
2.3 @@ -20,6 +20,7 @@
2.4 virtual void setVisibility(bool)=0; // set vis. for w
2.5 virtual void setColor(QColor,bool)=0; // set the color of text and link
2.6 QColor getColor (); // get color of heading
2.7 + virtual void positionContents();
2.8 virtual void move (double,double);
2.9 virtual void move (QPoint);
2.10 virtual void moveBy (double,double);
2.11 @@ -39,6 +40,7 @@
2.12 NoteObj note; // Notes
2.13 FlagRowObj *systemFlags; // System Flags
2.14 FlagRowObj *standardFlags; // Standard Flags
2.15 +
2.16 };
2.17
2.18 #endif