Changeset 6411 in ntrip for trunk


Ignore:
Timestamp:
Dec 23, 2014, 11:41:43 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
4 edited

Legend:

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

    r6151 r6411  
    222222//
    223223////////////////////////////////////////////////////////////////////////////
     224bool bncSettings::contains(const QString& key) const {
     225  QMutexLocker locker(&_mutex);
     226  return BNC_CORE->_settings.contains(key);
     227}
     228
     229//
     230////////////////////////////////////////////////////////////////////////////
    224231void bncSettings::sync() {
    225232  QMutexLocker locker(&_mutex);
  • trunk/BNC/src/bncsettings.h

    r5066 r6411  
    1212  void setValue(const QString &key, const QVariant& value);
    1313  void remove(const QString& key );
    14   void reRead();
     14  bool contains(const QString& key) const;
     15  void reRead();
    1516  void sync();
    1617 private:
  • trunk/BNC/src/bncwindow.cpp

    r6410 r6411  
    10091009  _reqcPlotDirLineEdit->setMaximumWidth(15*ww);
    10101010
    1011   _reqcSkyPlotSystems = new QComboBox();
    1012   _reqcSkyPlotSystems->setEditable(false);
    1013   _reqcSkyPlotSystems->addItems(QString(",ALL,GPS,GLONASS,Galileo,QZSS,SBAS,BDS").split(","));
    1014   ik = _reqcSkyPlotSystems->findText(settings.value("reqcSkyPlotSystems").toString());
    1015   if (ik != -1) {
    1016     _reqcSkyPlotSystems->setCurrentIndex(ik);
    1017   }
    1018   connect(_reqcSkyPlotSystems, SIGNAL(currentIndexChanged(const QString &)),
     1011  QString reqcSkyPlotSignals;
     1012  if (settings.contains("reqcSkyPlotSignals")) {
     1013    reqcSkyPlotSignals = settings.value("reqcSkyPlotSignals").toString();
     1014  }
     1015  else {
     1016    reqcSkyPlotSignals = "G:1&2 R:1&2 J:1&2 E:1&7 C:1&6";
     1017  }
     1018  _reqcSkyPlotSignals = new QLineEdit(reqcSkyPlotSignals);
     1019  connect(_reqcSkyPlotSignals, SIGNAL(textChanged(const QString &)),
    10191020          this, SLOT(slotBncTextChanged()));
    1020 
    1021   _reqcSkyPlotSignals = new QLineEdit(settings.value("reqcSkyPlotSignals").toString());
    1022   _reqcSkyPlotSignals->setMinimumWidth(15*ww);
    1023   _reqcSkyPlotSignals->setMaximumWidth(15*ww);
    10241021
    10251022  _reqcLogSummaryOnly = new QCheckBox();
     
    10511048  reqcLayout->addWidget(_reqcLogSummaryOnly,                     ir, 4, Qt::AlignLeft);
    10521049  ++ir;
     1050  reqcLayout->addWidget(new QLabel("Sky plots for signals"),     ir, 0, Qt::AlignLeft);
     1051  reqcLayout->addWidget(_reqcSkyPlotSignals,                     ir, 1, 1, 2);
     1052  ++ir;
    10531053  reqcLayout->addWidget(new QLabel("Directory for plots"),       ir, 0, Qt::AlignLeft);
    10541054  reqcLayout->addWidget(_reqcPlotDirLineEdit,                    ir, 1, Qt::AlignRight);
    1055   ++ir;
    1056   reqcLayout->addWidget(new QLabel("Sky plots:"),                ir, 0, Qt::AlignLeft);
    1057   reqcLayout->addWidget(_reqcSkyPlotSystems,                     ir, 1, Qt::AlignRight);
    1058   reqcLayout->addWidget(new QLabel("Systems"),                   ir, 2, Qt::AlignLeft);
    1059   reqcLayout->addWidget(_reqcSkyPlotSignals,                     ir, 3, Qt::AlignRight);
    1060   reqcLayout->addWidget(new QLabel("Signals"),                   ir, 4, Qt::AlignLeft);
    10611055  ++ir;
    10621056  reqcLayout->addWidget(new QLabel(""), ir, 1);
     
    16851679  settings.setValue("reqcOutLogFile", _reqcOutLogLineEdit->text());
    16861680  settings.setValue("reqcPlotDir",    _reqcPlotDirLineEdit->text());
    1687   settings.setValue("reqcSkyPlotSystems", _reqcSkyPlotSystems->currentText());
    16881681  settings.setValue("reqcSkyPlotSignals", _reqcSkyPlotSignals->text());
    16891682  settings.setValue("reqcLogSummaryOnly", _reqcLogSummaryOnly->checkState());
     
    22202213  // QC
    22212214  // --
    2222   if (sender() == 0 || sender() == _reqcActionComboBox || sender() == _reqcSkyPlotSystems) {
     2215  if (sender() == 0 || sender() == _reqcActionComboBox || sender() == _reqcSkyPlotSignals) {
    22232216    enable = !_reqcActionComboBox->currentText().isEmpty();
    2224     bool enable10 = _reqcActionComboBox->currentText() == "Edit/Concatenate";
    2225     bool enablePlot = !_reqcSkyPlotSystems->currentText().isEmpty();
    2226     enableWidget(enable &&  enable10, _reqcEditOptionButton);
    2227     enableWidget(enable,              _reqcObsFileChooser);
    2228     enableWidget(enable,              _reqcNavFileChooser);
    2229     enableWidget(enable &&  enable10, _reqcOutObsLineEdit);
    2230     enableWidget(enable &&  enable10, _reqcOutNavLineEdit);
    2231     enableWidget(enable,              _reqcOutLogLineEdit);
     2217    bool enable10   = _reqcActionComboBox->currentText() == "Edit/Concatenate";
     2218    bool enablePlot = !_reqcSkyPlotSignals->text().isEmpty();
     2219    enableWidget(enable,                            _reqcObsFileChooser);
     2220    enableWidget(enable,                            _reqcNavFileChooser);
     2221    enableWidget(enable,                            _reqcOutLogLineEdit);
     2222    enableWidget(enable &&  enable10,               _reqcEditOptionButton);
     2223    enableWidget(enable &&  enable10,               _reqcOutObsLineEdit);
     2224    enableWidget(enable &&  enable10,               _reqcOutNavLineEdit);
     2225    enableWidget(enable && !enable10,               _reqcLogSummaryOnly);
     2226    enableWidget(enable && !enable10,               _reqcSkyPlotSignals);
    22322227    enableWidget(enable && !enable10 && enablePlot, _reqcPlotDirLineEdit);
    2233     enableWidget(enable && !enable10 && enablePlot, _reqcSkyPlotSignals);
    2234     enableWidget(enable && !enable10, _reqcSkyPlotSystems);
    2235     enableWidget(enable && !enable10, _reqcLogSummaryOnly);
    22362228  }
    22372229
  • trunk/BNC/src/bncwindow.h

    r6408 r6411  
    148148    QLineEdit*     _reqcOutLogLineEdit;
    149149    QLineEdit*     _reqcPlotDirLineEdit;
    150     QComboBox*     _reqcSkyPlotSystems;
    151150    QLineEdit*     _reqcSkyPlotSignals;
    152151    QCheckBox*     _reqcLogSummaryOnly;
Note: See TracChangeset for help on using the changeset viewer.