Changeset 7640 in ntrip


Ignore:
Timestamp:
Dec 18, 2015, 3:18:17 PM (9 years ago)
Author:
stuerze
Message:

some code cleanup

Location:
trunk/BNC/src
Files:
5 edited

Legend:

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

    r7182 r7640  
    2929 * Class:      bncFigure
    3030 *
    31  * Purpose:   
     31 * Purpose:
    3232 *
    3333 * Author:     Perlt, Mervart
     
    3535 * Created:    11-Nov-2009
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    4141#include <iostream>
    4242
    43 #include "bncfigure.h" 
     43#include "bncfigure.h"
    4444#include "bncsettings.h"
    4545
     
    6060// Destructor
    6161////////////////////////////////////////////////////////////////////////////
    62 bncFigure::~bncFigure() {
    63 }
    64 
    65 //
     62bncFigure::~bncFigure() {
     63  QMapIterator<QByteArray, sumAndMean*> it(_bytes);
     64  while (it.hasNext()) {
     65    it.next();
     66    delete it.value();
     67  }
     68}
     69
     70//
    6671////////////////////////////////////////////////////////////////////////////
    6772void bncFigure::updateMountPoints() {
     
    8994}
    9095
    91 // 
     96//
    9297////////////////////////////////////////////////////////////////////////////
    9398void bncFigure::slotNewData(const QByteArray staID, double nbyte) {
     
    99104}
    100105
    101 // 
     106//
    102107////////////////////////////////////////////////////////////////////////////
    103108void bncFigure::slotNextAnimationFrame() {
     
    129134}
    130135
    131 // 
     136//
    132137////////////////////////////////////////////////////////////////////////////
    133138void bncFigure::paintEvent(QPaintEvent *) {
     
    187192      int yy = int(yLength * (it.value()->_mean / maxRateRounded));
    188193      QColor color = QColor::fromRgb(_ran[0][anchor],_ran[1][anchor],_ran[2][anchor],150);
    189       painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy, 
     194      painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy,
    190195                       QBrush(color,Qt::SolidPattern));
    191196      painter.setPen(Qt::black);
  • trunk/BNC/src/bncmain.cpp

    r7541 r7640  
    379379  }
    380380
     381  bncWindow*          bncWin = 0;
     382  t_reqcEdit*         reqcEdit = 0;
     383  t_reqcAnalyze*      reqcAnalyze = 0;
     384  t_sp3Comp*          sp3Comp = 0;
     385  bncEphUploadCaster* casterEph = 0;
     386  bncCaster*          caster = 0;
     387  bncRawFile*         rawFile =  0;
     388  bncGetThread*       getThread = 0;
     389
    381390  // Interactive Mode - open the main window
    382391  // ---------------------------------------
     
    395404    app.setWindowIcon(QPixmap(":ntrip-logo.png"));
    396405
    397     bncWindow* bncWin = new bncWindow();
     406    bncWin = new bncWindow();
    398407    BNC_CORE->setMainWindow(bncWin);
    399408    bncWin->show();
     
    403412  // -------------------
    404413  else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
    405     bncCaster* caster = new bncCaster();
     414    caster = new bncCaster();
    406415    BNC_CORE->setCaster(caster);
    407416    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
     
    413422  else if (settings.value("reqcAction").toString() == "Edit/Concatenate") {
    414423    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    415     t_reqcEdit* reqcEdit = new t_reqcEdit(0);
     424    reqcEdit = new t_reqcEdit(0);
    416425    reqcEdit->start();
    417426  }
     
    421430  else if (settings.value("reqcAction").toString() == "Analyze") {
    422431    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    423     t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(0);
     432    reqcAnalyze = new t_reqcAnalyze(0);
    424433    reqcAnalyze->start();
    425434  }
     
    429438  else if (!settings.value("sp3CompFile").toString().isEmpty()) {
    430439    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    431     t_sp3Comp* sp3Comp = new t_sp3Comp(0);
     440    sp3Comp = new t_sp3Comp(0);
    432441    sp3Comp->start();
    433442  }
     
    439448    signal(SIGINT, catch_signal);
    440449
    441     bncEphUploadCaster* casterEph = new bncEphUploadCaster(); (void) casterEph;
    442 
    443     bncCaster* caster = new bncCaster();
     450    casterEph = new bncEphUploadCaster(); (void) casterEph;
     451
     452    caster = new bncCaster();
    444453
    445454    BNC_CORE->setCaster(caster);
     
    470479      BNC_CORE->startPPP();
    471480
    472       bncRawFile*   rawFile   = new bncRawFile(rawFileName, "", bncRawFile::input);
    473       bncGetThread* getThread = new bncGetThread(rawFile);
     481      rawFile   = new bncRawFile(rawFileName, "", bncRawFile::input);
     482      getThread = new bncGetThread(rawFile);
    474483      caster->addGetThread(getThread, true);
    475484    }
     
    478487  // Start the application
    479488  // ---------------------
    480   return app.exec();
     489  app.exec();
     490  if (interactive) {
     491    delete bncWin;
     492  }
     493  if (caster) {
     494    delete caster;
     495  }
     496  if (casterEph) {
     497    delete casterEph;
     498  }
     499  if (rawFile) {
     500    delete rawFile;
     501  }
     502  return 0;
    481503}
  • trunk/BNC/src/bncwindow.cpp

    r7615 r7640  
    13981398  delete _caster; BNC_CORE->setCaster(0);
    13991399  delete _casterEph;
     1400  delete _bncFigureLate;
     1401  delete _bncFigurePPP;
     1402  delete _actHelp;
     1403  delete _actAbout;
     1404  delete _actFlowchart;
     1405  delete _actFontSel;
     1406  delete _actSaveOpt;
     1407  delete _actQuit;
     1408  delete _actAddMountPoints;
     1409  delete _actDeleteMountPoints;
     1410  delete _actMapMountPoints;
     1411  delete _actStart;
     1412  delete _actStop;
     1413  delete _actwhatsthis;
     1414  delete _proxyHostLineEdit;
     1415  delete _proxyPortLineEdit;
     1416  delete _sslCaCertPathLineEdit;
     1417  delete _sslIgnoreErrorsCheckBox;
     1418  delete _logFileLineEdit;
     1419  delete _rawOutFileLineEdit;
     1420  delete _rnxAppendCheckBox;
     1421  delete _onTheFlyComboBox;
     1422  delete _autoStartCheckBox;
     1423  delete _rnxPathLineEdit;
     1424  delete _rnxIntrComboBox;
     1425  delete _rnxSamplSpinBox;
     1426  delete _rnxFileCheckBox;
     1427  delete _rnxSkelLineEdit;
     1428  delete _rnxScrpLineEdit;
     1429  delete _rnxV3CheckBox;
     1430  delete _rnxV3filenameCheckBox;
     1431  delete _rnxV2Priority;
     1432  delete _ephPathLineEdit;
     1433  delete _ephIntrComboBox;
     1434  delete _ephOutPortLineEdit;
     1435  delete _ephV3CheckBox;
     1436  delete _ephV3filenameCheckBox;
     1437  delete _corrPathLineEdit;
     1438  delete _corrIntrComboBox;
     1439  delete _corrPortLineEdit;
     1440  delete _outPortLineEdit;
     1441  delete _outWaitSpinBox;
     1442  delete _outSamplSpinBox;
     1443  delete _outFileLineEdit;
     1444  delete _outUPortLineEdit;
     1445  delete _serialMountPointLineEdit;
     1446  delete _serialPortNameLineEdit;
     1447  delete _serialBaudRateComboBox;
     1448  delete _serialFlowControlComboBox;
     1449  delete _serialDataBitsComboBox;
     1450  delete _serialParityComboBox;
     1451  delete _serialStopBitsComboBox;
     1452  delete _serialAutoNMEAComboBox;
     1453  delete _serialFileNMEALineEdit;
     1454  delete _serialHeightNMEALineEdit;
     1455  delete _serialManualNMEASamplingSpinBox;
     1456  delete _adviseObsRateComboBox;
     1457  delete _adviseFailSpinBox;
     1458  delete _adviseRecoSpinBox;
     1459  delete _adviseScriptLineEdit;
     1460  delete _miscMountLineEdit;
     1461  delete _miscPortLineEdit;
     1462  delete _miscIntrComboBox;
     1463  delete _miscScanRTCMCheckBox;
     1464  _mountPointsTable->setRowCount(0);
     1465  _mountPointsTable->deleteLater();
     1466  delete _log;
     1467  _cmbTable->setRowCount(0);
     1468  _cmbTable->deleteLater();
     1469  delete _cmbMaxresLineEdit;
     1470  delete _cmbUseGlonass;
     1471  delete _cmbSamplSpinBox;
     1472  delete _cmbMethodComboBox;
     1473  _uploadTable->setRowCount(0);
     1474  _uploadTable->deleteLater();
     1475  delete _uploadIntrComboBox;
     1476  delete _uploadAntexFile;
     1477  delete _uploadSamplRtcmEphCorrSpinBox;
     1478  delete _uploadSamplSp3SpinBox;
     1479  delete _uploadSamplClkRnxSpinBox;
     1480  delete _uploadEphHostLineEdit;
     1481  delete _uploadEphPortLineEdit;
     1482  delete _uploadEphPasswordLineEdit;
     1483  delete _uploadEphMountpointLineEdit;
     1484  delete _uploadEphSampleSpinBox;
     1485  delete _uploadEphBytesCounter;
     1486  delete _loggroup;
     1487  delete _reqcActionComboBox;
     1488  delete _reqcObsFileChooser;
     1489  delete _reqcNavFileChooser;
     1490  delete _reqcOutObsLineEdit;
     1491  delete _reqcOutNavLineEdit;
     1492  delete _reqcOutLogLineEdit;
     1493  delete _reqcPlotDirLineEdit;
     1494  delete _reqcSkyPlotSignals;
     1495  delete _reqcLogSummaryOnly;
     1496  delete _reqcEditOptionButton;
     1497  delete _sp3CompFileChooser;
     1498  delete _sp3CompExclude;
     1499  delete _sp3CompLogLineEdit;
     1500  //delete _canvas;
    14001501}
    14011502
     
    21692270////////////////////////////////////////////////////////////////////////////
    21702271bncAboutDlg::~bncAboutDlg() {
     2272
    21712273};
    21722274
  • trunk/BNC/src/pppWidgets.cpp

    r7614 r7640  
    207207//
    208208////////////////////////////////////////////////////////////////////////////
     209t_pppWidgets::~t_pppWidgets() {
     210  delete _dataSource;
     211  delete _rinexObs;
     212  delete _rinexNav;
     213  delete _corrMount;
     214  delete _corrFile;
     215  delete _crdFile;
     216  delete _antexFile;
     217  delete _logPath;
     218  delete _nmeaPath;
     219  delete _snxtroPath;
     220  delete _snxtroSampl;
     221  delete _snxtroIntr;
     222  delete _v3filenames;
     223  for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
     224    _staTable->removeRow(iRow);
     225  }
     226  delete _staTable;
     227  delete _lcGPS;
     228  delete _lcGLONASS;
     229  delete _lcGalileo;
     230  delete _lcBDS;
     231  delete _sigmaC1;
     232  delete _sigmaL1;
     233  delete _maxResC1;
     234  delete _maxResL1;
     235  delete _minObs;
     236  delete _minEle;
     237  delete _eleWgtCode;
     238  delete _eleWgtPhase;
     239  delete _seedingTime;
     240  delete _corrWaitTime;
     241  delete _addStaButton;
     242  delete _delStaButton;
     243  delete _plotCoordinates;
     244  delete _mapWinButton;
     245  delete _useGoogleMap;
     246  delete _useOpenStreetMap;
     247  delete _audioResponse;
     248  delete _mapWinDotSize;
     249  delete _mapWinDotColor;
     250  delete _mapSpeedSlider;
     251}
     252
     253//
     254////////////////////////////////////////////////////////////////////////////
    209255void t_pppWidgets::readOptions() {
    210256
  • trunk/BNC/src/pppWidgets.h

    r7506 r7640  
    3535 public:
    3636  t_pppWidgets();
     37  ~t_pppWidgets();
    3738  void saveOptions();
    3839
Note: See TracChangeset for help on using the changeset viewer.