Index: trunk/GnssCenter/map_stations/map_stations.cpp
===================================================================
--- trunk/GnssCenter/map_stations/map_stations.cpp	(revision 5404)
+++ trunk/GnssCenter/map_stations/map_stations.cpp	(revision 5404)
@@ -0,0 +1,241 @@
+
+/* -------------------------------------------------------------------------
+ * RTNet GUI
+ * -------------------------------------------------------------------------
+ *
+ * Class:      t_svgMap
+ *
+ * Purpose:    Plot map of stations/satellites
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    05-Jan-2013
+ *
+ * Changes:
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <QtSvg>
+
+#include <qwt_symbol.h>
+#include <qwt_plot.h>
+#include <qwt_plot_svgitem.h>
+#include <qwt_plot_curve.h>
+#include <qwt_plot_marker.h>
+#include <qwt_plot_canvas.h>
+#include <qwt_plot_zoomer.h>
+#include <qwt_plot_renderer.h>
+
+#include "svgmap.h"
+
+using namespace std;
+using namespace GnssCenter;
+
+Q_EXPORT_PLUGIN2(gnsscenter_svgmap, GnssCenter::t_svgMapFactory)
+
+// Constructor
+/////////////////////////////////////////////////////////////////////////////
+t_svgMap::t_svgMap() : QDialog() {
+
+  // Map in Scalable Vector Graphics (svg) Format
+  // --------------------------------------------
+  _mapPlot = new QwtPlot();
+
+  _mapPlot->setAxisScale(QwtPlot::xBottom, -180.0, 180.0);
+  _mapPlot->setAxisScale(QwtPlot::yLeft,    -90.0,  90.0);
+
+  _mapPlotZoomer = new QwtPlotZoomer(_mapPlot->canvas());
+
+  _mapPlot->canvas()->setFocusPolicy(Qt::WheelFocus);
+
+  QwtPlotSvgItem* mapItem = new QwtPlotSvgItem();
+  mapItem->loadFile(QRectF(-180.0, -90.0, 360.0, 180.0), ":world.svg");
+  mapItem->attach(_mapPlot);
+
+  // Buttons
+  // -------
+  int ww = QFontMetrics(font()).width('w');
+
+  _buttonClose = new QPushButton(tr("Close"), this);
+  _buttonClose->setMaximumWidth(10*ww);
+  connect(_buttonClose, SIGNAL(clicked()), this, SLOT(slotClose()));
+
+  _buttonPrint = new QPushButton(tr("Print"), this);
+  _buttonPrint->setMaximumWidth(10*ww);
+  connect(_buttonPrint, SIGNAL(clicked()), this, SLOT(slotPrint()));
+
+  _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
+  _buttonWhatsThis->setMaximumWidth(10*ww);
+  connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
+
+  // Layout
+  // ------
+  QHBoxLayout* buttonLayout = new QHBoxLayout;
+  buttonLayout->addWidget(_buttonClose);
+  buttonLayout->addWidget(_buttonPrint);
+  buttonLayout->addWidget(_buttonWhatsThis);
+
+  QVBoxLayout* mainLayout = new QVBoxLayout(this);
+  mainLayout->addWidget(_mapPlot);
+  mainLayout->addLayout(buttonLayout);
+
+  // WhatsThis
+  // ---------
+  _buttonClose->setWhatsThis(tr("<p>Close window.</p>"));
+  _buttonPrint->setWhatsThis(tr("<p>Print stream distribution map.</p>"));
+
+  // Minimal and Maximal Coordinates
+  // -------------------------------
+  _minPointLat = 0.0;
+  _maxPointLat = 0.0;
+  _minPointLon = 0.0;
+  _maxPointLon = 0.0;
+
+  // Important
+  // ---------
+  _mapPlot->replot();
+}
+
+// Destructor
+/////////////////////////////////////////////////////////////////////////////
+t_svgMap::~t_svgMap() { 
+  delete _mapPlot;
+  delete _buttonWhatsThis;
+}
+
+// 
+/////////////////////////////////////////////////////////////////////////////
+void t_svgMap::slotNewPoint(const QString& name, double latDeg, double lonDeg) {
+
+  if (lonDeg > 180.0) lonDeg -= 360.0;
+
+  QColor red(220,20,60);
+  QwtSymbol* symbol = new QwtSymbol(QwtSymbol::Rect, QBrush(red), 
+                                    QPen(red), QSize(2,2));
+  QwtPlotMarker* marker = new QwtPlotMarker();
+  marker->setValue(lonDeg, latDeg);
+  if (lonDeg > 170.0) {
+    marker->setLabelAlignment(Qt::AlignLeft);
+  }
+  else {
+    marker->setLabelAlignment(Qt::AlignRight);
+  }
+  QwtText text(name.left(4));
+  QFont   font = text.font();
+  font.setPointSize(font.pointSize()*0.8);
+  text.setFont(font);
+  marker->setLabel(text);
+  marker->setSymbol(symbol);
+  marker->attach(_mapPlot);
+
+  // Remeber minimal and maximal coordinates
+  // ---------------------------------------
+  if (_minPointLat == 0.0 && _maxPointLat == 0.0 &&
+      _minPointLon == 0.0 && _maxPointLon == 0.0) {
+    _minPointLat = latDeg;
+    _maxPointLat = latDeg;
+    _minPointLon = lonDeg;
+    _maxPointLon = lonDeg;
+  }
+  else {
+    if      (_maxPointLat < latDeg) {
+      _maxPointLat = latDeg;
+    }
+    else if (_minPointLat > latDeg) {
+      _minPointLat = latDeg;
+    }
+    if      (_maxPointLon < lonDeg) {
+      _maxPointLon = lonDeg;
+    }
+    else if (_minPointLon > lonDeg) {
+      _minPointLon = lonDeg;
+    }
+  }
+}
+
+// Close
+////////////////////////////////////////////////////////////////////////////
+void t_svgMap::slotClose() {
+  done(0);
+}
+
+// Close Dialog gracefully
+////////////////////////////////////////////////////////////////////////////
+void t_svgMap::closeEvent(QCloseEvent* event) {
+  QDialog::closeEvent(event);
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void t_svgMap::showEvent(QShowEvent* event) {
+  double width  = _maxPointLon - _minPointLon;
+  double height = _maxPointLat - _minPointLat;
+  if (width > 0 && height > 0) {
+
+    // Extend plot area by 10 percent
+    // ------------------------------
+    double eps = 0.1;
+    double epsLon    = eps * (_maxPointLon - _minPointLon);
+    double epsLat    = eps * (_maxPointLat - _minPointLat);
+    double widthExt  = width  + 2 * epsLon;
+    double heightExt = height + 2 * epsLat;
+    double minLon    = _minPointLon - epsLon;
+    double minLat    = _minPointLat - epsLat;
+
+    // Keep lat/lon relations
+    // ----------------------
+    double widthBorder = widthExt;
+    double heightBorder = heightExt;
+    double scale = widthExt/heightExt/2.;
+    if ( scale < 1.) {
+      widthBorder = widthExt / scale;
+      minLon = minLon - (widthBorder - widthExt)/2.;
+    }
+    else {
+      heightBorder = heightExt * scale;
+      minLat = minLat - (heightBorder - heightExt)/2.;
+    }
+
+    // Borders shall not exceed min or max values
+    // ------------------------------------------
+    if (minLon < -180.) minLon = -180.;
+    if (minLat <  -90.) minLat =  -90.;
+    double maxLat = minLat + heightBorder;
+    if ( maxLat >  90) minLat = minLat - (maxLat -  90.);
+    double maxLon = minLon + widthBorder;
+    if ( maxLon > 180) minLon = minLon - (maxLon - 180.);
+
+    // Area large enough to justify world map
+    // --------------------------------------
+    if (widthBorder < 270.0 && heightBorder < 135.0) {
+      QRectF rect(minLon, minLat, widthBorder, heightBorder);
+      _mapPlotZoomer->zoom(rect);
+    }
+  }
+  QDialog::showEvent(event);
+}
+
+// Print the widget
+////////////////////////////////////////////////////////////////////////////
+void t_svgMap::slotPrint() {
+
+  QPrinter printer;
+  QPrintDialog* dialog = new QPrintDialog(&printer, this);
+  dialog->setWindowTitle(tr("Print Map"));
+  if (dialog->exec() != QDialog::Accepted) {
+    return;
+  }
+  else {
+    QwtPlotRenderer renderer;
+    renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, false);
+    renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, true);
+    renderer.renderTo(_mapPlot, printer);
+  }
+}
+
+// Whats This Help
+////////////////////////////////////////////////////////////////////////////
+void t_svgMap::slotWhatsThis() {
+  QWhatsThis::enterWhatsThisMode();
+}
+
Index: trunk/GnssCenter/map_stations/map_stations.h
===================================================================
--- trunk/GnssCenter/map_stations/map_stations.h	(revision 5404)
+++ trunk/GnssCenter/map_stations/map_stations.h	(revision 5404)
@@ -0,0 +1,54 @@
+#ifndef GnssCenter_SVGMAP_H
+#define GnssCenter_SVGMAP_H
+
+#include <QtGui>
+#include <QWhatsThis>
+#include "plugininterface.h"
+
+class QwtPlot;
+class QwtPlotZoomer;
+
+namespace GnssCenter {
+
+class t_svgMap : public QDialog {
+ Q_OBJECT
+ public:
+  t_svgMap();
+  ~t_svgMap();
+
+ public slots:
+  void slotNewPoint(const QString& name, double latDeg, double lonDeg);
+
+ private slots:
+  void slotClose();
+  void slotPrint();
+  void slotWhatsThis();
+
+ protected:
+  virtual void closeEvent(QCloseEvent *);
+  virtual void showEvent(QShowEvent *);
+
+ private:
+  QwtPlot*       _mapPlot;
+  QwtPlotZoomer* _mapPlotZoomer;
+  QPushButton*   _buttonClose;
+  QPushButton*   _buttonPrint;
+  QPushButton*   _buttonWhatsThis;
+  double         _minPointLat;
+  double         _maxPointLat;
+  double         _minPointLon;
+  double         _maxPointLon;
+
+};
+
+class t_svgMapFactory : public QObject, public t_pluginFactoryInterface {
+ Q_OBJECT
+ Q_INTERFACES(GnssCenter::t_pluginFactoryInterface)
+ public:
+  virtual QWidget* create() {return new t_svgMap();} 
+  virtual QString getName() const {return QString("Map");}
+};
+
+} // namespace GnssCenter
+
+#endif
Index: trunk/GnssCenter/map_stations/map_stations.pro
===================================================================
--- trunk/GnssCenter/map_stations/map_stations.pro	(revision 5404)
+++ trunk/GnssCenter/map_stations/map_stations.pro	(revision 5404)
@@ -0,0 +1,25 @@
+
+TEMPLATE             = lib
+CONFIG              += plugin debug
+TARGET               = $$qtLibraryTarget(gnsscenter_svgmap)
+QT                  += svg
+INCLUDEPATH         += ../qwt ../main
+DESTDIR              = ../plugins
+LIBS                 = -L../qwt -lqwt
+
+debug:OBJECTS_DIR   = .obj/debug
+debug:MOC_DIR       = .moc/debug
+release:OBJECTS_DIR = .obj/release
+release:MOC_DIR     = .moc/release
+
+thrift.target   = gen-cpp
+thrift.commands = "thrift -r -gen cpp rtnet.thrift"
+thrift.depends  = rtnet.thrift rtnet_data.thrift
+QMAKE_EXTRA_TARGETS += thrift
+PRE_TARGETDEPS      += gen-cpp
+
+HEADERS   = svgmap.h
+
+SOURCES   = svgmap.cpp
+
+RESOURCES = svgmap.qrc
Index: trunk/GnssCenter/map_stations/map_stations.qrc
===================================================================
--- trunk/GnssCenter/map_stations/map_stations.qrc	(revision 5404)
+++ trunk/GnssCenter/map_stations/map_stations.qrc	(revision 5404)
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file>world.svg</file>
+</qresource>
+</RCC>
Index: trunk/GnssCenter/map_stations/svgmap.cpp
===================================================================
--- trunk/GnssCenter/map_stations/svgmap.cpp	(revision 5403)
+++ 	(revision )
@@ -1,241 +1,0 @@
-
-/* -------------------------------------------------------------------------
- * RTNet GUI
- * -------------------------------------------------------------------------
- *
- * Class:      t_svgMap
- *
- * Purpose:    Plot map of stations/satellites
- *
- * Author:     L. Mervart
- *
- * Created:    05-Jan-2013
- *
- * Changes:
- *
- * -----------------------------------------------------------------------*/
-
-#include <QtSvg>
-
-#include <qwt_symbol.h>
-#include <qwt_plot.h>
-#include <qwt_plot_svgitem.h>
-#include <qwt_plot_curve.h>
-#include <qwt_plot_marker.h>
-#include <qwt_plot_canvas.h>
-#include <qwt_plot_zoomer.h>
-#include <qwt_plot_renderer.h>
-
-#include "svgmap.h"
-
-using namespace std;
-using namespace GnssCenter;
-
-Q_EXPORT_PLUGIN2(gnsscenter_svgmap, GnssCenter::t_svgMapFactory)
-
-// Constructor
-/////////////////////////////////////////////////////////////////////////////
-t_svgMap::t_svgMap() : QDialog() {
-
-  // Map in Scalable Vector Graphics (svg) Format
-  // --------------------------------------------
-  _mapPlot = new QwtPlot();
-
-  _mapPlot->setAxisScale(QwtPlot::xBottom, -180.0, 180.0);
-  _mapPlot->setAxisScale(QwtPlot::yLeft,    -90.0,  90.0);
-
-  _mapPlotZoomer = new QwtPlotZoomer(_mapPlot->canvas());
-
-  _mapPlot->canvas()->setFocusPolicy(Qt::WheelFocus);
-
-  QwtPlotSvgItem* mapItem = new QwtPlotSvgItem();
-  mapItem->loadFile(QRectF(-180.0, -90.0, 360.0, 180.0), ":world.svg");
-  mapItem->attach(_mapPlot);
-
-  // Buttons
-  // -------
-  int ww = QFontMetrics(font()).width('w');
-
-  _buttonClose = new QPushButton(tr("Close"), this);
-  _buttonClose->setMaximumWidth(10*ww);
-  connect(_buttonClose, SIGNAL(clicked()), this, SLOT(slotClose()));
-
-  _buttonPrint = new QPushButton(tr("Print"), this);
-  _buttonPrint->setMaximumWidth(10*ww);
-  connect(_buttonPrint, SIGNAL(clicked()), this, SLOT(slotPrint()));
-
-  _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
-  _buttonWhatsThis->setMaximumWidth(10*ww);
-  connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
-
-  // Layout
-  // ------
-  QHBoxLayout* buttonLayout = new QHBoxLayout;
-  buttonLayout->addWidget(_buttonClose);
-  buttonLayout->addWidget(_buttonPrint);
-  buttonLayout->addWidget(_buttonWhatsThis);
-
-  QVBoxLayout* mainLayout = new QVBoxLayout(this);
-  mainLayout->addWidget(_mapPlot);
-  mainLayout->addLayout(buttonLayout);
-
-  // WhatsThis
-  // ---------
-  _buttonClose->setWhatsThis(tr("<p>Close window.</p>"));
-  _buttonPrint->setWhatsThis(tr("<p>Print stream distribution map.</p>"));
-
-  // Minimal and Maximal Coordinates
-  // -------------------------------
-  _minPointLat = 0.0;
-  _maxPointLat = 0.0;
-  _minPointLon = 0.0;
-  _maxPointLon = 0.0;
-
-  // Important
-  // ---------
-  _mapPlot->replot();
-}
-
-// Destructor
-/////////////////////////////////////////////////////////////////////////////
-t_svgMap::~t_svgMap() { 
-  delete _mapPlot;
-  delete _buttonWhatsThis;
-}
-
-// 
-/////////////////////////////////////////////////////////////////////////////
-void t_svgMap::slotNewPoint(const QString& name, double latDeg, double lonDeg) {
-
-  if (lonDeg > 180.0) lonDeg -= 360.0;
-
-  QColor red(220,20,60);
-  QwtSymbol* symbol = new QwtSymbol(QwtSymbol::Rect, QBrush(red), 
-                                    QPen(red), QSize(2,2));
-  QwtPlotMarker* marker = new QwtPlotMarker();
-  marker->setValue(lonDeg, latDeg);
-  if (lonDeg > 170.0) {
-    marker->setLabelAlignment(Qt::AlignLeft);
-  }
-  else {
-    marker->setLabelAlignment(Qt::AlignRight);
-  }
-  QwtText text(name.left(4));
-  QFont   font = text.font();
-  font.setPointSize(font.pointSize()*0.8);
-  text.setFont(font);
-  marker->setLabel(text);
-  marker->setSymbol(symbol);
-  marker->attach(_mapPlot);
-
-  // Remeber minimal and maximal coordinates
-  // ---------------------------------------
-  if (_minPointLat == 0.0 && _maxPointLat == 0.0 &&
-      _minPointLon == 0.0 && _maxPointLon == 0.0) {
-    _minPointLat = latDeg;
-    _maxPointLat = latDeg;
-    _minPointLon = lonDeg;
-    _maxPointLon = lonDeg;
-  }
-  else {
-    if      (_maxPointLat < latDeg) {
-      _maxPointLat = latDeg;
-    }
-    else if (_minPointLat > latDeg) {
-      _minPointLat = latDeg;
-    }
-    if      (_maxPointLon < lonDeg) {
-      _maxPointLon = lonDeg;
-    }
-    else if (_minPointLon > lonDeg) {
-      _minPointLon = lonDeg;
-    }
-  }
-}
-
-// Close
-////////////////////////////////////////////////////////////////////////////
-void t_svgMap::slotClose() {
-  done(0);
-}
-
-// Close Dialog gracefully
-////////////////////////////////////////////////////////////////////////////
-void t_svgMap::closeEvent(QCloseEvent* event) {
-  QDialog::closeEvent(event);
-}
-
-// 
-////////////////////////////////////////////////////////////////////////////
-void t_svgMap::showEvent(QShowEvent* event) {
-  double width  = _maxPointLon - _minPointLon;
-  double height = _maxPointLat - _minPointLat;
-  if (width > 0 && height > 0) {
-
-    // Extend plot area by 10 percent
-    // ------------------------------
-    double eps = 0.1;
-    double epsLon    = eps * (_maxPointLon - _minPointLon);
-    double epsLat    = eps * (_maxPointLat - _minPointLat);
-    double widthExt  = width  + 2 * epsLon;
-    double heightExt = height + 2 * epsLat;
-    double minLon    = _minPointLon - epsLon;
-    double minLat    = _minPointLat - epsLat;
-
-    // Keep lat/lon relations
-    // ----------------------
-    double widthBorder = widthExt;
-    double heightBorder = heightExt;
-    double scale = widthExt/heightExt/2.;
-    if ( scale < 1.) {
-      widthBorder = widthExt / scale;
-      minLon = minLon - (widthBorder - widthExt)/2.;
-    }
-    else {
-      heightBorder = heightExt * scale;
-      minLat = minLat - (heightBorder - heightExt)/2.;
-    }
-
-    // Borders shall not exceed min or max values
-    // ------------------------------------------
-    if (minLon < -180.) minLon = -180.;
-    if (minLat <  -90.) minLat =  -90.;
-    double maxLat = minLat + heightBorder;
-    if ( maxLat >  90) minLat = minLat - (maxLat -  90.);
-    double maxLon = minLon + widthBorder;
-    if ( maxLon > 180) minLon = minLon - (maxLon - 180.);
-
-    // Area large enough to justify world map
-    // --------------------------------------
-    if (widthBorder < 270.0 && heightBorder < 135.0) {
-      QRectF rect(minLon, minLat, widthBorder, heightBorder);
-      _mapPlotZoomer->zoom(rect);
-    }
-  }
-  QDialog::showEvent(event);
-}
-
-// Print the widget
-////////////////////////////////////////////////////////////////////////////
-void t_svgMap::slotPrint() {
-
-  QPrinter printer;
-  QPrintDialog* dialog = new QPrintDialog(&printer, this);
-  dialog->setWindowTitle(tr("Print Map"));
-  if (dialog->exec() != QDialog::Accepted) {
-    return;
-  }
-  else {
-    QwtPlotRenderer renderer;
-    renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, false);
-    renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, true);
-    renderer.renderTo(_mapPlot, printer);
-  }
-}
-
-// Whats This Help
-////////////////////////////////////////////////////////////////////////////
-void t_svgMap::slotWhatsThis() {
-  QWhatsThis::enterWhatsThisMode();
-}
-
Index: trunk/GnssCenter/map_stations/svgmap.h
===================================================================
--- trunk/GnssCenter/map_stations/svgmap.h	(revision 5403)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#ifndef GnssCenter_SVGMAP_H
-#define GnssCenter_SVGMAP_H
-
-#include <QtGui>
-#include <QWhatsThis>
-#include "plugininterface.h"
-
-class QwtPlot;
-class QwtPlotZoomer;
-
-namespace GnssCenter {
-
-class t_svgMap : public QDialog {
- Q_OBJECT
- public:
-  t_svgMap();
-  ~t_svgMap();
-
- public slots:
-  void slotNewPoint(const QString& name, double latDeg, double lonDeg);
-
- private slots:
-  void slotClose();
-  void slotPrint();
-  void slotWhatsThis();
-
- protected:
-  virtual void closeEvent(QCloseEvent *);
-  virtual void showEvent(QShowEvent *);
-
- private:
-  QwtPlot*       _mapPlot;
-  QwtPlotZoomer* _mapPlotZoomer;
-  QPushButton*   _buttonClose;
-  QPushButton*   _buttonPrint;
-  QPushButton*   _buttonWhatsThis;
-  double         _minPointLat;
-  double         _maxPointLat;
-  double         _minPointLon;
-  double         _maxPointLon;
-
-};
-
-class t_svgMapFactory : public QObject, public t_pluginFactoryInterface {
- Q_OBJECT
- Q_INTERFACES(GnssCenter::t_pluginFactoryInterface)
- public:
-  virtual QWidget* create() {return new t_svgMap();} 
-  virtual QString getName() const {return QString("Map");}
-};
-
-} // namespace GnssCenter
-
-#endif
Index: trunk/GnssCenter/map_stations/svgmap.pro
===================================================================
--- trunk/GnssCenter/map_stations/svgmap.pro	(revision 5403)
+++ 	(revision )
@@ -1,25 +1,0 @@
-
-TEMPLATE             = lib
-CONFIG              += plugin debug
-TARGET               = $$qtLibraryTarget(gnsscenter_svgmap)
-QT                  += svg
-INCLUDEPATH         += ../qwt ../main
-DESTDIR              = ../plugins
-LIBS                 = -L../qwt -lqwt
-
-debug:OBJECTS_DIR   = .obj/debug
-debug:MOC_DIR       = .moc/debug
-release:OBJECTS_DIR = .obj/release
-release:MOC_DIR     = .moc/release
-
-thrift.target   = gen-cpp
-thrift.commands = "thrift -r -gen cpp rtnet.thrift"
-thrift.depends  = rtnet.thrift rtnet_data.thrift
-QMAKE_EXTRA_TARGETS += thrift
-PRE_TARGETDEPS      += gen-cpp
-
-HEADERS   = svgmap.h
-
-SOURCES   = svgmap.cpp
-
-RESOURCES = svgmap.qrc
Index: trunk/GnssCenter/map_stations/svgmap.qrc
===================================================================
--- trunk/GnssCenter/map_stations/svgmap.qrc	(revision 5403)
+++ 	(revision )
@@ -1,5 +1,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
-    <file>world.svg</file>
-</qresource>
-</RCC>
