Changeset 9025 in ntrip for trunk/BNC/src/bncwindow.cpp


Ignore:
Timestamp:
Aug 25, 2020, 11:02:49 PM (4 years ago)
Author:
stuerze
Message:

some modification to allow encoding and decoding of SSR corrections in RTCM-SSR and IGS-SSR formats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncwindow.cpp

    r8936 r9025  
    515515  // Upload Results
    516516  // -------------
    517   _uploadTable = new QTableWidget(0,14);
    518   _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Ntrip, User, Password, System, CoM, SP3 File, RNX File, PID, SID, IOD, bytes").split(","));
     517  _uploadTable = new QTableWidget(0,15);
     518  _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Ntrip, User, Password, System, Format, CoM, SP3 File, RNX File, PID, SID, IOD, bytes").split(","));
    519519  _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
    520520  _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
     
    526526  _uploadTable->horizontalHeader()->resizeSection( 5, 8*ww);
    527527  _uploadTable->horizontalHeader()->resizeSection( 6,11*ww);
    528   _uploadTable->horizontalHeader()->resizeSection( 7, 4*ww);
    529   _uploadTable->horizontalHeader()->resizeSection( 8,15*ww);
     528  _uploadTable->horizontalHeader()->resizeSection( 7,11*ww);
     529  _uploadTable->horizontalHeader()->resizeSection( 8, 4*ww);
    530530  _uploadTable->horizontalHeader()->resizeSection( 9,15*ww);
    531   _uploadTable->horizontalHeader()->resizeSection(10, 4*ww);
     531  _uploadTable->horizontalHeader()->resizeSection(10,15*ww);
    532532  _uploadTable->horizontalHeader()->resizeSection(11, 4*ww);
    533533  _uploadTable->horizontalHeader()->resizeSection(12, 4*ww);
    534   _uploadTable->horizontalHeader()->resizeSection(13,12*ww);
     534  _uploadTable->horizontalHeader()->resizeSection(13, 4*ww);
     535  _uploadTable->horizontalHeader()->resizeSection(14,12*ww);
    535536#if QT_VERSION < 0x050000
    536537  _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
     
    18781879    for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
    18791880      if (_uploadTable->cellWidget(iRow, iCol) &&
    1880           (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6 || iCol == 7)) {
     1881          (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6 || iCol == 7 || iCol == 8)) {
    18811882        if       (iCol == 3) {
    18821883          QComboBox* ntripversion = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
     
    18961897        }
    18971898        else if (iCol == 7) {
     1899          QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
     1900          hlp += system->currentText() + ",";
     1901        }
     1902        else if (iCol == 8) {
    18981903          QCheckBox* com    = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
    18991904          QString state; state.setNum(com->checkState());
     
    27092714    }
    27102715    else if (iCol == 7) {
     2716      QComboBox* format = new QComboBox();
     2717      format->setEditable(false);
     2718      format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
     2719      format->setFrame(false);
     2720      _uploadTable->setCellWidget(iRow, iCol, format);
     2721    }
     2722    else if (iCol == 8) {
    27112723      QCheckBox* com = new QCheckBox();
    27122724      _uploadTable->setCellWidget(iRow, iCol, com);
    27132725    }
    2714     else if (iCol == 13) {
     2726    else if (iCol == 14) {
    27152727      bncTableItem* bncIt = new bncTableItem();
    27162728      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
     
    27452757  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
    27462758    BNC_CORE->_uploadTableItems[iRow] =
    2747                                 (bncTableItem*) _uploadTable->item(iRow, 13);
     2759                                (bncTableItem*) _uploadTable->item(iRow, 14);
    27482760  }
    27492761  nRows = _uploadTable->rowCount();
     
    28062818      }
    28072819      else if (iCol == 7) {
     2820        QComboBox* format = new QComboBox();
     2821        format->setEditable(false);
     2822        format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
     2823        format->setFrame(false);
     2824        format->setCurrentIndex(format->findText(hlp[iCol]));
     2825        _uploadTable->setCellWidget(iRow, iCol, format);
     2826      }
     2827      else if (iCol == 8) {
    28082828        QCheckBox* com = new QCheckBox();
    28092829        if (hlp[iCol].toInt() == Qt::Checked) {
     
    28122832        _uploadTable->setCellWidget(iRow, iCol, com);
    28132833      }
    2814       else if (iCol == 13) {
     2834      else if (iCol == 14) {
    28152835        bncTableItem* bncIt = new bncTableItem();
    28162836        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
Note: See TracChangeset for help on using the changeset viewer.