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