[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Tue Nov 1 21:34:46 CET 2005
SVN commit 476695 by staikos:
enable-final seems to work now
M +3 -8 kstmatrix.cpp
M +3 -3 kstpsd.cpp
M +3 -0 kstpsd.h
M +9 -9 kstviewline.cpp
M +1 -0 kstviewobject.cpp
--- trunk/extragear/graphics/kst/kst/kstmatrix.cpp #476694:476695
@@ -232,9 +232,9 @@
_NS = _nX * _nY;
if (_zSize > 0) {
- double min;
- double max;
- double minpos;
+ double min = NAN;
+ double max = NAN;
+ double minpos = NAN;
double sum = 0.0, sumsquared = 0.0;
bool initialized = false;
@@ -265,11 +265,6 @@
}
}
}
- if (!initialized) { // no valid data in matrix
- min = NAN;
- max = NAN;
- minpos = NAN;
- }
_statScalars["sum"]->setValue(sum);
_statScalars["sumsquared"]->setValue(sumsquared);
_statScalars["max"]->setValue(max);
--- trunk/extragear/graphics/kst/kst/kstpsd.cpp #476694:476695
@@ -36,9 +36,9 @@
extern "C" void rdft(int n, int isgn, double *a);
-static const QString& INVECTOR = KGlobal::staticQString("I");
-static const QString& SVECTOR = KGlobal::staticQString("S");
-static const QString& FVECTOR = KGlobal::staticQString("F");
+const QString& KstPSD::INVECTOR = KGlobal::staticQString("I");
+const QString& KstPSD::SVECTOR = KGlobal::staticQString("S");
+const QString& KstPSD::FVECTOR = KGlobal::staticQString("F");
#define KSTPSDMAXLEN 27
KstPSD::KstPSD(const QString &in_tag, KstVectorPtr in_V,
--- trunk/extragear/graphics/kst/kst/kstpsd.h #476694:476695
@@ -110,6 +110,9 @@
QString _rUnits;
KstVectorMap::Iterator _sVector, _fVector;
+ static const QString& INVECTOR;
+ static const QString& SVECTOR;
+ static const QString& FVECTOR;
};
typedef KstSharedPtr<KstPSD> KstPSDPtr;
--- trunk/extragear/graphics/kst/kst/kstviewline.cpp #476694:476695
@@ -233,7 +233,7 @@
}
-inline bool pointsCloseEnough(const QPoint& point1, const QPoint& point2) {
+inline bool linePointsCloseEnough(const QPoint& point1, const QPoint& point2) {
const int dx = KST_RESIZE_BORDER_W/2;
return point1.x() <= point2.x() + dx &&
point1.x() >= point2.x() - dx &&
@@ -251,22 +251,22 @@
signed int direction = 0;
// FIXME: use a switch to avoid too many evaluations
if ((_orientation == UpLeft &&
- pointsCloseEnough(pos, geometry().topLeft())) ||
+ linePointsCloseEnough(pos, geometry().topLeft())) ||
(_orientation == DownRight &&
- pointsCloseEnough(pos, geometry().bottomRight())) ||
+ linePointsCloseEnough(pos, geometry().bottomRight())) ||
(_orientation == UpRight &&
- pointsCloseEnough(pos, geometry().topRight())) ||
+ linePointsCloseEnough(pos, geometry().topRight())) ||
(_orientation == DownLeft &&
- pointsCloseEnough(pos, geometry().bottomLeft()))) {
+ linePointsCloseEnough(pos, geometry().bottomLeft()))) {
direction = direction | ENDPOINT | DOWN;
} else if ((_orientation == UpLeft &&
- pointsCloseEnough(pos, geometry().bottomRight())) ||
+ linePointsCloseEnough(pos, geometry().bottomRight())) ||
(_orientation == DownRight &&
- pointsCloseEnough(pos, geometry().topLeft())) ||
+ linePointsCloseEnough(pos, geometry().topLeft())) ||
(_orientation == UpRight &&
- pointsCloseEnough(pos, geometry().bottomLeft())) ||
+ linePointsCloseEnough(pos, geometry().bottomLeft())) ||
(_orientation == DownLeft &&
- pointsCloseEnough(pos, geometry().topRight()))) {
+ linePointsCloseEnough(pos, geometry().topRight()))) {
direction = direction | ENDPOINT | UP;
}
return direction;
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #476694:476695
@@ -1530,6 +1530,7 @@
return QMap<QString, QVariant>();
}
+
inline bool pointsCloseEnough(const QPoint& point1, const QPoint& point2) {
const int dx = KST_RESIZE_BORDER_W/2;
return point1.x() <= point2.x() + dx &&
More information about the Kst
mailing list