floatobj.cpp
author insilmaril
Mon, 15 Mar 2010 11:49:42 +0000
changeset 835 31841b366d5e
parent 823 0bba81dde1bc
permissions -rw-r--r--
Fixes for autoLayout (later)
     1 #include "floatobj.h"
     2 #include "mapitem.h"
     3 
     4 /////////////////////////////////////////////////////////////////
     5 // FloatObj
     6 /////////////////////////////////////////////////////////////////
     7 
     8 FloatObj::FloatObj (QGraphicsScene* s, TreeItem *ti):OrnamentedObj(s,ti)
     9 {
    10 	//cout << "Const FloatObj s="<<s<<"  ti="<<ti<<"  treeItem="<<treeItem<<endl;
    11     setParObj (this);	
    12     init();
    13 }
    14 
    15 FloatObj::~FloatObj ()
    16 {
    17 //   cout << "Destr FloatObj\n";
    18 }
    19 
    20 void FloatObj::init () 
    21 {
    22 	zPlane=Z_ICON;
    23 	setLinkStyle (LinkableMapObj::Parabel);
    24 	((MapItem*)treeItem)->setHideLinkUnselected(true);
    25 }
    26 
    27 void FloatObj::copy (FloatObj* other)
    28 {
    29 	LinkableMapObj::copy (other);
    30 	setVisibility (other->visible);
    31 }
    32 
    33 void FloatObj::setZValue(const int &i)
    34 {
    35 	zPlane=i;
    36 }
    37 
    38 int FloatObj::zValue()
    39 {
    40 	return zPlane;
    41 }
    42 
    43 void FloatObj::move (double x, double y)
    44 {
    45 	MapObj::move(x,y);
    46 }
    47 
    48 void FloatObj::move (QPointF p)
    49 {
    50 	MapObj::move (p);
    51 }
    52 
    53 void FloatObj::setDockPos()
    54 {
    55 	parPos=absPos;
    56 	childPos=absPos;
    57 }
    58 
    59 void FloatObj::reposition()
    60 {
    61 	move2RelPos (relPos);
    62 	updateLinkGeometry();	
    63 }
    64 
    65 QRectF FloatObj::getBBoxSizeWithChildren()
    66 {
    67 	return bboxTotal;
    68 }
    69