[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Dec 20 06:49:37 CET 2005


On Thursday 01 December 2005 17:06, Andrew Walker wrote:
> SVN commit 484776 by arwalker:
>
> BUG:115970 Restore data mode for images. This provides the nearest data
> point for both the nearest curve and the topmost image.
>
>  M  +120 -83   kst2dplot.cpp
>  M  +2 -1      kst2dplot.h

Please, anyone working on Kst, do not add methods like these.  It's already 
listed as something that should not be done in the coding guidelines.  It's 
very error prone and makes the code hard to read.  I'm not going to change 
these at this point in the 1.2.0 release cycle, but there should be no more 
methods in Kst that pass their return codes via reference parameters.  After 
1.2.0, these should all be removed from Kst2DPlot, perhaps as part of the 
refactoring.

--- kst2dplot.h (revision 484775)
+++ kst2dplot.h (revision 484776)
@@ -407,7 +407,8 @@
   void drawCursorPos(QWidget *view);
   void drawCursorPos(QPainter& p);
   void updateMousePos(const QPoint& pos);
-  bool getNearestDataPoint(const QPoint& pos, double& newxpos, double& 
newypos, QString& name, double& xmin, double &xmax, double& ymin, double& 
ymax);
+  void getCursorPos(const QPoint& pos, double &xpos, double &ypos, double 
&xmin, double &xmax, double &ymin, double& ymax);
+  bool getNearestDataPoint(const QPoint& pos, QString& name, double &newxpos, 
double &newypos, double xpos, double ypos, double xmin, double xmax);
   void highlightNearestDataPoint(bool repaint, QWidget *view, const QPoint& 
pos);
   void updateTieBox(QPainter&);
   bool legendUnder(QMouseEvent *e);

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


More information about the Kst mailing list