File: floatobj.cpp

package info (click to toggle)
vym 1.8.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,000 kB
  • ctags: 1,599
  • sloc: cpp: 14,723; sh: 373; xml: 277; perl: 89; makefile: 16
file content (116 lines) | stat: -rw-r--r-- 1,845 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#include "floatobj.h"

extern QAction* actionEditToggleFloatExport;

/////////////////////////////////////////////////////////////////
// FloatObj
/////////////////////////////////////////////////////////////////

FloatObj::FloatObj ():OrnamentedObj() 
{
//    cout << "Const FloatObj ()\n";
    setParObj (this);	
    init();
    depth=-1;
}

FloatObj::FloatObj (QCanvas* c):OrnamentedObj(c)
{
//	cout << "Const FloatObj (c)  called from MapCenterObj (c)\n";
    setParObj (this);	
    init();
    depth=-1;
}

FloatObj::FloatObj (QCanvas* c, LinkableMapObj* p):OrnamentedObj (c)
{
//    cout << "Const FloatObj (c,p)\n";
    setParObj (p);	
    depth=p->getDepth()+1;
    init();
}

FloatObj::~FloatObj ()
{
//   cout << "Destr FloatObj\n";
}

void FloatObj::init () 
{
    setChildObj(this);
	floatExport=true;
	zPlane=Z_ICON;
	setLinkStyle (StyleParabel);
	setHideLinkUnselected(true);
}

void FloatObj::copy (FloatObj* other)
{
	LinkableMapObj::copy (other);
	setVisibility (other->visible);
}

void FloatObj::setZ(const int &i)
{
	zPlane=i;
}

int FloatObj::z()
{
	return zPlane;
}

void FloatObj::setFloatExport(const bool& b)
{
	floatExport=b;
}

bool FloatObj::getFloatExport()
{
	return floatExport;
}

void FloatObj::move (double x, double y)
{
	MapObj::move(x,y);
	selbox->move(x,y);
}

void FloatObj::move (QPoint p)
{
	move (p.x(), p.y());
}

void FloatObj::setDockPos()
{
	parPos=absPos;
	childPos=absPos;
}

void FloatObj::reposition()
{
	move (parObj->getChildPos().x()+relPos.x(), parObj->getChildPos().y()+relPos.y());
	updateLink();	
}

QRect FloatObj::getTotalBBox()
{
	return bbox;
}

QRect FloatObj::getBBoxSizeWithChilds()
{
	return bboxTotal;
}

void FloatObj::select()
{
    LinkableMapObj::select();
	LinkableMapObj::setLinkColor(parObj->getLinkColor());
}

void FloatObj::unselect()
{
	LinkableMapObj::unselect();
}