Changeset 11158 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 days ago)
- Location:
- trunk/BNC/src
- Files:
-
- 18 edited
-
bncmain.cpp (modified) (4 diffs)
-
bncmap_svg.cpp (modified) (1 diff)
-
bncserialport.cpp (modified) (2 diffs)
-
bncutils.cpp (modified) (2 diffs)
-
combination/bnccomb.cpp (modified) (2 diffs)
-
ephemeris.cpp (modified) (4 diffs)
-
map/bncmapwin.cpp (modified) (1 diff)
-
orbComp/sp3Comp.cpp (modified) (3 diffs)
-
qtfilechooser.cpp (modified) (1 diff)
-
rinex/graphwin.cpp (modified) (2 diffs)
-
rinex/polarplot.cpp (modified) (1 diff)
-
rinex/polarplot.h (modified) (1 diff)
-
rinex/reqcanalyze.cpp (modified) (2 diffs)
-
rinex/reqcedit.cpp (modified) (6 diffs)
-
rinex/rnxnavfile.cpp (modified) (2 diffs)
-
serial/qextserialbase.cpp (modified) (2 diffs)
-
serial/qextserialbase.h (modified) (1 diff)
-
src.pri (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncmain.cpp
r11153 r11158 47 47 #include <QApplication> 48 48 #include <QFile> 49 #include <QRegularExpression> 49 50 #include <iostream> 50 51 #include <QNetworkProxyFactory> … … 100 101 // Main Program 101 102 ///////////////////////////////////////////////////////////////////////////// 103 // Command line argument matches the option pattern, e.g. "--?conf" 104 //////////////////////////////////////////////////////////////////////////// 105 static bool isOption(const char* arg, const char* pattern) { 106 return QRegularExpression(QRegularExpression::anchoredPattern(pattern)).match(arg).hasMatch(); 107 } 108 102 109 int main(int argc, char* argv[]) { 103 110 … … 405 412 406 413 for (int ii = 1; ii < argc; ii++) { 407 if ( QRegExp("--?help").exactMatch(argv[ii])) {414 if (isOption(argv[ii], "--?help")) { 408 415 cout << printHelp.data(); 409 416 exit(0); 410 417 } 411 if ( QRegExp("--?nw").exactMatch(argv[ii])) {418 if (isOption(argv[ii], "--?nw")) { 412 419 interactive = false; 413 420 } 414 if ( QRegExp("--?version").exactMatch(argv[ii])) {421 if (isOption(argv[ii], "--?version")) { 415 422 cout << BNCPGMNAME << endl; 416 423 exit(0); 417 424 } 418 if ( QRegExp("--?display").exactMatch(argv[ii])) {425 if (isOption(argv[ii], "--?display")) { 419 426 displaySet = true; 420 427 strcpy(argv[ii], "-display"); // make it "-display" not "--display" 421 428 } 422 429 if (ii + 1 < argc) { 423 if ( QRegExp("--?conf").exactMatch(argv[ii])) {430 if (isOption(argv[ii], "--?conf")) { 424 431 confFileName = QString(argv[ii + 1]); 425 432 } 426 if ( QRegExp("--?file").exactMatch(argv[ii])) {433 if (isOption(argv[ii], "--?file")) { 427 434 interactive = false; 428 435 rawFileName = QByteArray(argv[ii + 1]); … … 479 486 480 487 for (int ii = 1; ii < argc - 2; ii++) { 481 if ( QRegExp("--?key").exactMatch(argv[ii])) {488 if (isOption(argv[ii], "--?key")) { 482 489 QString key(argv[ii + 1]); 483 490 QString val(argv[ii + 2]); -
trunk/BNC/src/bncmap_svg.cpp
r11021 r11158 44 44 #include <QPushButton> 45 45 46 #include <qwt_text.h> 46 47 #include <qwt_symbol.h> 47 48 #include <qwt_plot.h> -
trunk/BNC/src/bncserialport.cpp
r11022 r11158 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <QRegularExpression> 41 42 #include <iostream> 42 43 … … 184 185 !_serialLonLineEdit->text().isEmpty() ) { 185 186 mountPoints->push_back("//" 186 + _serialPortLineEdit->text().replace("/","-").replace(QReg Exp("^[-]"), "") + "@"187 + _serialPortLineEdit->text().replace("/","-").replace(QRegularExpression("^[-]"), "") + "@" 187 188 + _serialDataBits + "-" 188 189 + _serialParity + "-" -
trunk/BNC/src/bncutils.cpp
r11096 r11158 43 43 #include <math.h> 44 44 45 #include <QReg Exp>45 #include <QRegularExpression> 46 46 #include <QStringList> 47 47 #include <QDateTime> … … 156 156 } 157 157 158 // 158 // Replace each ${NAME} by the environment variable NAME (empty if not set); 159 // BNC's own file name placeholders are kept 159 160 //////////////////////////////////////////////////////////////////////////// 160 161 void expandEnvVar(QString& str) { 161 162 162 QRegExp rx("(\\$\\{.+\\})"); 163 164 if (rx.indexIn(str) != -1) { 165 QStringListIterator it(rx.capturedTexts()); 166 if (it.hasNext()) { 167 QString rxStr = it.next(); 168 QString envVar = rxStr.mid(2,rxStr.length()-3); 169 str.replace(rxStr, qgetenv(envVar.toLatin1())); 170 } 171 } 163 static const QStringList placeholders = QStringList() << "GPSWD" << "V3OBS" << "V3PROD"; 164 165 QString result; 166 int last = 0; 167 QRegularExpressionMatchIterator it = QRegularExpression("\\$\\{([^}]+)\\}").globalMatch(str); 168 while (it.hasNext()) { 169 QRegularExpressionMatch match = it.next(); 170 QString name = match.captured(1); 171 result += str.mid(last, match.capturedStart() - last); 172 result += placeholders.contains(name) ? match.captured(0) 173 : QString::fromUtf8(qgetenv(name.toLatin1())); 174 last = match.capturedEnd(); 175 } 176 str = result + str.mid(last); 172 177 } 173 178 -
trunk/BNC/src/combination/bnccomb.cpp
r11140 r11158 15 15 * -----------------------------------------------------------------------*/ 16 16 17 #include <QRegularExpression> 17 18 #include <newmatio.h> 18 19 #include <iomanip> … … 188 189 newAC->name = hlp[1]; 189 190 newAC->weightFactor = hlp[2].toDouble(); 190 newAC->excludeSats = hlp[3].split(QReg Exp("[ ,]"), Qt::SkipEmptyParts);191 newAC->excludeSats = hlp[3].split(QRegularExpression("[ ,]"), Qt::SkipEmptyParts); 191 192 newAC->isAPC = bool(newAC->mountPoint.mid(0,4) == "SSRA"); 192 193 newAC->attitudeSource = (hlp.size() > 4) ? hlp[4] : "Computed"; -
trunk/BNC/src/ephemeris.cpp
r11148 r11158 305 305 // Constructor 306 306 ////////////////////////////////////////////////////////////////////////////// 307 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines, QString typeStr) { 307 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines, QString typeStr) 308 : t_ephGPS() { // all members initialized, also those not in the record type 308 309 309 310 setType(typeStr); … … 1862 1863 // Constructor 1863 1864 ////////////////////////////////////////////////////////////////////////////// 1864 t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines, const QString typeStr) { 1865 t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines, const QString typeStr) 1866 : t_ephGal() { // all members initialized, also those not in the record type 1865 1867 1866 1868 setType(typeStr); … … 2325 2327 // Constructor 2326 2328 ////////////////////////////////////////////////////////////////////////////// 2327 t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList &lines, const QString typeStr) { 2329 t_ephSBAS::t_ephSBAS(double rnxVersion, const QStringList &lines, const QString typeStr) 2330 : t_ephSBAS() { // all members initialized, also those not in the record type 2328 2331 2329 2332 setType(typeStr); … … 2571 2574 // Constructor 2572 2575 ////////////////////////////////////////////////////////////////////////////// 2573 t_ephBDS::t_ephBDS(double rnxVersion, const QStringList &lines, const QString typeStr) { 2576 t_ephBDS::t_ephBDS(double rnxVersion, const QStringList &lines, const QString typeStr) 2577 : t_ephBDS() { // all members initialized, also those not in the record type 2574 2578 2575 2579 setType(typeStr); -
trunk/BNC/src/map/bncmapwin.cpp
r11023 r11158 49 49 _initMap = false; 50 50 51 const int ww = QFontMetrics(font()). width('w');51 const int ww = QFontMetrics(font()).horizontalAdvance('w'); 52 52 53 53 setWindowTitle("BNC: Map View"); -
trunk/BNC/src/orbComp/sp3Comp.cpp
r11083 r11158 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <QRegularExpression> 41 42 #include <iostream> 42 43 #include <iomanip> … … 54 55 55 56 bncSettings settings; 56 _sp3FileNames = settings.value("sp3CompFile").toString().split(QReg Exp("[ ,]"), Qt::SkipEmptyParts);57 _sp3FileNames = settings.value("sp3CompFile").toString().split(QRegularExpression("[ ,]"), Qt::SkipEmptyParts); 57 58 for (int ii = 0; ii < _sp3FileNames.size(); ii++) { 58 59 expandEnvVar(_sp3FileNames[ii]); … … 62 63 _log = 0; 63 64 64 _excludeSats = settings.value("sp3CompExclude").toString().split(QReg Exp("[ ,]"), Qt::SkipEmptyParts);65 _excludeSats = settings.value("sp3CompExclude").toString().split(QRegularExpression("[ ,]"), Qt::SkipEmptyParts); 65 66 66 67 _summaryOnly = (Qt::CheckState(settings.value("sp3CompSummaryOnly").toInt()) == Qt::Checked); -
trunk/BNC/src/qtfilechooser.cpp
r10524 r11158 28 28 29 29 QHBoxLayout* layout = new QHBoxLayout( this ); 30 layout->set Margin(0);30 layout->setContentsMargins(0, 0, 0, 0); 31 31 32 32 _lineEdit = new QLineEdit(this); -
trunk/BNC/src/rinex/graphwin.cpp
r11023 r11158 41 41 #include <qwt_scale_widget.h> 42 42 #include <qwt_scale_engine.h> 43 #include <qwt_interval.h> 43 44 44 45 #include <QDir> 45 46 #include <QFileInfo> 47 #include <QPainter> 46 48 #include <QHBoxLayout> 47 49 #include <QVBoxLayout> … … 174 176 QPainter painter; 175 177 painter.begin(&printer); 176 double xscale = printer.pageRect().width()/double(_canvas->width()); 177 double yscale = printer.pageRect().height()/double(_canvas->height()); 178 QRect pageRect = printer.pageLayout().paintRectPixels(printer.resolution()); 179 QRect paperRect = printer.pageLayout().fullRectPixels(printer.resolution()); 180 double xscale = pageRect.width()/double(_canvas->width()); 181 double yscale = pageRect.height()/double(_canvas->height()); 178 182 double scale = qMin(xscale, yscale); 179 painter.translate(p rinter.paperRect().x() + printer.pageRect().width()/2,180 p rinter.paperRect().y() + printer.pageRect().height()/2);183 painter.translate(paperRect.x() + pageRect.width()/2, 184 paperRect.y() + pageRect.height()/2); 181 185 painter.scale(scale, scale); 182 186 painter.translate(-width()/2, -height()/2); -
trunk/BNC/src/rinex/polarplot.cpp
r8127 r11158 31 31 const QPointF& pole, int from, int to) const { 32 32 t_colorMap colorMap; 33 const t_polarData* polarData = dynamic_cast<const t_polarData*>(data()); 33 34 for (int ii = from; ii <= to; ii++) { 34 35 QwtSymbol ss(symbol.style()); 35 36 ss.setSize(symbol.size()); 36 const QwtPointPolar& point = sample(ii);37 const QColor color = colorMap.color(_scaleInterval, point._value);37 double value = polarData ? polarData->value(ii) : 0.0; 38 const QColor color = colorMap.color(_scaleInterval, value); 38 39 ss.setBrush(QBrush(color)); 39 40 ss.setPen(QPen(color)); -
trunk/BNC/src/rinex/polarplot.h
r8127 r11158 51 51 virtual QwtPointPolar sample(size_t ii) const { 52 52 const t_polarPoint* point = _data->at(ii); 53 QwtPointPolar qp(point->_az, point->_zen); qp._value = point->_value; 54 return qp; 53 return QwtPointPolar(point->_az, point->_zen); 55 54 } 55 double value(size_t ii) const {return _data->at(ii)->_value;} // symbol color 56 56 virtual size_t size() const {return _size;} 57 virtual QRectF boundingRect() const {return d_boundingRect;}57 virtual QRectF boundingRect() const {return cachedBoundingRect;} 58 58 protected: 59 59 size_t _size; -
trunk/BNC/src/rinex/reqcanalyze.cpp
r11057 r11158 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <QRegularExpression> 41 42 #include <iostream> 42 43 #include <iomanip> … … 152 153 153 154 for (int ii = 0; ii < signalsOpt.size(); ii++) { 154 QStringList input = signalsOpt.at(ii).split(QReg Exp("[:&]"), Qt::SkipEmptyParts);155 QStringList input = signalsOpt.at(ii).split(QRegularExpression("[:&]"), Qt::SkipEmptyParts); 155 156 if (input.size() > 1 && input[0].length() == 1) { 156 157 char system = input[0].toLatin1().constData()[0]; -
trunk/BNC/src/rinex/reqcedit.cpp
r11057 r11158 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <QRegularExpression> 41 42 #include <iostream> 42 43 #include "reqcedit.h" … … 412 413 if (!newMarkerName.isEmpty()) { 413 414 if (oldMarkerName.isEmpty() || 414 QReg Exp(oldMarkerName).exactMatch(obsFile.markerName())) {415 QRegularExpression(QRegularExpression::anchoredPattern(oldMarkerName)).match(obsFile.markerName()).hasMatch()) { 415 416 obsFile.setMarkerName(newMarkerName); 416 417 } … … 421 422 if (!newAntennaName.isEmpty()) { 422 423 if (oldAntennaName.isEmpty() || 423 QReg Exp(oldAntennaName).exactMatch(obsFile.antennaName())) {424 QRegularExpression(QRegularExpression::anchoredPattern(oldAntennaName)).match(obsFile.antennaName()).hasMatch()) { 424 425 obsFile.setAntennaName(newAntennaName); 425 426 } … … 430 431 if (!newAntennaNumber.isEmpty()) { 431 432 if (oldAntennaNumber.isEmpty() || 432 QReg Exp(oldAntennaNumber).exactMatch(obsFile.antennaNumber())) {433 QRegularExpression(QRegularExpression::anchoredPattern(oldAntennaNumber)).match(obsFile.antennaNumber()).hasMatch()) { 433 434 obsFile.setAntennaNumber(newAntennaNumber); 434 435 } … … 465 466 if (!newReceiverType.isEmpty()) { 466 467 if (oldReceiverType.isEmpty() || 467 QReg Exp(oldReceiverType).exactMatch(obsFile.receiverType())) {468 QRegularExpression(QRegularExpression::anchoredPattern(oldReceiverType)).match(obsFile.receiverType()).hasMatch()) { 468 469 obsFile.setReceiverType(newReceiverType); 469 470 } … … 474 475 if (!newReceiverNumber.isEmpty()) { 475 476 if (oldReceiverNumber.isEmpty() || 476 QReg Exp(oldReceiverNumber).exactMatch(obsFile.receiverNumber())) {477 QRegularExpression(QRegularExpression::anchoredPattern(oldReceiverNumber)).match(obsFile.receiverNumber()).hasMatch()) { 477 478 obsFile.setReceiverNumber(newReceiverNumber); 478 479 } -
trunk/BNC/src/rinex/rnxnavfile.cpp
r11023 r11158 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <QRegularExpression> 41 42 #include <iostream> 42 43 #include <newmatio.h> … … 159 160 } 160 161 161 QStringList hlp = line.split(QReg Exp("\\s+"), Qt::SkipEmptyParts);162 QStringList hlp = line.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts); 162 163 QString firstStr = hlp.at(0); 163 164 -
trunk/BNC/src/serial/qextserialbase.cpp
r1317 r11158 10 10 */ 11 11 #ifdef QT_THREAD_SUPPORT 12 QMutex* QextSerialBase::mutex=NULL; 12 QRecursiveMutex* QextSerialBase::mutex=NULL; 13 13 unsigned long QextSerialBase::refCount=0; 14 14 #endif … … 92 92 #ifdef QT_THREAD_SUPPORT 93 93 if (!mutex) { 94 mutex=new Q Mutex( QMutex::Recursive);94 mutex=new QRecursiveMutex(); 95 95 } 96 96 refCount++; -
trunk/BNC/src/serial/qextserialbase.h
r10525 r11158 185 185 186 186 #ifdef QT_THREAD_SUPPORT 187 static QMutex* mutex; 187 static QRecursiveMutex* mutex; 188 188 static ulong refCount; 189 189 #endif -
trunk/BNC/src/src.pri
r11153 r11158 39 39 #debug:DEFINES += BNC_DEBUG_SSR 40 40 #debug:DEFINES += BNC_DEBUG_CMB 41 #debug:DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 41 # Deprecated Qt APIs (up to Qt 5.15) are not available, using one is an error 42 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 42 43 43 44 !versionAtLeast(QT_VERSION, 5.15.0):error("Use at least Qt version 5.15.0") … … 46 47 # ------------ 47 48 INCLUDEPATH += . ../newmat ./RTCM3 ./RTCM3/clock_and_orbit ./RTCM \ 48 ../qwt ../qwtpolar49 ../qwt 49 50 50 51 # Additional Libraries 51 52 # -------------------- 52 unix:LIBS += -L../newmat -lnewmat -L../qwt - L../qwtpolar -lqwtpolar -lqwt53 win32:LIBS += -L../newmat/release -L../qwt/release -L../qwtpolar/release\54 -lnewmat -lqwt polar -lqwt53 unix:LIBS += -L../newmat -lnewmat -L../qwt -lqwt 54 win32:LIBS += -L../newmat/release -L../qwt/release \ 55 -lnewmat -lqwt 55 56 56 57 HEADERS = bnchelp.html bncgetthread.h ssrQc.h ssrRefSig.h bncwindow.h bnctabledlg.h \
Note:
See TracChangeset
for help on using the changeset viewer.
