MonoStation/StationLine.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of MonoStation.
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 : 2010-01-27
00021 **  Authors:
00022 **    Marc Wathelet (LGIT, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef STATIONLINE_H
00027 #define STATIONLINE_H
00028 
00029 #include <SciFigs.h>
00030 
00031 #include "MonoStationDLLExport.h"
00032 #include "StationResults.h"
00033 
00034 namespace MonoStation {
00035 
00036 class MONOSTATION_EXPORT StationLine : public AbstractNameLine
00037 {
00038 public:
00039   StationLine() {_station=0;}
00040   virtual AbstractLine * clone() const;
00041   void operator=(const StationLine& o);
00042 
00043   virtual const QString& xml_tagName() const {return NameLine::xmlNameLineTag;}
00044 
00045   virtual int count() const {return _station ? 1 : 0;}
00046   virtual Point point(int, const CurvePointOptions *) const {return _station->coordinates();}
00047   virtual QString name(int) const;
00048 
00049   virtual void clear() {}
00050   virtual void append() {}
00051   virtual void insert(int) {}
00052   virtual void removeLast() {}
00053   virtual void setX(int, double) {}
00054   virtual void setY(int, double, const CurvePointOptions *) {}
00055   virtual void setZ(int, double, const CurvePointOptions *) {}
00056   virtual void setName(int, QString) {}
00057 
00058   enum Label {StationName, PeakValue, NoLabel};
00059   enum PeakSelection {PeakNumber, PeakLowest, PeakHighest, PeakMaximum};
00060 
00061   void setStation(StationResults * station) {_station=station;}
00062   void setLabel(Label l) {_label=l;}
00063   void setLabelPrecision(int p) {_labelPrecision=p;}
00064   void setValue(PeakSelection ps, StationResults::PeakValue pv, int peakIndex);
00065   const RealValue& value() const {return _value;}
00066 protected:
00067   Label _label;
00068   int _labelPrecision;
00069   RealValue _value;
00070   StationResults * _station;
00071 };
00072 
00073 } // namespace MonoStation
00074 
00075 #endif // STATIONLINE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines