waran/WaranWidget.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of waran.
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-03-20
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef WARANWIDGET_H
00028 #define WARANWIDGET_H
00029 
00030 #include <QGpGuiTools.h>
00031 #include <ArrayCore.h>
00032 
00033 #include "ui_WaranWidget.h"
00034 
00035 class RealTimeArrayManager;
00036 
00037 class WaranWidget : public QWidget, public Ui::WaranWidget
00038 {
00039   Q_OBJECT
00040 public:
00041   WaranWidget(QWidget * parent=0);
00042   ~WaranWidget();
00043 
00044   void setFrequencyBandWidth(double fbw) {_frequencyBandWidth=fbw;}
00045 protected:
00046   void closeEvent(QCloseEvent * e);
00047 private slots:
00048   void setStations();
00049   void setHVWindowLength();
00050   void setArrayWindowLength();
00051   void setSamplingParameters();
00052   void setKmin(double k);
00053   void setKmax(double k);
00054   void updateDataProcess();
00055   void updateDataDisplay();
00056   void dataChanged(Signal * sig, TimeRange tr);
00057   void on_loadCoordinateButton_clicked();
00058   void on_saveCoordinateButton_clicked();
00059   void on_relativePositionButton_clicked();
00060   void startArrayProcess();
00061   void stopArrayProcess();
00062   void startHVProcess();
00063   void stopHVProcess();
00064 private:
00065   void add(Signal * sig);
00066   void lockSubPool();
00067   void unlockSubPool();
00068   bool setCoordinates(const ColumnTextParser * parser);
00069   void updateArrayMap();
00070   void updateCoArrayMap();
00071   void updateArrayResponse();
00072   void updateArrayTable();
00073   bool arrayParameterChanged();
00074   bool hvParameterChanged();
00075   void initResultGraph(AxisWindow * g, IrregularGrid2DPlot *& gridLayer,
00076                         DispersionLimitLayer *& dispLimits);
00077 
00078   QList<Station *> _stations;
00079   QString _processingUnitAddress;
00080 
00081   QSet<QString> _stationNames;
00082   QMap<QString, Point> _stationCoordinates;
00083   ArrayStations _array;
00084   SubSignalPool _signals;
00085   double _frequencyBandWidth;
00086   RealTimeArrayManager * _arrayProcess;
00087   //RealTimeHVManager * _hvProcess;
00088 
00089   QTimer _displayUpdateTimer, _processUpdateTimer;
00090   double _maximumTime;
00091 
00092   IrregularGrid2DPlot * _fkGridLayer, * _hrfkGridLayer, * _spacGridLayer;
00093   DispersionLimitLayer * _fkDispLimits, * _hrfkDispLimits, * _spacDispLimits;
00094 };
00095 
00096 #endif // WARANWIDGET_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines