warangps/WaranGpsWidget.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of warangps.
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 : 2009-06-27
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef WARANGPSWIDGET_H
00028 #define WARANGPSWIDGET_H
00029 
00030 #include <SciFigs.h>
00031 
00032 #include "ui_WaranGpsWidget.h"
00033 
00034 class GpsStation;
00035 
00036 class WaranGpsWidget : public QWidget, public Ui::WaranGpsWidget
00037 {
00038   Q_OBJECT
00039 public:
00040   WaranGpsWidget(QWidget * parent=0);
00041   ~WaranGpsWidget();
00042 
00043   enum Mode {NoGps, Gps};
00044 
00045   void setMode(Mode m);
00046   void setGpsStations(quint16 port=2974);
00047   void setCoordinates(QString fileName=QString::null, QString coordinateFormat=QString::null);
00048 private slots:
00049   void on_modeCombo_currentIndexChanged(int index);
00050   void on_gpsTrackBut_clicked();
00051   void on_gpsStackBut_clicked();
00052   void on_arrayCoordinateFactor_valueChanged(double d);
00053   void on_arrayLoadBut_clicked();
00054   void on_arraySaveBut_clicked();
00055   void on_relativePositionBut_clicked();
00056   void arrayChanged();
00057   void arrayMapChanged();
00058   void arrayTableChanged();
00059   void updateGps();
00060 private:
00061   static Point arrayCenter(const QList<NamedPoint>& array);
00062   void setMultipliedArray();
00063   virtual void closeEvent(QCloseEvent * e);
00064   void updateStatistics();
00065   void setArrayFromStatistics();
00066   void updateArrayResponse();
00067   void updateArrayTable();
00068   void updateDistanceMap();
00069   void updateArrayMap();
00070   void updateCoArrayMap();
00071 
00072   CircleViewer * _distanceMapErrors;
00073 
00074   QVector<RealStatisticalValue> _xStat;
00075   QVector<RealStatisticalValue> _yStat;
00076   QList<GpsStation *> _gpsStations;
00077   QList<NamedPoint> _arrayBase;
00078   QList<NamedPoint> _arrayMultiplied;
00079   QAction * _arrayEditAction;
00080   QTimer _gpsUpdate;
00081 };
00082 
00083 #endif // WARANGPSWIDGET_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines