floatobj.cpp
author insilmaril
Wed, 25 Nov 2009 15:27:22 +0000
changeset 808 b163492fda17
parent 798 d251c7b2de54
child 823 0bba81dde1bc
permissions -rw-r--r--
First version of new FindWidget instead of extra floating dialog
     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