Changeset 9036 in ntrip for branches/BNC_2.12/src/bncwindow.cpp


Ignore:
Timestamp:
Aug 27, 2020, 9:36:18 AM (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
  • branches/BNC_2.12/src/bncwindow.cpp

    r8663 r9036  
    486486  // Upload Results
    487487  // -------------
    488   _uploadTable = new QTableWidget(0,12);
    489   _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Password, System, CoM, SP3 File, RNX File, PID, SID, IOD, bytes").split(","));
     488  _uploadTable = new QTableWidget(0,13);
     489  _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Password, System, Format, CoM, SP3 File, RNX File, PID, SID, IOD, bytes").split(","));
    490490  _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
    491491  _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
     
    495495  _uploadTable->horizontalHeader()->resizeSection( 3, 8*ww);
    496496  _uploadTable->horizontalHeader()->resizeSection( 4,11*ww);
    497   _uploadTable->horizontalHeader()->resizeSection( 5, 4*ww);
    498   _uploadTable->horizontalHeader()->resizeSection( 6,15*ww);
     497  _uploadTable->horizontalHeader()->resizeSection( 5,11*ww);
     498  _uploadTable->horizontalHeader()->resizeSection( 6, 4*ww);
    499499  _uploadTable->horizontalHeader()->resizeSection( 7,15*ww);
    500   _uploadTable->horizontalHeader()->resizeSection( 8, 4*ww);
     500  _uploadTable->horizontalHeader()->resizeSection( 8,15*ww);
    501501  _uploadTable->horizontalHeader()->resizeSection( 9, 4*ww);
    502502  _uploadTable->horizontalHeader()->resizeSection(10, 4*ww);
    503   _uploadTable->horizontalHeader()->resizeSection(11,12*ww);
     503  _uploadTable->horizontalHeader()->resizeSection(11, 4*ww);
     504  _uploadTable->horizontalHeader()->resizeSection(12,12*ww);
    504505  _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
    505506  _uploadTable->horizontalHeader()->setStretchLastSection(true);
     
    18201821    for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
    18211822      if (_uploadTable->cellWidget(iRow, iCol) &&
    1822           (iCol == 3 || iCol == 4 || iCol == 5)) {
     1823          (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6)) {
    18231824        if      (iCol == 3) {
    18241825          QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
     
    18301831        }
    18311832        else if (iCol == 5) {
     1833          QComboBox* format = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
     1834          hlp += format->currentText() + ",";
     1835        }
     1836        else if (iCol == 6) {
    18321837          QCheckBox* com    = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
    18331838          QString state; state.setNum(com->checkState());
     
    25992604    }
    26002605    else if (iCol == 5) {
     2606      QComboBox* format = new QComboBox();
     2607      format->setEditable(false);
     2608      format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
     2609      format->setFrame(false);
     2610      _uploadTable->setCellWidget(iRow, iCol, format);
     2611    }
     2612    else if (iCol == 6) {
    26012613      QCheckBox* com = new QCheckBox();
    26022614      _uploadTable->setCellWidget(iRow, iCol, com);
    26032615    }
    2604     else if (iCol == 11) {
     2616    else if (iCol == 12) {
    26052617      bncTableItem* bncIt = new bncTableItem();
    26062618      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
     
    26352647  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
    26362648    BNC_CORE->_uploadTableItems[iRow] =
    2637                                 (bncTableItem*) _uploadTable->item(iRow, 11);
     2649                                (bncTableItem*) _uploadTable->item(iRow, 12);
    26382650  }
    26392651  nRows = _uploadTable->rowCount();
     
    26812693      }
    26822694      else if (iCol == 5) {
     2695        QComboBox* format = new QComboBox();
     2696        format->setEditable(false);
     2697        format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
     2698        format->setFrame(false);
     2699        format->setCurrentIndex(format->findText(hlp[iCol]));
     2700        _uploadTable->setCellWidget(iRow, iCol, format);
     2701      }
     2702      else if (iCol == 6) {
    26832703        QCheckBox* com = new QCheckBox();
    26842704        if (hlp[iCol].toInt() == Qt::Checked) {
     
    26872707        _uploadTable->setCellWidget(iRow, iCol, com);
    26882708      }
    2689       else if (iCol == 11) {
     2709      else if (iCol == 12) {
    26902710        bncTableItem* bncIt = new bncTableItem();
    26912711        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
Note: See TracChangeset for help on using the changeset viewer.