linkablemapobj.cpp
changeset 449 5378ed53ec92
parent 427 fb74fa7bfb4c
child 473 8b9cfc26638c
     1.1 --- a/linkablemapobj.cpp	Mon Feb 12 09:28:47 2007 +0000
     1.2 +++ b/linkablemapobj.cpp	Tue Apr 10 13:22:55 2007 +0000
     1.3 @@ -28,8 +28,6 @@
     1.4  LinkableMapObj::~LinkableMapObj()
     1.5  {
     1.6      delete (bottomline);
     1.7 -    delete (selbox);
     1.8 -	delete (frame);
     1.9  	delLink();
    1.10  }
    1.11  
    1.12 @@ -81,18 +79,12 @@
    1.13      bottomline->show();
    1.14  
    1.15      // Prepare showing the selection of a MapObj
    1.16 -    selbox = scene->addRect(QRectF(0,0,0,0), QPen(QColor(255,255,0) ), QColor(255,255,0));
    1.17 -    selbox->setZValue(Z_SELBOX);
    1.18 -    selbox->hide();
    1.19      selected=false;
    1.20  
    1.21  	hideLinkUnselected=false;
    1.22  
    1.23  	topPad=botPad=leftPad=rightPad=0;
    1.24  
    1.25 -	// initialize frame
    1.26 -	frame = new FrameObj (scene);
    1.27 -	
    1.28  	repositionRequest=false;
    1.29  
    1.30  	// Rel Positions
    1.31 @@ -347,27 +339,6 @@
    1.32  	return linkcolor;
    1.33  }
    1.34  
    1.35 -FrameType LinkableMapObj::getFrameType()
    1.36 -{
    1.37 -	return frame->getFrameType();
    1.38 -}
    1.39 -
    1.40 -void LinkableMapObj::setFrameType(const FrameType &t)
    1.41 -{
    1.42 -	frame->setFrameType(t);
    1.43 -	calcBBoxSize();
    1.44 -	positionBBox();
    1.45 -	requestReposition();
    1.46 -}
    1.47 -
    1.48 -void LinkableMapObj::setFrameType(const QString &t)
    1.49 -{
    1.50 -	frame->setFrameType(t);
    1.51 -	calcBBoxSize();
    1.52 -	positionBBox();
    1.53 -	requestReposition();
    1.54 -}
    1.55 -
    1.56  void LinkableMapObj::setVisibility (bool v)
    1.57  {
    1.58  	MapObj::setVisibility (v);
    1.59 @@ -465,16 +436,12 @@
    1.60  	// have parents yet...
    1.61  	if (style==StyleUndef) return;	
    1.62  
    1.63 -	if (frame->getFrameType() == NoFrame)
    1.64 -		linkpos=LinkBottom;
    1.65 -	else	
    1.66 -		linkpos=LinkMiddle;
    1.67  	switch (linkpos)
    1.68  	{
    1.69  		case LinkMiddle:
    1.70 -			bottomlineY=bbox.top()+bbox.height() /2;	// draw link to middle (of frame)
    1.71 +			bottomlineY=bbox.top() + bbox.height()/2;	// draw link to middle (of frame)
    1.72  			break;
    1.73 -		default :
    1.74 +		case LinkBottom:
    1.75  			bottomlineY=bbox.bottom()-1;	// draw link to bottom of box
    1.76  			break;
    1.77  	}
    1.78 @@ -687,17 +654,9 @@
    1.79  }
    1.80  
    1.81  
    1.82 -void LinkableMapObj::setSelBox()
    1.83 -{
    1.84 -	//selbox->prepareGeometryChange();
    1.85 -	selbox->setRect (clickBox);
    1.86 -}
    1.87 -
    1.88  void LinkableMapObj::select()
    1.89  {
    1.90 -	setSelBox();
    1.91      selected=true;
    1.92 -    selbox->show();
    1.93  	setVisibility (visible);
    1.94  }
    1.95  
    1.96 @@ -705,7 +664,6 @@
    1.97  void LinkableMapObj::unselect()
    1.98  {
    1.99      selected=false;
   1.100 -    selbox->hide();
   1.101  	// Maybe we have to hide the link:
   1.102  	setVisibility (visible);
   1.103  }