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