1.1 --- a/ornamentedobj.cpp Thu Nov 16 10:07:11 2006 +0000
1.2 +++ b/ornamentedobj.cpp Fri Dec 29 13:52:17 2006 +0000
1.3 @@ -18,13 +18,13 @@
1.4 init ();
1.5 }
1.6
1.7 -OrnamentedObj::OrnamentedObj(Q3Canvas* c) :LinkableMapObj(c)
1.8 +OrnamentedObj::OrnamentedObj(QGraphicsScene* s) :LinkableMapObj(s)
1.9 {
1.10 -// cout << "Const OrnamentedObj\n";
1.11 +// cout << "Const OrnamentedObj (s)\n";
1.12 init ();
1.13 }
1.14
1.15 -OrnamentedObj::OrnamentedObj (OrnamentedObj* lmo) : LinkableMapObj (lmo->canvas)
1.16 +OrnamentedObj::OrnamentedObj (OrnamentedObj* lmo) : LinkableMapObj (lmo->scene)
1.17 {
1.18 copy (lmo);
1.19 }
1.20 @@ -40,17 +40,17 @@
1.21
1.22 void OrnamentedObj::init ()
1.23 {
1.24 - heading = new HeadingObj(canvas);
1.25 + heading = new HeadingObj(scene);
1.26 heading->move (absPos.x(), absPos.y());
1.27
1.28 note.setNote("");
1.29 note.setFontHint (textEditor->getFontHintDefault() );
1.30
1.31 - systemFlags=new FlagRowObj(canvas);
1.32 + systemFlags=new FlagRowObj(scene);
1.33 systemFlags->clone(systemFlagsDefault);
1.34 systemFlags->setName ("systemFlags");
1.35
1.36 - standardFlags=new FlagRowObj(canvas);
1.37 + standardFlags=new FlagRowObj(scene);
1.38 standardFlags->clone(standardFlagsDefault);
1.39 standardFlags->setName ("standardFlags");
1.40
1.41 @@ -123,8 +123,8 @@
1.42 );
1.43 standardFlags->move (ox +x + heading->getWidth() + systemFlags->getBBox().width() , oy + y );
1.44
1.45 - ornamentsBBox.moveTopLeft ( QPoint ((int)(ox+x),(int)(oy+y)));
1.46 - clickBox.moveTopLeft (QPoint ((int)(ox + x), (int)(oy + y)));
1.47 + ornamentsBBox.moveTopLeft ( QPointF ((int)(ox+x),(int)(oy+y)));
1.48 + clickBox.moveTopLeft (QPointF ((int)(ox + x), (int)(oy + y)));
1.49 }
1.50
1.51 void OrnamentedObj::move (double x, double y)
1.52 @@ -135,7 +135,7 @@
1.53 requestReposition();
1.54 }
1.55
1.56 -void OrnamentedObj::move (QPoint p)
1.57 +void OrnamentedObj::move (QPointF p)
1.58 {
1.59 move (p.x(), p.y());
1.60 }
1.61 @@ -152,22 +152,22 @@
1.62 requestReposition();
1.63 }
1.64
1.65 -void OrnamentedObj::moveBy (QPoint p)
1.66 +void OrnamentedObj::moveBy (QPointF p)
1.67 {
1.68 moveBy (p.x(), p.y());
1.69 }
1.70
1.71 void OrnamentedObj::move2RelPos(double x, double y)
1.72 {
1.73 - setRelPos (QPoint((int)x,(int)y));
1.74 + setRelPos (QPointF((int)x,(int)y));
1.75 if (parObj)
1.76 {
1.77 - QPoint p=parObj->getChildPos();
1.78 + QPointF p=parObj->getChildPos();
1.79 move (p.x()+x, p.y() +y);
1.80 }
1.81 }
1.82
1.83 -void OrnamentedObj::move2RelPos(QPoint p)
1.84 +void OrnamentedObj::move2RelPos(QPointF p)
1.85 {
1.86 move2RelPos (p.x(),p.y());
1.87 }
1.88 @@ -299,7 +299,7 @@
1.89 return standardFlags->isActive(f);
1.90 }
1.91
1.92 -QString OrnamentedObj::getSystemFlagName(const QPoint &p)
1.93 +QString OrnamentedObj::getSystemFlagName(const QPointF &p)
1.94 {
1.95 return systemFlags->getFlagName(p);
1.96 }
1.97 @@ -362,14 +362,14 @@
1.98
1.99 if (depth==0)
1.100 posAttr=
1.101 - attribut("absPosX",QString().setNum(absPos.x(),10)) +
1.102 - attribut("absPosY",QString().setNum(absPos.y(),10));
1.103 + attribut("absPosX",QString().setNum(absPos.x())) +
1.104 + attribut("absPosY",QString().setNum(absPos.y()));
1.105 else
1.106 {
1.107 if (depth==1 || typeid (*this)==typeid (FloatImageObj))
1.108 posAttr=
1.109 - attribut("relPosX",QString().setNum(relPos.x(),10)) +
1.110 - attribut("relPosY",QString().setNum(relPos.y(),10));
1.111 + attribut("relPosX",QString().setNum(relPos.x())) +
1.112 + attribut("relPosY",QString().setNum(relPos.y()));
1.113 else
1.114 posAttr="";
1.115 }