[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Sat Jan 6 00:59:44 CET 2007


On 5-Jan-07, at 5:37 PM, Andrew Walker wrote:

> SVN commit 620401 by arwalker:
>
> +void KstBorderedViewObject::setContentsRectForDevice(const  
> KstPainter& painter, QRect& rect) {
> +  const int mpb = (_margin + _padding + _borderWidth) *  
> painter.lineWidthAdjustmentFactor();
> +  _geom.setX(rect.left() - mpb);
> +  _geom.setY(rect.top() - mpb);
> +  _geom.setWidth(rect.width() + 2 * mpb);
> +  _geom.setHeight(rect.height() + 2 * mpb);
> +}

    That should take a const QRect&, but I'm kind of confused as to  
what it's supposed to do.  It says that it sets the size of the  
contents rect for a given device but takes in a mystery QRect.  This  
seems like a continuation of the resize for  print/restore after  
print hack.

> --- trunk/extragear/graphics/kst/src/libkstapp/kstviewlabel.h  
> #620400:620401
> @@ -102,6 +102,7 @@
>
>    public slots:
>      void adjustSizeForText(QRect w);
> +    QSize sizeForText(QRect w);
>      void reparse();

    Both of these should take const QRect& in fact.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/





More information about the Kst mailing list