Changeset 5699 in ntrip


Ignore:
Timestamp:
Jul 30, 2014, 10:37:11 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppwidgets.cpp

    r5698 r5699  
    5050////////////////////////////////////////////////////////////////////////////
    5151t_pppWidgets::t_pppWidgets() {
    52   _dataSource   = new QComboBox();     _dataSource  -> setObjectName("PPP/dataSource");
    53   _rinexObs     = new qtFileChooser(); _rinexObs    -> setObjectName("PPP/rinexObs");
    54   _rinexNav     = new qtFileChooser(); _rinexNav    -> setObjectName("PPP/rinexNav");
    55   _corrHostPort = new QLineEdit();     _corrHostPort-> setObjectName("PPP/corrHostPort");
    56   _corrFile     = new qtFileChooser(); _corrFile    -> setObjectName("PPP/corrFile");
    57   _crdFile      = new qtFileChooser(); _crdFile     -> setObjectName("PPP/crdFile");
    58   _antexFile    = new qtFileChooser(); _antexFile   -> setObjectName("PPP/antexFile");
    59   _logFile      = new QLineEdit();     _logFile     -> setObjectName("PPP/logFile");
    60   _nmeaFile     = new QLineEdit();     _nmeaFile    -> setObjectName("PPP/nmeaFile");
    61   _nmeaPort     = new QLineEdit();     _nmeaPort    -> setObjectName("PPP/nmeaPort");
    62   _staTable     = new QTableWidget();  _staTable    -> setObjectName("PPP/staTable");
    63   _lcGPS        = new QComboBox();     _lcGPS       -> setObjectName("PPP/lcGPS");
    64   _lcGLONASS    = new QComboBox();     _lcGLONASS   -> setObjectName("PPP/lcGLONASS");
    65   _lcGalileo    = new QComboBox();     _lcGalileo   -> setObjectName("PPP/lcGalileo");
    66   _sigmaC1      = new QLineEdit();     _sigmaC1     -> setObjectName("PPP/sigmaC1");
    67   _sigmaL1      = new QLineEdit();     _sigmaL1     -> setObjectName("PPP/sigmaL1");
    68   _corrWaitTime = new QSpinBox();      _corrWaitTime-> setObjectName("PPP/corrWaitTime");
     52
     53  _dataSource   = new QComboBox();     _dataSource  ->setObjectName("PPP/dataSource");   _widgets << _dataSource; 
     54  _rinexObs     = new qtFileChooser(); _rinexObs    ->setObjectName("PPP/rinexObs");     _widgets << _rinexObs;   
     55  _rinexNav     = new qtFileChooser(); _rinexNav    ->setObjectName("PPP/rinexNav");     _widgets << _rinexNav;   
     56  _corrHostPort = new QLineEdit();     _corrHostPort->setObjectName("PPP/corrHostPort"); _widgets << _corrHostPort;
     57  _corrFile     = new qtFileChooser(); _corrFile    ->setObjectName("PPP/corrFile");     _widgets << _corrFile;   
     58  _crdFile      = new qtFileChooser(); _crdFile     ->setObjectName("PPP/crdFile");      _widgets << _crdFile;     
     59  _antexFile    = new qtFileChooser(); _antexFile   ->setObjectName("PPP/antexFile");    _widgets << _antexFile;   
     60  _logFile      = new QLineEdit();     _logFile     ->setObjectName("PPP/logFile");      _widgets << _logFile;     
     61  _nmeaFile     = new QLineEdit();     _nmeaFile    ->setObjectName("PPP/nmeaFile");     _widgets << _nmeaFile;   
     62  _nmeaPort     = new QLineEdit();     _nmeaPort    ->setObjectName("PPP/nmeaPort");     _widgets << _nmeaPort;   
     63  _staTable     = new QTableWidget();  _staTable    ->setObjectName("PPP/staTable");     _widgets << _staTable;   
     64  _lcGPS        = new QComboBox();     _lcGPS       ->setObjectName("PPP/lcGPS");        _widgets << _lcGPS;       
     65  _lcGLONASS    = new QComboBox();     _lcGLONASS   ->setObjectName("PPP/lcGLONASS");    _widgets << _lcGLONASS;   
     66  _lcGalileo    = new QComboBox();     _lcGalileo   ->setObjectName("PPP/lcGalileo");    _widgets << _lcGalileo;   
     67  _sigmaC1      = new QLineEdit();     _sigmaC1     ->setObjectName("PPP/sigmaC1");      _widgets << _sigmaC1;     
     68  _sigmaL1      = new QLineEdit();     _sigmaL1     ->setObjectName("PPP/sigmaL1");      _widgets << _sigmaL1;     
     69  _corrWaitTime = new QSpinBox();      _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
    6970 
    7071  _dataSource->setEditable(false);
    71   _dataSource->addItems(QString("Real-Time Streams,RINEX Files").split(","));
     72  _dataSource->addItems(QString("no,Real-Time Streams,RINEX Files").split(","));
     73  connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
    7274
    7375  _lcGPS->setEditable(false);
    74   _lcGPS->addItems(QString("P3,L3,P3&L3").split(","));
     76  _lcGPS->addItems(QString("no,P3,L3,P3&L3").split(","));
    7577
    7678  _lcGLONASS->setEditable(false);
    77   _lcGLONASS->addItems(QString("P3,L3,P3&L3").split(","));
     79  _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
    7880
    7981  _lcGalileo->setEditable(false);
    80   _lcGalileo->addItems(QString("P3,L3,P3&L3").split(","));
     82  _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
    8183
    8284  _corrWaitTime->setMinimum(0);
     
    152154
    153155}
     156
     157//
     158////////////////////////////////////////////////////////////////////////////
     159void t_pppWidgets::slotEnableWidgets() {
     160
     161  const static QPalette paletteWhite(QColor(255, 255, 255));
     162  const static QPalette paletteGray(QColor(230, 230, 230));
     163
     164  bool allDisabled = _dataSource->currentText() == "no";
     165  bool realTime    = _dataSource->currentText() == "Real-Time Streams";
     166
     167  QListIterator<QWidget*> it(_widgets);
     168  while (it.hasNext()) {
     169    it.next()->setEnabled(!allDisabled);
     170  }
     171
     172  _dataSource->setEnabled(true);
     173}
  • trunk/BNC/src/PPP/pppwidgets.h

    r5696 r5699  
    3030class qtFileChooser;
    3131
    32 class t_pppWidgets {
     32class t_pppWidgets : public QObject {
     33 Q_OBJECT
     34
    3335 public:
    3436  t_pppWidgets();
     
    5355  QSpinBox*      _corrWaitTime;
    5456
     57 private slots:
     58  void slotEnableWidgets(); 
     59
    5560 private:
    5661  void readOptions();
     62  QList <QWidget*> _widgets;
    5763};
    5864
  • trunk/BNC/src/bncwindow.cpp

    r5694 r5699  
    11161116  QGridLayout* pppLayout1 = new QGridLayout();
    11171117  ir = 0;
    1118   pppLayout1->addWidget(new QLabel("<b>Precise Point Positioning</b>"), ir, 0, 1, 7, Qt::AlignLeft);
     1118  pppLayout1->addWidget(new QLabel("<b>Precise Point Positioning (Input and Output)</b>"), ir, 0, 1, 7, Qt::AlignLeft);
    11191119  ++ir;     
    11201120  pppLayout1->addWidget(new QLabel("Data Source"),        ir, 0, Qt::AlignLeft);
     
    11501150
    11511151  QVBoxLayout* pppLayout2 = new QVBoxLayout();
    1152   pppLayout2->addWidget(new QLabel("<b>Precise Point Positioning</b>"));
     1152  pppLayout2->addWidget(new QLabel("<b>Precise Point Positioning (Processed Stations)</b>"));
    11531153  pppLayout2->addWidget(_pppWidgets._staTable, 99);
    11541154
     
    11571157  QGridLayout* pppLayout3 = new QGridLayout();
    11581158  ir = 0;
    1159   pppLayout3->addWidget(new QLabel("<b>Precise Point Positioning</b>"), ir, 0, 1, 2, Qt::AlignLeft);
     1159  pppLayout3->addWidget(new QLabel("<b>Precise Point Positioning (Options)</b>"), ir, 0, 1, 2, Qt::AlignLeft);
    11601160  ++ir;     
    11611161  pppLayout3->addWidget(new QLabel("GPS LCs"),              ir, 0, Qt::AlignLeft);
Note: See TracChangeset for help on using the changeset viewer.