Changeset 5452 in ntrip for trunk/GnssCenter/monitor
- Timestamp:
- Sep 14, 2013, 3:28:51 PM (11 years ago)
- Location:
- trunk/GnssCenter/monitor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/monitor/monitor.cpp
r5450 r5452 32 32 #include "worldplot.h" 33 33 #include "thriftclient.h" 34 #include "settings.h" 34 35 35 36 using namespace std; … … 63 64 connect(actStopThrift, SIGNAL(triggered()), this, SLOT(slotStopThrift())); 64 65 66 // Host and Port 67 // ------------- 68 t_settings settings; 69 settings.beginGroup(pluginName); 70 settings.setValue("host", "rtnet.rtcm-ntrip.org"); 71 settings.setValue("port", 7777); 72 settings.endGroup(); 73 settings.sync(); 74 65 75 // Thrift Client; 66 76 // -------------- … … 86 96 void t_monitor::slotStartThrift() { 87 97 if (!_thriftClient) { 88 _thriftClient = new t_thriftClient(this); 98 t_settings settings; 99 settings.beginGroup(pluginName); 100 QString host = settings.value("host").toString(); 101 int port = settings.value("port").toInt(); 102 settings.endGroup(); 103 _thriftClient = new t_thriftClient(this, host, port); 89 104 connect(_thriftClient, SIGNAL(finished()), this, SLOT(slotThriftFinished())); 90 105 _thriftClient->start(); -
trunk/GnssCenter/monitor/monitor.h
r5449 r5452 13 13 14 14 namespace GnssCenter { 15 16 const static QString pluginName = "RTNet Monitor"; 15 17 16 18 class t_monitor : public QMainWindow { … … 41 43 public: 42 44 virtual QWidget* create() {return new t_monitor();} 43 virtual QString getName() const {return QString("RTNet Monitor");}45 virtual QString getName() const {return pluginName;} 44 46 }; 45 47 -
trunk/GnssCenter/monitor/monitor.pro
r5444 r5452 35 35 worldplot.cpp \ 36 36 thriftclient.cpp \ 37 ../main/settings.cpp \ 37 38 gen-cpp/RtnetData.cpp \ 38 39 gen-cpp/rtnet_constants.cpp gen-cpp/rtnet_types.cpp \ -
trunk/GnssCenter/monitor/thriftclient.cpp
r5447 r5452 20 20 // Constructor 21 21 ////////////////////////////////////////////////////////////////////////////// 22 t_thriftClient::t_thriftClient(t_monitor* parent ) {22 t_thriftClient::t_thriftClient(t_monitor* parent, const QString& host, int port) { 23 23 _stop = false; 24 24 _parent = parent; 25 _host = host.toAscii().data(); 26 _port = port; 25 27 } 26 28 -
trunk/GnssCenter/monitor/thriftclient.h
r5447 r5452 4 4 #include <string> 5 5 #include <map> 6 #include <QString> 6 7 #include <QThread> 7 8 #include <QMutex> … … 66 67 class t_thriftClient : public QThread { 67 68 public: 68 t_thriftClient(t_monitor* parent );69 t_thriftClient(t_monitor* parent, const QString& host, int port); 69 70 ~t_thriftClient(); 70 71 virtual void run(); … … 75 76 76 77 private: 77 QMutex _mutex; 78 t_monitor* _parent; 79 bool _stop; 78 QMutex _mutex; 79 std::string _host; 80 int _port; 81 t_monitor* _parent; 82 bool _stop; 80 83 }; 81 84
Note:
See TracChangeset
for help on using the changeset viewer.