Changeset 10524 in ntrip


Ignore:
Timestamp:
Aug 19, 2024, 4:14:37 PM (3 months ago)
Author:
stuerze
Message:

replacement of obsolete qt-class members

Location:
trunk/BNC/src
Files:
15 edited

Legend:

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

    r10234 r10524  
    5858  slotNextAnimationFrame();
    5959  for (int ii = 0; ii <= 1000; ii++) {
    60     _ran[0][ii] = qrand() % 255;
    61     _ran[1][ii] = qrand() % 255;
    62     _ran[2][ii] = qrand() % 255;
     60    _ran[0][ii] = rand() % 255;
     61    _ran[1][ii] = rand() % 255;
     62    _ran[2][ii] = rand() % 255;
    6363  }
    6464}
  • trunk/BNC/src/bncfigurelate.cpp

    r9124 r10524  
    5959  slotNextAnimationFrame();
    6060  for (int ii = 0; ii <= 1000; ii++) {
    61     _ran[0][ii] = qrand() % 255;
    62     _ran[1][ii] = qrand() % 255;
    63     _ran[2][ii] = qrand() % 100;
     61    _ran[0][ii] = rand() % 255;
     62    _ran[1][ii] = rand() % 255;
     63    _ran[2][ii] = rand() % 100;
    6464  }
    6565}
  • trunk/BNC/src/bncfigureppp.cpp

    r9959 r10524  
    175175      unsigned hour, minute;
    176176      double   second;
    177       int      ww = QFontMetrics(this->font()).width('w');
     177      int      ww = QFontMetrics(this->font()).horizontalAdvance('w');
    178178
    179179      // neu components
  • trunk/BNC/src/bnchlpdlg.cpp

    r10087 r10524  
    5050                    QDialog(parent) {
    5151
    52   const int ww = QFontMetrics(font()).width('w');
     52  const int ww = QFontMetrics(font()).horizontalAdvance('w');
    5353
    5454  _tb = new bncHtml;
  • trunk/BNC/src/bncipport.cpp

    r10503 r10524  
    7070  _ipCountryLineEdit = new QLineEdit();
    7171
    72   int ww = QFontMetrics(font()).width('w');
     72  int ww = QFontMetrics(font()).horizontalAdvance('w');
    7373  _ipPortLineEdit->setMaximumWidth(9*ww);
    7474  _ipMountLineEdit->setMaximumWidth(9*ww);
  • trunk/BNC/src/bncmain.cpp

    r10479 r10524  
    458458      QString val(argv[ii+2]);
    459459      if (val.indexOf(";") != -1) {
    460         settings.setValue(key, val.split(";", QString::SkipEmptyParts));
     460        settings.setValue(key, val.split(";", Qt::SkipEmptyParts));
    461461      }
    462462      else {
  • trunk/BNC/src/bncmap_svg.cpp

    r9935 r10524  
    7676  // Buttons
    7777  // -------
    78   int ww = QFontMetrics(font()).width('w');
     78  int ww = QFontMetrics(font()).horizontalAdvance('w');
    7979
    8080  _buttonClose = new QPushButton(tr("Close"), this);
  • trunk/BNC/src/bncserialport.cpp

    r10503 r10524  
    8484  _serialDataBitsComboBox->setCurrentIndex(3);
    8585
    86   int ww = QFontMetrics(font()).width('w');
     86  int ww = QFontMetrics(font()).horizontalAdvance('w');
    8787  _serialMountpointLineEdit->setMaximumWidth(11*ww);
    8888  _serialPortLineEdit->setMaximumWidth(11*ww);
  • trunk/BNC/src/bncsinextro.cpp

    r10149 r10524  
    9393    signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
    9494  }
    95   QStringList priorList = signalPriorities.split(" ", QString::SkipEmptyParts);
     95  QStringList priorList = signalPriorities.split(" ", Qt::SkipEmptyParts);
    9696  QStringList frqStrList;
    9797  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     
    102102    for (int ii = 0; ii < priorList.size(); ii++) {
    103103      if (priorList[ii].indexOf(":") != -1) {
    104         hlp = priorList[ii].split(":", QString::SkipEmptyParts);
     104        hlp = priorList[ii].split(":", Qt::SkipEmptyParts);
    105105        if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) {
    106           hlp = hlp[1].split("&", QString::SkipEmptyParts);
     106          hlp = hlp[1].split("&", Qt::SkipEmptyParts);
    107107        }
    108108        if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) {
  • trunk/BNC/src/bnctabledlg.cpp

    r10440 r10524  
    6464  QVBoxLayout* mainLayout = new QVBoxLayout(this);
    6565
    66   int ww = QFontMetrics(font()).width('w');
     66  int ww = QFontMetrics(font()).horizontalAdvance('w');
    6767
    6868  _casterPortLineEdit = new QLineEdit();
     
    316316    _table->setHorizontalHeaderLabels(labels);
    317317    _table->setSortingEnabled(true);
    318     int ww = QFontMetrics(this->font()).width('w');
     318    int ww = QFontMetrics(this->font()).horizontalAdvance('w');
    319319    _table->horizontalHeader()->resizeSection( 0,10*ww);
    320320    _table->horizontalHeader()->resizeSection( 1,10*ww);
     
    392392      QString             nmea = _table->item(ir,10)->text();
    393393      format.replace(" ", "_");
    394       if (_table->isItemSelected(item)) {
     394      if (item->isSelected()) {
    395395        url.setPath("/"+item->text());
    396396        mountPoints->push_back(url.toString() + " " + format + " " + country + " " + latitude
     
    593593  _casterTable->setSortingEnabled(true);
    594594  _casterTable->sortItems(0);
    595    int ww = QFontMetrics(this->font()).width('w');
     595   int ww = QFontMetrics(this->font()).horizontalAdvance('w');
    596596  _casterTable->horizontalHeader()->resizeSection(0,15*ww);
    597597  _casterTable->horizontalHeader()->resizeSection(1, 5*ww);
     
    659659  if (_casterTable) {
    660660    for (int ir = _casterTable->rowCount() - 1; ir >= 0 ; ir--) {
    661       if (_casterTable->isItemSelected(_casterTable->item(ir,0))) {
     661      if (_casterTable->item(ir,0)->isSelected()) {
    662662        emit newCaster(_casterTable->item(ir,0)->text(),
    663663                       _casterTable->item(ir,1)->text());
  • trunk/BNC/src/bncudpport.cpp

    r10503 r10524  
    6969  _ipCountryLineEdit = new QLineEdit();
    7070
    71   int ww = QFontMetrics(font()).width('w');
     71  int ww = QFontMetrics(font()).horizontalAdvance('w');
    7272  _ipPortLineEdit->setMaximumWidth(9*ww);
    7373  _ipMountLineEdit->setMaximumWidth(9*ww);
  • trunk/BNC/src/bncwindow.cpp

    r10509 r10524  
    127127  _mapWin = 0;
    128128
    129   int ww = QFontMetrics(this->font()).width('w');
     129  int ww = QFontMetrics(this->font()).horizontalAdvance('w');
    130130
    131131  static const QStringList labels = QString("account, Streams:   resource loader / mountpoint, decoder, country, lat, long, nmea, ntrip, bytes").split(",");
     
    25152515    settings.setValue("font", newFont.toString());
    25162516    QApplication::setFont(newFont);
    2517     int ww = QFontMetrics(newFont).width('w');
     2517    int ww = QFontMetrics(newFont).horizontalAdvance('w');
    25182518    setMinimumSize(60*ww, 80*ww);
    25192519    resize(60*ww, 80*ww);
     
    26012601  tb->setReadOnly(true);
    26022602
    2603   int ww = QFontMetrics(font()).width('w');
     2603  int ww = QFontMetrics(font()).horizontalAdvance('w');
    26042604  QPushButton* _closeButton = new QPushButton("Close");
    26052605  _closeButton->setMaximumWidth(10*ww);
     
    26312631   QDialog(parent) {
    26322632
    2633   int ww = QFontMetrics(font()).width('w');
     2633  int ww = QFontMetrics(font()).horizontalAdvance('w');
    26342634  QPushButton* _closeButton = new QPushButton("Close");
    26352635  _closeButton->setMaximumWidth(10*ww);
  • trunk/BNC/src/pppMain.cpp

    r10382 r10524  
    407407
    408408    QString     priorStr  = QString::fromStdString(opt->_signalPriorities);
    409     QStringList priorList = priorStr.split(" ", QString::SkipEmptyParts);
     409    QStringList priorList = priorStr.split(" ", Qt::SkipEmptyParts);
    410410    QStringList hlpList;
    411411    vector<char> systems = opt->systems();
     
    414414      for (int ii = 0; ii < priorList.size(); ii++) {
    415415        if (priorList[ii].indexOf(":") != -1) {
    416           hlpList = priorList[ii].split(":", QString::SkipEmptyParts);
     416          hlpList = priorList[ii].split(":", Qt::SkipEmptyParts);
    417417          if (hlpList.size() == 2 && hlpList[0].length() == 1 && hlpList[0][0] == sys) {
    418             hlpList = hlpList[1].split("&", QString::SkipEmptyParts);
     418            hlpList = hlpList[1].split("&", Qt::SkipEmptyParts);
    419419            if (hlpList.size() == 2) {
    420420              for (int jj = 0; jj < hlpList[0].size(); jj++) {
  • trunk/BNC/src/qtfilechooser.cpp

    r8252 r10524  
    2424// Constructor
    2525////////////////////////////////////////////////////////////////////////////////
    26 qtFileChooser::qtFileChooser(QWidget* parent, qtFileChooser::Mode mode) : 
     26qtFileChooser::qtFileChooser(QWidget* parent, qtFileChooser::Mode mode) :
    2727  QWidget(parent), _mode(mode) {
    2828
     
    3737
    3838  _button = new QPushButton("...", this);
    39   _button->setFixedWidth(_button->fontMetrics().width(" ... "));
     39  _button->setFixedWidth(_button->fontMetrics().horizontalAdvance(" ... "));
    4040  layout->addWidget(_button);
    4141
     
    4949}
    5050
    51 // 
     51//
    5252////////////////////////////////////////////////////////////////////////////////
    5353void qtFileChooser::setFileName(const QString& fileName) {
     
    5555}
    5656
    57 // 
     57//
    5858////////////////////////////////////////////////////////////////////////////////
    5959QString qtFileChooser::fileName() const {
     
    6161}
    6262
    63 // 
     63//
    6464////////////////////////////////////////////////////////////////////////////////
    6565void qtFileChooser::chooseFile() {
  • trunk/BNC/src/reqcdlg.cpp

    r9850 r10524  
    6464  setWindowTitle(tr("RINEX Editing Options"));
    6565
    66   int ww = QFontMetrics(font()).width('w');
     66  int ww = QFontMetrics(font()).horizontalAdvance('w');
    6767
    6868  const QString timeFmtString = "yyyy-MM-dd hh:mm:ss";
Note: See TracChangeset for help on using the changeset viewer.