File indexing completed on 2024-12-22 04:17:52
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2004 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 0014 #include "curvehint.h" 0015 #include "datacollection.h" 0016 #include "relation.h" 0017 #include "curve.h" 0018 0019 #include <qdebug.h> 0020 0021 namespace Kst { 0022 0023 CurveHint::CurveHint(const QString& name, const QString& x, const QString& y) 0024 : Shared(), _curveName(name), _xVectorName(x), _yVectorName(y) { 0025 } 0026 0027 0028 CurveHint::~CurveHint() { 0029 } 0030 0031 0032 const QString& CurveHint::xVectorName() const { 0033 return _xVectorName; 0034 } 0035 0036 0037 const QString& CurveHint::yVectorName() const { 0038 return _yVectorName; 0039 } 0040 0041 0042 #if 0 0043 VectorPtr CurveHint::xVector() const { 0044 return *vectorList.findTag(_xVectorName); 0045 } 0046 0047 0048 VectorPtr CurveHint::yVector() const { 0049 return *vectorList.findTag(_yVectorName); 0050 } 0051 0052 0053 RelationPtr CurveHint::makeCurve(const QString& tag, const QColor& color) const { 0054 VectorPtr x = xVector(); 0055 VectorPtr y = yVector(); 0056 if (!x || !y) { 0057 qDebug() << "Couldn't find either " << _xVectorName << " or " << _yVectorName << endl; 0058 return 0L; 0059 } 0060 0061 return new Curve(tag, x, y, 0L, 0L, 0L, 0L, color); 0062 } 0063 #endif 0064 0065 } 0066 0067 // vim: ts=2 sw=2 et