author | insilmaril |
Wed, 10 Feb 2010 13:48:42 +0000 | |
changeset 822 | c2ce9944148c |
parent 798 | d251c7b2de54 |
child 823 | 0bba81dde1bc |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#include "floatobj.h" |
insilmaril@0 | 2 |
|
insilmaril@790 | 3 |
#include <iostream> |
insilmaril@790 | 4 |
using namespace std; |
insilmaril@790 | 5 |
|
insilmaril@0 | 6 |
///////////////////////////////////////////////////////////////// |
insilmaril@0 | 7 |
// FloatObj |
insilmaril@0 | 8 |
///////////////////////////////////////////////////////////////// |
insilmaril@0 | 9 |
|
insilmaril@790 | 10 |
FloatObj::FloatObj (QGraphicsScene* s, TreeItem *ti):OrnamentedObj(s,ti) |
insilmaril@0 | 11 |
{ |
insilmaril@798 | 12 |
//cout << "Const FloatObj s="<<s<<" ti="<<ti<<" treeItem="<<treeItem<<endl; |
insilmaril@0 | 13 |
setParObj (this); |
insilmaril@0 | 14 |
init(); |
insilmaril@0 | 15 |
} |
insilmaril@0 | 16 |
|
insilmaril@0 | 17 |
FloatObj::~FloatObj () |
insilmaril@0 | 18 |
{ |
insilmaril@0 | 19 |
// cout << "Destr FloatObj\n"; |
insilmaril@0 | 20 |
} |
insilmaril@0 | 21 |
|
insilmaril@779 | 22 |
#include <iostream> |
insilmaril@779 | 23 |
using namespace std; |
insilmaril@0 | 24 |
void FloatObj::init () |
insilmaril@0 | 25 |
{ |
insilmaril@0 | 26 |
zPlane=Z_ICON; |
insilmaril@470 | 27 |
setLinkStyle (LinkableMapObj::Parabel); |
insilmaril@777 | 28 |
//FIXME-2 setHideLinkUnselected(true); |
insilmaril@0 | 29 |
} |
insilmaril@0 | 30 |
|
insilmaril@0 | 31 |
void FloatObj::copy (FloatObj* other) |
insilmaril@0 | 32 |
{ |
insilmaril@0 | 33 |
LinkableMapObj::copy (other); |
insilmaril@0 | 34 |
setVisibility (other->visible); |
insilmaril@0 | 35 |
} |
insilmaril@0 | 36 |
|
insilmaril@408 | 37 |
void FloatObj::setZValue(const int &i) |
insilmaril@0 | 38 |
{ |
insilmaril@0 | 39 |
zPlane=i; |
insilmaril@0 | 40 |
} |
insilmaril@0 | 41 |
|
insilmaril@408 | 42 |
int FloatObj::zValue() |
insilmaril@0 | 43 |
{ |
insilmaril@0 | 44 |
return zPlane; |
insilmaril@0 | 45 |
} |
insilmaril@0 | 46 |
|
insilmaril@0 | 47 |
void FloatObj::move (double x, double y) |
insilmaril@0 | 48 |
{ |
insilmaril@0 | 49 |
MapObj::move(x,y); |
insilmaril@0 | 50 |
} |
insilmaril@0 | 51 |
|
insilmaril@408 | 52 |
void FloatObj::move (QPointF p) |
insilmaril@0 | 53 |
{ |
insilmaril@408 | 54 |
MapObj::move (p); |
insilmaril@0 | 55 |
} |
insilmaril@0 | 56 |
|
insilmaril@223 | 57 |
void FloatObj::setDockPos() |
insilmaril@223 | 58 |
{ |
insilmaril@223 | 59 |
parPos=absPos; |
insilmaril@236 | 60 |
childPos=absPos; |
insilmaril@223 | 61 |
} |
insilmaril@223 | 62 |
|
insilmaril@0 | 63 |
void FloatObj::reposition() |
insilmaril@0 | 64 |
{ |
insilmaril@395 | 65 |
move2RelPos (relPos); |
insilmaril@779 | 66 |
updateLinkGeometry(); |
insilmaril@0 | 67 |
} |
insilmaril@0 | 68 |
|
insilmaril@408 | 69 |
QRectF FloatObj::getTotalBBox() |
insilmaril@0 | 70 |
{ |
insilmaril@0 | 71 |
return bbox; |
insilmaril@0 | 72 |
} |
insilmaril@0 | 73 |
|
insilmaril@721 | 74 |
QRectF FloatObj::getBBoxSizeWithChildren() |
insilmaril@0 | 75 |
{ |
insilmaril@0 | 76 |
return bboxTotal; |
insilmaril@0 | 77 |
} |
insilmaril@0 | 78 |