gpfksimulator/SourceParameters.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  Copyright (C) 2002-2009 Marc Wathelet. All rights reserved.
00004 **
00005 **  This file is part of build_array.
00006 **
00007 **  This file may be distributed and/or modified under the terms of the
00008 **  GNU General Public License version 2 or 3 as published by the Free
00009 **  Software Foundation and appearing in the file LICENSE.GPL included
00010 **  in the packaging of this file.
00011 **
00012 **  This file is distributed in the hope that it will be useful, but WITHOUT
00013 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00015 **  more details.
00016 **
00017 **  See http://www.geopsy.org for more information.
00018 **
00019 **  Created: 2007-11-13
00020 **  Authors:
00021 **    Marc Wathelet (LGIT, Grenoble, France)
00022 **
00023 ***************************************************************************/
00024 
00025 #ifndef SOURCEPARAMETERS_H
00026 #define SOURCEPARAMETERS_H
00027 
00028 #include <QGpGuiTools.h>
00029 
00030 class Simulator;
00031 
00032 class SourceParameters
00033 {
00034   TRANSLATIONS("SourceParameters");
00035 public:
00036   SourceParameters();
00037   ~SourceParameters() {}
00038 
00039   enum Type {PlaneWaves, CircularWaves};
00040 
00041   Type type() const {return _type;}
00042   void setType(Type t) {_type=t;}
00043 
00044   const QString& name() const {return _name;}
00045   void setName(const QString& n) {_name=n;}
00046 
00047   const Point2D& sourcePoint() const {return _sourcePoint;}
00048   void setSourcePoint(const Point& s) {_sourcePoint=s;}
00049   void setSourceX(double x) {_sourcePoint.setX(x);}
00050   void setSourceY(double y) {_sourcePoint.setY(y);}
00051 
00052   double azimuth() const;
00053   double azimuthMath() const;
00054   void setAzimuth(double a);
00055 
00056   double distance() const;
00057   void setDistance(double d);
00058 
00059   double amplitude() const {return _amplitude;}
00060   void setAmplitude(double a) {_amplitude=a;}
00061 
00062   double phase() const {return _phase;}
00063   void setPhase(double p) {_phase=p;}
00064 
00065   double velocity() const {return _velocity;}
00066   void setVelocity(double v) {_velocity=v;}
00067 
00068   const QColor& color() const {return _color;}
00069   void setColor(const QColor& c) {_color=c;}
00070 private:
00071   Type _type;
00072   QString _name;
00073   Point2D _sourcePoint;
00074   double _azimuth;
00075   double _amplitude;
00076   double _phase;
00077   double _velocity;
00078   QColor _color;
00079 };
00080 
00081 #endif // SOURCEPARAMETERS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines