00001 /*************************************************************************** 00002 ** 00003 ** This file is part of QGpGuiWave. 00004 ** 00005 ** This file may be distributed and/or modified under the terms of the 00006 ** GNU General Public License version 2 or 3 as published by the Free 00007 ** Software Foundation and appearing in the file LICENSE.GPL included 00008 ** in the packaging of this file. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 ** more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 ** 00018 ** See http://www.geopsy.org for more information. 00019 ** 00020 ** Created : 2008-11-02 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (LGIT, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef REFRACTIONLINE_H 00028 #define REFRACTIONLINE_H 00029 00030 #include <QGpCoreWave.h> 00031 #include <SciFigs.h> 00032 00033 #include "QGpGuiWaveDLLExport.h" 00034 00035 namespace QGpGuiWave { 00036 00037 class QGPGUIWAVE_EXPORT RefractionLine : public AbstractLine 00038 { 00039 TRANSLATIONS("RefractionLine") 00040 public: 00041 void operator=(const RefractionLine& o); 00042 virtual AbstractLine * clone() const; 00043 00044 virtual const QString& xml_tagName() const {return xmlRefractionLineTag;} 00045 static const QString xmlRefractionLineTag; 00046 00047 virtual int count() const {return _curve.count();} 00048 virtual void clear() {_curve.clear();} 00049 virtual void append() {_curve.append(FactoryPoint());} 00050 virtual void insert(int index) {_curve.insert(index, FactoryPoint());} 00051 virtual void removeLast() {_curve.remove(_curve.count()-1);} 00052 virtual bool isValid(int index) const {return _curve[index].isValid();} 00053 virtual void setValid(int index, bool v) {_curve[index].setValid(v);} 00054 virtual Point point(int index, const CurvePointOptions *) const; 00055 virtual void setX(int index, double v) {_curve[index].setX(v);} 00056 virtual void setY(int index, double v, const CurvePointOptions *) {_curve[index].setMean(v);} 00057 virtual void setZ(int index, double v, const CurvePointOptions *) {_curve[index].setStddev(v);} 00058 00059 const RefractionCurve& curve() const {return _curve;} 00060 RefractionCurve& curve() {return _curve;} 00061 void setCurve(const RefractionCurve& curve) {_curve=curve;} 00062 protected: 00063 RefractionCurve _curve; 00064 }; 00065 00066 } // namespace QGpGuiWave 00067 00068 #endif // REFRACTIONLINE_H