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