# HG changeset patch # User insilmaril # Date 1136281481 0 # Node ID 494e8f40f0f713ab01f4b6f59ab07ab4db2f472b # Parent f75489896084ad6e0146d521a611ebb83c1a837e 1.7.6 New features for floatimages and fixes diff -r f75489896084 -r 494e8f40f0f7 ornamentedobj.cpp --- a/ornamentedobj.cpp Tue Jan 03 09:44:41 2006 +0000 +++ b/ornamentedobj.cpp Tue Jan 03 09:44:41 2006 +0000 @@ -53,9 +53,6 @@ standardFlags=new FlagRowObj(canvas); standardFlags->clone(standardFlagsDefault); standardFlags->setName ("standardFlags"); - - - } void OrnamentedObj::copy (OrnamentedObj* other) @@ -89,21 +86,26 @@ } -void OrnamentedObj::move (double x, double y) +void OrnamentedObj::positionContents() { - MapObj::move (x,y); - double dx=frame->getBorder()/2; // care for border around object - double dy=frame->getBorder()/2; - systemFlags-> move (x + dx, y + dy); + double d=frame->getBorder()/2; + double x=absPos.x(); + double y=absPos.y(); + systemFlags-> move (x + d, y + d ); // vertical align heading to bottom int h=max (systemFlags->getBBox().height(), standardFlags->getBBox().height()); h=max (h,heading->getHeight()); - heading->move (x + dx + systemFlags->getBBox().width(), - y + dy + h - heading->getHeight() + heading->move (x + d + systemFlags->getBBox().width(), + y + d + h - heading->getHeight() ); - standardFlags->move (x + heading->getWidth() + systemFlags->getBBox().width(), y + dy ); + standardFlags->move (x + heading->getWidth() + systemFlags->getBBox().width() + d , y + d ); +} +void OrnamentedObj::move (double x, double y) +{ + MapObj::move (x,y); + positionContents(); updateLink(); requestReposition(); } diff -r f75489896084 -r 494e8f40f0f7 ornamentedobj.h --- a/ornamentedobj.h Tue Jan 03 09:44:41 2006 +0000 +++ b/ornamentedobj.h Tue Jan 03 09:44:41 2006 +0000 @@ -20,6 +20,7 @@ virtual void setVisibility(bool)=0; // set vis. for w virtual void setColor(QColor,bool)=0; // set the color of text and link QColor getColor (); // get color of heading + virtual void positionContents(); virtual void move (double,double); virtual void move (QPoint); virtual void moveBy (double,double); @@ -39,6 +40,7 @@ NoteObj note; // Notes FlagRowObj *systemFlags; // System Flags FlagRowObj *standardFlags; // Standard Flags + }; #endif