Changeset 8177 in ntrip for trunk


Ignore:
Timestamp:
Oct 30, 2017, 1:17:02 PM (6 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

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

    r8127 r8177  
    3535 * Created:    24-Dec-2005
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    145145  _buttonGet->setDefault(true);
    146146  connect(_buttonGet, SIGNAL(clicked()), this, SLOT(slotGetTable()));
    147  
     147
    148148  _buttonMap = new QPushButton(tr("Map"), this);
    149149  _buttonMap->setEnabled(false);
    150150  connect(_buttonMap, SIGNAL(clicked()), this, SLOT(slotShowMap()));
    151  
     151
    152152  _buttonClose = new QPushButton(tr("Close"), this);
    153153  connect(_buttonClose, SIGNAL(clicked()), this, SLOT(close()));
     
    196196// Read full caster table (static)
    197197////////////////////////////////////////////////////////////////////////////
    198 t_irc bncTableDlg::getFullTable(const QString& ntripVersion, 
    199                                 const QString& casterHost, 
    200                                 int casterPort, QStringList& allLines, 
     198t_irc bncTableDlg::getFullTable(const QString& ntripVersion,
     199                                const QString& casterHost,
     200                                int casterPort, QStringList& allLines,
    201201                                bool alwaysRead) {
    202202
     
    243243      allLines.append(line);
    244244      line = in.readLine();
    245     } 
     245    }
    246246    allTables.insert(casterHost, allLines);
    247247    delete query;
     
    260260  _buttonGet->setEnabled(false);
    261261  _buttonMap->setEnabled(true);
    262   _buttonCasterTable->setEnabled(false); 
     262  _buttonCasterTable->setEnabled(false);
    263263
    264264  if ( getFullTable(_ntripVersionComboBox->currentText(),
     
    270270    return;
    271271  }
    272  
     272
    273273  static const QStringList labels = QString("mountpoint,identifier,format,"
    274274    "format-details,carrier,system,network,country,lat,long,"
     
    297297      for (int ic = 1; ic < columns.size(); ic++) {
    298298            if (ic == 11) {
    299           if (columns[ic] == "0") { 
    300             columns[ic] = "no"; 
    301           } else { 
    302             columns[ic] = "yes"; 
     299          if (columns[ic] == "0") {
     300            columns[ic] = "no";
     301          } else {
     302            columns[ic] = "yes";
    303303          }
    304304        }
     
    413413////////////////////////////////////////////////////////////////////////////
    414414void bncTableDlg::slotCasterTable() {
    415        
     415
    416416  _buttonCasterTable->setEnabled(false);
    417417  _casterHostComboBox->setEnabled(false);
     
    425425  _buttonSelect->setEnabled(false);
    426426
    427   bncCasterTableDlg* dlg = 
     427  bncCasterTableDlg* dlg =
    428428          new bncCasterTableDlg(_ntripVersionComboBox->currentText(), this);
    429429  dlg->move(this->pos().x()+50, this->pos().y()+50);
     
    468468  url.setPort(newCasterPort.toInt());
    469469  addUrl(url);
    470  
     470
    471471  _casterHostComboBox->setCurrentIndex(0);
    472472}
     
    513513////////////////////////////////////////////////////////////////////////////
    514514bncCasterTableDlg::bncCasterTableDlg(const QString& ntripVersion,
    515                                      QWidget* parent) : 
     515                                     QWidget* parent) :
    516516   QDialog(parent) {
    517517
    518   static const QStringList labels = QString("host,port,identifier,operator,nmea,country,lat,long,link").split(",");
     518  static const QStringList labels = QString("host,port,identifier,operator,nmea,country,lat,long,fallback host, fallback port,link").split(",");
    519519
    520520  _casterTable = new QTableWidget(this);
     
    574574      QStringList columns = lines[nRow].split(";");
    575575      for (int ic = 1; ic < columns.size(); ic++) {
    576          if (ic == 5) { 
    577            if (columns[ic] == "0") { 
    578              columns[ic] = "no"; 
    579            } else { 
    580              columns[ic] = "yes"; 
     576         if (ic == 5) {
     577           if (columns[ic] == "0") {
     578             columns[ic] = "no";
     579           } else {
     580             columns[ic] = "yes";
    581581           }
    582582         }
     
    586586      }
    587587    }
    588   } 
     588  }
    589589  _casterTable->setHorizontalHeaderLabels(labels);
    590590  _casterTable->setSortingEnabled(true);
     
    624624  dlgLayout->addWidget(_casterTable,     1, 0, 1, 3);
    625625  dlgLayout->addWidget(_whatsThisButton, 2, 0);
    626   dlgLayout->addWidget(_closeButton,     2, 1, Qt::AlignRight); 
     626  dlgLayout->addWidget(_closeButton,     2, 1, Qt::AlignRight);
    627627  dlgLayout->addWidget(_okButton,        2, 2);
    628628
     
    631631  setLayout(dlgLayout);
    632632  resize(68*ww, 50*ww);
     633  _casterTable->hideColumn(8);
     634  _casterTable->hideColumn(9);
    633635  show();
    634636}
     
    655657    for (int ir = _casterTable->rowCount() - 1; ir >= 0 ; ir--) {
    656658      if (_casterTable->isItemSelected(_casterTable->item(ir,0))) {
    657         emit newCaster(_casterTable->item(ir,0)->text(), 
     659        emit newCaster(_casterTable->item(ir,0)->text(),
    658660                       _casterTable->item(ir,1)->text());
    659661      }
Note: See TracChangeset for help on using the changeset viewer.