[4836] | 1 |
|
---|
| 2 | /* -------------------------------------------------------------------------
|
---|
| 3 | * RTNet GUI
|
---|
| 4 | * -------------------------------------------------------------------------
|
---|
| 5 | *
|
---|
[5406] | 6 | * Class: t_map_stations
|
---|
[4836] | 7 | *
|
---|
| 8 | * Purpose: Plot map of stations/satellites
|
---|
| 9 | *
|
---|
| 10 | * Author: L. Mervart
|
---|
| 11 | *
|
---|
| 12 | * Created: 05-Jan-2013
|
---|
| 13 | *
|
---|
| 14 | * Changes:
|
---|
| 15 | *
|
---|
| 16 | * -----------------------------------------------------------------------*/
|
---|
| 17 |
|
---|
[5418] | 18 | #include <iostream>
|
---|
[4836] | 19 | #include <QtSvg>
|
---|
| 20 |
|
---|
| 21 | #include <qwt_symbol.h>
|
---|
| 22 | #include <qwt_plot.h>
|
---|
| 23 | #include <qwt_plot_svgitem.h>
|
---|
| 24 | #include <qwt_plot_curve.h>
|
---|
| 25 | #include <qwt_plot_marker.h>
|
---|
| 26 | #include <qwt_plot_canvas.h>
|
---|
| 27 | #include <qwt_plot_zoomer.h>
|
---|
| 28 | #include <qwt_plot_renderer.h>
|
---|
| 29 |
|
---|
[5406] | 30 | #include "map_stations.h"
|
---|
[5420] | 31 | #include "worldplot.h"
|
---|
[5416] | 32 | #include "thriftclient.h"
|
---|
[4836] | 33 |
|
---|
[4858] | 34 | using namespace std;
|
---|
[5001] | 35 | using namespace GnssCenter;
|
---|
[4858] | 36 |
|
---|
[5406] | 37 | Q_EXPORT_PLUGIN2(gnsscenter_map_stations, GnssCenter::t_map_stationsFactory)
|
---|
[5018] | 38 |
|
---|
[4836] | 39 | // Constructor
|
---|
| 40 | /////////////////////////////////////////////////////////////////////////////
|
---|
[5420] | 41 | t_map_stations::t_map_stations() : QMainWindow() {
|
---|
[4836] | 42 |
|
---|
[5420] | 43 | // World Plot
|
---|
| 44 | // ----------
|
---|
| 45 | _plot = new t_worldPlot();
|
---|
| 46 | setCentralWidget(_plot);
|
---|
[4836] | 47 |
|
---|
[5410] | 48 | // Thrift Client;
|
---|
[5415] | 49 | // --------------
|
---|
[5416] | 50 | _thriftClient = new t_thriftClient(this);
|
---|
[5410] | 51 | _thriftClient->start();
|
---|
[4836] | 52 | }
|
---|
| 53 |
|
---|
| 54 | // Destructor
|
---|
| 55 | /////////////////////////////////////////////////////////////////////////////
|
---|
[5406] | 56 | t_map_stations::~t_map_stations() {
|
---|
[5414] | 57 | _thriftClient->stop();
|
---|
[4836] | 58 | }
|
---|
| 59 |
|
---|
| 60 |
|
---|
[5415] | 61 | //
|
---|
| 62 | /////////////////////////////////////////////////////////////////////////////
|
---|
[5416] | 63 | void t_map_stations::slotNewThriftResult(t_thriftResult* result) {
|
---|
| 64 | cout << result->_name << ' '
|
---|
| 65 | << result->_nGPS << ' ' << result->_nGLO << ' '
|
---|
| 66 | << result->_x << ' ' << result->_y << ' ' << result->_z << endl;
|
---|
[5415] | 67 | }
|
---|