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


Ignore:
Timestamp:
Mar 30, 2013, 11:31:00 AM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5063 r5066  
    101101  setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
    102102
    103   connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
    104            this, SLOT(slotWindowMessage(QByteArray,bool)));
     103  connect(PGM_CORE, SIGNAL(newMessage(QByteArray,bool)),
     104          this, SLOT(slotWindowMessage(QByteArray,bool)));
    105105
    106106  // Create Actions
     
    19211921////////////////////////////////////////////////////////////////////////////
    19221922void bncWindow::slotGetThreadsFinished() {
    1923   ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
     1923  PGM_CORE->slotMessage("All Get Threads Terminated", true);
    19241924  delete _caster;    _caster    = 0;
    19251925  delete _casterEph; _casterEph = 0;
     
    19571957                          _outPortLineEdit->text().toInt());
    19581958
    1959   ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
    1960   ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
    1961   ((bncApp*)qApp)->initCombination();
     1959  PGM_CORE->setPort(_outEphPortLineEdit->text().toInt());
     1960  PGM_CORE->setPortCorr(_corrPortLineEdit->text().toInt());
     1961  PGM_CORE->initCombination();
    19621962
    19631963  connect(_caster, SIGNAL(getThreadsFinished()),
     
    19671967           this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
    19681968
    1969   ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
     1969  PGM_CORE->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
    19701970
    19711971  bncSettings settings;
    19721972
    19731973  QDir rnxdir(settings.value("rnxPath").toString());
    1974   if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);
     1974  if (!rnxdir.exists()) PGM_CORE->slotMessage("Cannot find RINEX Observations directory", true);
    19751975
    19761976  QString rnx_file = settings.value("rnxScript").toString();
    19771977  if ( !rnx_file.isEmpty() ) {
    19781978    QFile rnxfile(settings.value("rnxScript").toString());
    1979     if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);
     1979    if (!rnxfile.exists()) PGM_CORE->slotMessage("Cannot find RINEX Observations script", true);
    19801980  }
    19811981
    19821982  QDir ephdir(settings.value("ephPath").toString());
    1983   if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);
     1983  if (!ephdir.exists()) PGM_CORE->slotMessage("Cannot find RINEX Ephemeris directory", true);
    19841984
    19851985  QDir corrdir(settings.value("corrPath").toString());
    1986   if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);
     1986  if (!corrdir.exists()) PGM_CORE->slotMessage("Cannot find Broadcast Corrections directory", true);
    19871987
    19881988  QString advise_file = settings.value("adviseScript").toString();
    19891989  if ( !advise_file.isEmpty() ) {
    19901990    QFile advisefile(settings.value("adviseScript").toString());
    1991     if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);
     1991    if (!advisefile.exists()) PGM_CORE->slotMessage("Cannot find Outages script", true);
    19921992  }
    19931993
     
    19951995  if ( !ant_file.isEmpty() ) {
    19961996    QFile anxfile(settings.value("pppAntex").toString());
    1997     if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);
     1997    if (!anxfile.exists()) PGM_CORE->slotMessage("Cannot find IGS ANTEX file", true);
    19981998  }
    19991999
     
    20122012                                   QMessageBox::NoButton);
    20132013  if (iRet == QMessageBox::Yes) {
    2014     ((bncApp*)qApp)->stopCombination();
     2014    PGM_CORE->stopCombination();
    20152015    delete _caster;    _caster    = 0;
    20162016    delete _casterEph; _casterEph = 0;
     
    25842584      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
    25852585      _uploadTable->setItem(iRow, iCol, bncIt);
    2586       ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
     2586      PGM_CORE->_uploadTableItems[iRow] = bncIt;
    25872587    }
    25882588    else {
     
    25952595////////////////////////////////////////////////////////////////////////////
    25962596void bncWindow::slotDelUploadRow() {
    2597   ((bncApp*)qApp)->_uploadTableItems.clear();
     2597  PGM_CORE->_uploadTableItems.clear();
    25982598  int nRows = _uploadTable->rowCount();
    25992599  bool flg[nRows];
     
    26122612  }
    26132613  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
    2614     ((bncApp*)qApp)->_uploadTableItems[iRow] =
     2614    PGM_CORE->_uploadTableItems[iRow] =
    26152615                                (bncTableItem*) _uploadTable->item(iRow, 11);
    26162616  }
     
    26682668        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
    26692669        _uploadTable->setItem(iRow, iCol, bncIt);
    2670         ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
     2670        PGM_CORE->_uploadTableItems[iRow] = bncIt;
    26712671      }
    26722672      else {
Note: See TracChangeset for help on using the changeset viewer.