"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/scalebaritem.cpp" between
kpl-4.1.tar.gz and kpl-5.0.tar.gz

About: Kpl is a KDE program for two- and three-dimensional graphical presentation (plots) of data sets and functions. Multidimensional nonlinear parameter and general linear least square parameter fits can be performed.

scalebaritem.cpp  (kpl-4.1):scalebaritem.cpp  (kpl-5.0)
/*************************************************************************** /***************************************************************************
scalebaritem.cpp - description scalebaritem.cpp - description
------------------- -------------------
begin : Don Jun 12 2003 begin : Don Jun 12 2003
copyright : (C) 2015 by Werner Stille copyright : (C) 2017 by Werner Stille
email : stille@uni-freiburg.de email : kpl@werner-stille.de
***************************************************************************/ ***************************************************************************/
/*************************************************************************** /***************************************************************************
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
***************************************************************************/ ***************************************************************************/
skipping to change at line 72 skipping to change at line 72
ScaleBarItem::~ScaleBarItem() ScaleBarItem::~ScaleBarItem()
{ {
} }
QRectF ScaleBarItem::boundingRect() const QRectF ScaleBarItem::boundingRect() const
{ {
double pw = m_pen.widthF(); double pw = m_pen.widthF();
double w = l2 + pw; double w = l2 + pw;
double h = 0.01 * wRel + pw; double h = 0.01 * wRel + pw;
double d = -0.5 * pw; double d = -0.5 * pw;
return textRect().unite(m_vertical ? return textRect().united(m_vertical ?
QRectF(-0.5 * h, -d, h, -w) : QRectF(-0.5 * h, -d, h, -w) :
QRectF(d, -0.5 * h, w, h)); QRectF(d, -0.5 * h, w, h));
} }
void ScaleBarItem::paint(QPainter* painter, const QStyleOptionGraphicsItem*, void ScaleBarItem::paint(QPainter* painter, const QStyleOptionGraphicsItem*,
QWidget*) QWidget*)
{ {
if (isSelected()) { if (isSelected()) {
painter->setPen(QPen(Qt::DashLine)); painter->setPen(QPen(Qt::DashLine));
painter->drawRect(boundingRect()); painter->drawRect(boundingRect());
} }
painter->setPen(m_pen); painter->setPen(m_pen);
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS