Changeset 3152 in ntrip


Ignore:
Timestamp:
Mar 27, 2011, 4:52:19 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r3150 r3152  
    470470  connect(_cmbMountpointLineEdit, SIGNAL(textChanged(const QString &)),
    471471          this, SLOT(slotBncTextChanged()));
     472
     473  // RTNet Results
     474  // -------------
     475  _rtnetTable = new QTableWidget(0,7);
     476  _rtnetTable->setHorizontalHeaderLabels(QString("Host, Port, Mountpoint, Password, System, CoM, File").split(","));
     477  _rtnetTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
     478  _rtnetTable->setSelectionBehavior(QAbstractItemView::SelectRows);
     479  _rtnetTable->setMaximumWidth(70*ww);
     480  _rtnetTable->horizontalHeader()->resizeSection(0,8*ww);
     481  _rtnetTable->horizontalHeader()->resizeSection(1,8*ww);
     482  _rtnetTable->horizontalHeader()->resizeSection(2,8*ww);
     483  _rtnetTable->horizontalHeader()->resizeSection(3,8*ww);
     484  _rtnetTable->horizontalHeader()->resizeSection(4,8*ww);
     485  _rtnetTable->horizontalHeader()->resizeSection(5,8*ww);
     486  _rtnetTable->horizontalHeader()->resizeSection(6,8*ww);
     487  _rtnetTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
     488  _rtnetTable->horizontalHeader()->setStretchLastSection(true);
     489  _rtnetTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
     490
     491  QPushButton* addRtnetRowButton = new QPushButton("Add Row");
     492  QPushButton* delRtnetRowButton = new QPushButton("Delete");
     493
     494  connect(_rtnetTable, SIGNAL(itemSelectionChanged()),
     495          SLOT(slotBncTextChanged()));
    472496
    473497  // WhatsThis
     
    581605  QWidget* ppp2group = new QWidget();
    582606  QWidget* cmbgroup = new QWidget();
     607  QWidget* rtnetgroup = new QWidget();
    583608  _aogroup->addTab(pgroup,tr("Proxy"));
    584609  _aogroup->addTab(ggroup,tr("General"));
     
    595620  _aogroup->addTab(cmbgroup,tr("Combination"));
    596621#endif
     622  _aogroup->addTab(rtnetgroup,tr("RTNet"));
    597623
    598624  // Log Tab
     
    925951
    926952  cmbgroup->setLayout(cmbLayout);
     953
     954  // RTNet output
     955  // ------------
     956  QGridLayout* rtnetLayout = new QGridLayout;
     957
     958  populateRtnetTable();
     959  rtnetLayout->addWidget(_rtnetTable,0,0,6,7);
     960  rtnetLayout->setColumnStretch(0,1);
     961  rtnetLayout->setColumnStretch(1,1);
     962  rtnetLayout->setColumnStretch(2,1);
     963  rtnetLayout->setColumnStretch(3,1);
     964  rtnetLayout->setColumnStretch(4,1);
     965  rtnetLayout->setColumnStretch(5,1);
     966
     967  rtnetLayout->addWidget(addRtnetRowButton,1,8);
     968  connect(addRtnetRowButton, SIGNAL(clicked()), this, SLOT(slotAddRtnetRow()));
     969  rtnetLayout->addWidget(delRtnetRowButton,2,8);
     970  connect(delRtnetRowButton, SIGNAL(clicked()), this, SLOT(slotDelRtnetRow()));
     971
     972  rtnetLayout->setColumnStretch(7,1);
     973
     974  rtnetLayout->addWidget(new QLabel(" Upload RTNet results to NTRIP caster"),5,8,1,5);
     975
     976  rtnetgroup->setLayout(rtnetLayout);
    927977
    928978  // Main Layout
     
    21132163  }
    21142164}
     2165
     2166//
     2167////////////////////////////////////////////////////////////////////////////
     2168void bncWindow::slotAddRtnetRow() {
     2169  int iRow = _rtnetTable->rowCount();
     2170  _rtnetTable->insertRow(iRow);
     2171  for (int iCol = 0; iCol < _rtnetTable->columnCount(); iCol++) {
     2172    _rtnetTable->setItem(iRow, iCol, new QTableWidgetItem(""));
     2173  }
     2174}
     2175
     2176//
     2177////////////////////////////////////////////////////////////////////////////
     2178void bncWindow::slotDelRtnetRow() {
     2179  int nRows = _rtnetTable->rowCount();
     2180  bool flg[nRows];
     2181  for (int iRow = 0; iRow < nRows; iRow++) {
     2182    if (_rtnetTable->isItemSelected(_rtnetTable->item(iRow,1))) {
     2183      flg[iRow] = true;
     2184    }
     2185    else {
     2186      flg[iRow] = false;
     2187    }
     2188  }
     2189  for (int iRow = nRows-1; iRow >= 0; iRow--) {
     2190    if (flg[iRow]) {
     2191      _rtnetTable->removeRow(iRow);
     2192    }
     2193  }
     2194}
     2195
     2196//
     2197////////////////////////////////////////////////////////////////////////////
     2198void bncWindow::populateRtnetTable() {
     2199}
  • trunk/BNC/bncwindow.h

    r3111 r3152  
    8181    void slotAddCmbRow();
    8282    void slotDelCmbRow();
     83    void slotAddRtnetRow();
     84    void slotDelRtnetRow();
    8385
    8486  protected:
     
    8890    void populateMountPointsTable();
    8991    void populateCmbTable();
     92    void populateRtnetTable();
    9093
    9194    QMenu*     _menuHlp;
     
    199202    QLineEdit*    _cmbSP3PathLineEdit;
    200203
     204    QTableWidget* _rtnetTable;
     205
    201206    bncCaster* _caster;
    202207};
Note: See TracChangeset for help on using the changeset viewer.