"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/scaleditem.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.

scaleditem.cpp  (kpl-4.1):scaleditem.cpp  (kpl-5.0)
// //
// C++ Implementation: scaleditem // C++ Implementation: scaleditem
// //
// Description: // Description:
// //
// //
// Author: Werner Stille <stille@uni-freiburg.de>, (C) 2015 // Author: Werner Stille <kpl@werner-stille.de>, (C) 2017
// //
// Copyright: See COPYING file that comes with this distribution // Copyright: See COPYING file that comes with this distribution
// //
// //
#include <QLineF> #include <QLineF>
#include <QPainter> #include <QPainter>
#include <QPolygonF> #include <QPolygonF>
#include <KConfigGroup> #include <KConfigGroup>
#include "frameitem.h" #include "frameitem.h"
#include "kplscene.h" #include "kplscene.h"
#include "scaleditem.h" #include "scaleditem.h"
ScaledItem::ScaledItem() : ScaledItem::ScaledItem() :
m_fillStyle(NoBrush), m_symbol(OpenCircle), m_color(0), m_normX(1), m_fillStyle(NoBrush), m_symbol(OpenCircle), m_color(0), m_normX(1),
m_normY(1), m_xOffset(0), m_yOffset(0) m_normY(1), m_xOffset(0), m_yOffset(0), myDashOffset(0)
{ {
setFlags(QGraphicsItem::ItemIsSelectable); setFlags(QGraphicsItem::ItemIsSelectable);
} }
ScaledItem::ScaledItem(const ScaledItem& a) : ScaledItem::ScaledItem(const ScaledItem& a) :
KplItem(a), QGraphicsItem(), m_fillStyle(a.m_fillStyle), m_symbol(a.m_symbol), KplItem(a), QGraphicsItem(), m_fillStyle(a.m_fillStyle), m_symbol(a.m_symbol),
m_color(a.m_color), m_normX(a.m_normX), m_normY(a.m_normY), m_color(a.m_color), m_normX(a.m_normX), m_normY(a.m_normY),
m_xOffset(a.m_xOffset), m_yOffset(a.m_yOffset), m_matrix(a.m_matrix) m_xOffset(a.m_xOffset), m_yOffset(a.m_yOffset), myDashOffset(a.myDashOffset),
m_matrix(a.m_matrix)
{ {
setZValue(a.zValue()); setZValue(a.zValue());
setFlags(QGraphicsItem::ItemIsSelectable); setFlags(QGraphicsItem::ItemIsSelectable);
setSelected(a.isSelected()); setSelected(a.isSelected());
setVisible(a.isVisible()); setVisible(a.isVisible());
} }
ScaledItem::ScaledItem(const KConfigGroup* plo, Symbol symbol, unsigned col, ScaledItem::ScaledItem(const KConfigGroup* plo, Symbol symbol, unsigned col,
QGraphicsItem* parent) : QGraphicsItem* parent) :
QGraphicsItem(parent) QGraphicsItem(parent), myDashOffset(0)
{ {
readPlo(plo, symbol, col); readPlo(plo, symbol, col);
} }
ScaledItem::ScaledItem(FillStyle fillStyle, Symbol symbol, unsigned col, ScaledItem::ScaledItem(FillStyle fillStyle, Symbol symbol, unsigned col,
double fx, double fy, double xOffset, double yOffset, double fx, double fy, double xOffset, double yOffset,
double relSize, QGraphicsItem* parent) : double relSize, QGraphicsItem* parent) :
KplItem(relSize), QGraphicsItem(parent), m_fillStyle(fillStyle), KplItem(relSize), QGraphicsItem(parent), m_fillStyle(fillStyle),
m_symbol(symbol), m_color(col), m_normX(fx), m_normY(fy), m_xOffset(xOffset), m_symbol(symbol), m_color(col), m_normX(fx), m_normY(fy), m_xOffset(xOffset),
m_yOffset(yOffset) m_yOffset(yOffset), myDashOffset(0)
{ {
setFlags(QGraphicsItem::ItemIsSelectable); setFlags(QGraphicsItem::ItemIsSelectable);
} }
ScaledItem::~ScaledItem() ScaledItem::~ScaledItem()
{ {
} }
void ScaledItem::exponent(double a, int& iExp, double& f) void ScaledItem::exponent(double a, int& iExp, double& f)
{ {
skipping to change at line 256 skipping to change at line 257
} }
} }
} }
} }
} }
void ScaledItem::setProperties() void ScaledItem::setProperties()
{ {
dydx = m_matrix.m22() / m_matrix.m11(); dydx = m_matrix.m22() / m_matrix.m11();
m_pen = createPen(this, m_color, DataPen, qMax(SolidLine, m_symbol)); m_pen = createPen(this, m_color, DataPen, qMax(SolidLine, m_symbol));
m_pen.setDashOffset(myDashOffset);
setSize(); setSize();
} }
 End of changes. 6 change blocks. 
5 lines changed or deleted 7 lines changed or added

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