Changeset 8566 in ntrip for trunk/BNC/src/rinex/graphwin.cpp


Ignore:
Timestamp:
Dec 13, 2018, 2:36:28 PM (5 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/graphwin.cpp

    r8556 r8566  
    5555// Constructor
    5656////////////////////////////////////////////////////////////////////////////
    57 t_graphWin::t_graphWin(QWidget* parent, const QString& fileName,
    58                        const QVector<QWidget*>& plots, const QByteArray* scaleTitle,
    59                        const QwtInterval* scaleInterval, bool specialLayout) :  QDialog(parent) {
     57t_graphWin::t_graphWin(QWidget* parent, const QString& fileName, const QVector<QWidget*>& plots,
     58                       bool specialLayout, const QByteArray* scaleTitle,
     59                       const QwtInterval* scaleInterval,
     60                       const QVector<int>* rows) : QDialog(parent) {
    6061
    6162  _fileName = fileName;
     
    6667
    6768  int ww = QFontMetrics(font()).width('w');
    68   setMinimumSize(plots.size()*40*ww, 40*ww);
    6969
    7070  // Buttons
     
    115115  }
    116116  else {
    117     QHBoxLayout* plotLayout = new QHBoxLayout(_canvas);
     117    int iRow = -1;
     118    QVBoxLayout* plotLayout = new QVBoxLayout(_canvas);
     119    QHBoxLayout* rowLayout  = new QHBoxLayout();
    118120    for (int ip = 0; ip < plots.size(); ip++) {
    119       plotLayout->addWidget(plots[ip]);
     121      if (rows) {
     122        if (iRow != -1 && iRow != rows->at(ip)) {
     123          plotLayout->addLayout(rowLayout);
     124          rowLayout = new QHBoxLayout();
     125        }
     126        iRow = rows->at(ip);
     127      }
     128      plots[ip]->setMinimumSize(30*ww, 30*ww);
     129      rowLayout->addWidget(plots[ip]);
    120130    }
    121131    if (_colorScale) {
    122       plotLayout->addWidget(_colorScale);
     132      rowLayout->addWidget(_colorScale);
    123133    }
     134    plotLayout->addLayout(rowLayout);
    124135  }
    125136
Note: See TracChangeset for help on using the changeset viewer.