floatobj.cpp
author insilmaril
Mon, 29 Jun 2009 10:27:42 +0000
changeset 777 8acac4fade1b
parent 776 25e634a7e1dc
child 779 1fb50e79661c
permissions -rw-r--r--
more fixes
     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 void FloatObj::init () 
    34 {
    35 	floatExport=true;
    36 	zPlane=Z_ICON;
    37 	setLinkStyle (LinkableMapObj::Parabel);
    38 	setHideLinkUnselected(false);
    39 	//FIXME-2 setHideLinkUnselected(true);
    40 }
    41 
    42 void FloatObj::copy (FloatObj* other)
    43 {
    44 	LinkableMapObj::copy (other);
    45 	setVisibility (other->visible);
    46 }
    47 
    48 void FloatObj::setZValue(const int &i)
    49 {
    50 	zPlane=i;
    51 }
    52 
    53 int FloatObj::zValue()
    54 {
    55 	return zPlane;
    56 }
    57 
    58 void FloatObj::setFloatExport(const bool& b)
    59 {
    60 	floatExport=b;
    61 }
    62 
    63 bool FloatObj::getFloatExport()
    64 {
    65 	return floatExport;
    66 }
    67 
    68 void FloatObj::move (double x, double y)
    69 {
    70 	MapObj::move(x,y);
    71 }
    72 
    73 void FloatObj::move (QPointF p)
    74 {
    75 	MapObj::move (p);
    76 }
    77 
    78 void FloatObj::setDockPos()
    79 {
    80 	parPos=absPos;
    81 	childPos=absPos;
    82 }
    83 
    84 void FloatObj::reposition()
    85 {
    86 	move2RelPos (relPos);
    87 	updateLink();	
    88 }
    89 
    90 QRectF FloatObj::getTotalBBox()
    91 {
    92 	return bbox;
    93 }
    94 
    95 QRectF FloatObj::getBBoxSizeWithChildren()
    96 {
    97 	return bboxTotal;
    98 }
    99