Changeset 5453 in ntrip
- Timestamp:
- Sep 14, 2013, 3:33:22 PM (11 years ago)
- Location:
- trunk/GnssCenter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/main/settings.cpp
r5452 r5453 26 26 // Constructor 27 27 //////////////////////////////////////////////////////////////////////////// 28 t_settings::t_settings( ) {28 t_settings::t_settings(const QString& groupName) { 29 29 QMutexLocker locker(&_mutex); 30 30 31 _app = static_cast<t_app*>(qApp); 31 _groupName = groupName; 32 _app = static_cast<t_app*>(qApp); 32 33 33 34 // First fill the options … … 111 112 settings.sync(); 112 113 } 113 114 //115 ////////////////////////////////////////////////////////////////////////////116 void t_settings::beginGroup(const QString& groupName) {117 QMutexLocker locker(&_mutex);118 _groupName = groupName;119 }120 121 //122 ////////////////////////////////////////////////////////////////////////////123 void t_settings::endGroup() {124 QMutexLocker locker(&_mutex);125 _groupName.clear();126 } -
trunk/GnssCenter/main/settings.h
r5452 r5453 10 10 class t_settings { 11 11 public: 12 t_settings( );12 t_settings(const QString& groupName = QString()); 13 13 ~t_settings(); 14 14 QVariant value(const QString& key, … … 17 17 void remove(const QString& key ); 18 18 void sync(); 19 void beginGroup(const QString& groupName);20 void endGroup();21 19 private: 22 20 void reRead(); -
trunk/GnssCenter/monitor/monitor.cpp
r5452 r5453 66 66 // Host and Port 67 67 // ------------- 68 t_settings settings; 69 settings.beginGroup(pluginName); 68 t_settings settings(pluginName); 70 69 settings.setValue("host", "rtnet.rtcm-ntrip.org"); 71 70 settings.setValue("port", 7777); 72 settings.endGroup();73 71 settings.sync(); 74 72 … … 96 94 void t_monitor::slotStartThrift() { 97 95 if (!_thriftClient) { 98 t_settings settings; 99 settings.beginGroup(pluginName); 96 t_settings settings(pluginName); 100 97 QString host = settings.value("host").toString(); 101 98 int port = settings.value("port").toInt(); 102 settings.endGroup();103 99 _thriftClient = new t_thriftClient(this, host, port); 104 100 connect(_thriftClient, SIGNAL(finished()), this, SLOT(slotThriftFinished()));
Note:
See TracChangeset
for help on using the changeset viewer.