remove unneeded boundingRect methods

This commit is contained in:
WandererFan 2016-07-22 09:49:31 -04:00 committed by wmayer
parent 48bd90004f
commit 222492c912
10 changed files with 5 additions and 24 deletions

View File

@ -373,6 +373,10 @@ QRectF QGIView::customChildrenBoundingRect() {
return result;
}
QRectF QGIView::boundingRect() const
{
return m_border->rect().adjusted(-2.,-2.,2.,2.); //allow for border line width //TODO: fiddle brect if border off?
}
QColor QGIView::getNormalColor()
{
Base::Reference<ParameterGrp> hGrp = getParmGroupCol();

View File

@ -74,6 +74,7 @@ public:
virtual void toggleCache(bool state);
virtual void updateView(bool update = false);
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
virtual QRectF boundingRect() const override;
//virtual QPainterPath shape(void) const;
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);

View File

@ -163,8 +163,3 @@ void QGIViewAnnotation::drawAnnotation()
m_textItem->setPos(0.,0.);
}
QRectF QGIViewAnnotation::boundingRect() const
{
return childrenBoundingRect();
}

View File

@ -50,7 +50,6 @@ public:
void setViewAnnoFeature(TechDraw::DrawViewAnnotation *obj);
virtual void draw() override;
virtual QRectF boundingRect() const override;
protected:
void drawAnnotation();

View File

@ -187,8 +187,3 @@ QGIView* QGIViewClip::getQGIVByName(std::string name) //should probably be meth
}
return 0;
}
QRectF QGIViewClip::boundingRect() const
{
return childrenBoundingRect();
}

View File

@ -46,7 +46,6 @@ public:
virtual void updateView(bool update = false) override;
virtual void draw() override;
virtual QRectF boundingRect() const override;
protected:
void drawClip();

View File

@ -575,12 +575,6 @@ TechDraw::DrawHatch* QGIViewPart::faceIsHatched(int i,std::vector<TechDraw::Draw
return result;
}
QRectF QGIViewPart::boundingRect() const
{
//return childrenBoundingRect().adjusted(-2.,-2.,2.,6.); //just a bit bigger than the children need
return childrenBoundingRect();
}
void QGIViewPart::dumpPath(const char* text,QPainterPath path)
{
QPainterPath::Element elem;

View File

@ -58,7 +58,6 @@ public:
void tidy();
virtual void draw() override;
virtual QRectF boundingRect() const override;
protected:
/// Helper for pathArc()

View File

@ -139,7 +139,3 @@ void QGIViewSymbol::symbolToSvg(QString qs)
m_svgItem->setPos(0.,0.);
}
QRectF QGIViewSymbol::boundingRect() const
{
return childrenBoundingRect();
}

View File

@ -54,7 +54,6 @@ public:
void setViewSymbolFeature(TechDraw::DrawViewSymbol *obj);
virtual void draw() override;
virtual QRectF boundingRect() const override;
protected:
virtual void drawSvg();