Logo Search packages:      
Sourcecode: ecawave version File versions  Download package

void QEFileView::init_layout ( void   )  [private]

Initializes the widget layout. If init_layout() is called multiple times, the result should be same if the session state remains the same between individual calls.

Definition at line 161 of file qefile.cpp.

{
  if (top_layout_repp != 0) {
    delete top_layout_repp;
  }
  top_layout_repp = new QVBoxLayout(this);

//    if (gbox_repp == 0)
//      gbox_repp = new QGroupBox(1, Qt::Horizontal, this, 0);
//    gbox_repp->setTitle(filename_rep.c_str());
//    top_layout_repp->addWidget(gbox_repp);

  QString cinfo = "Channel ";
  for(int n = 0; n < channels_rep; n++) {
    if (n >= static_cast<int>(waveforms.size())) {
      clabels.push_back(new QLabel(this));
      waveforms.push_back(new QEWaveForm(this));
    }
    clabels[n]->setFont(QFont(clabels[n]->font().family(), 10));
    clabels[n]->setText(cinfo + QString::number(n));
    waveforms[n]->installEventFilter(this);
    top_layout_repp->addWidget(clabels[n], 1);
    top_layout_repp->addWidget(waveforms[n], 10);
  }

  for(int n = channels_rep; n < static_cast<int>(waveforms.size()); n++) {
    waveforms[n]->hide();
    clabels[n]->hide();
  }
  for(int n = 0; n < channels_rep; n++) {
    waveforms[n]->update_wave_blocks(&(waveblocks[n]));
  }
  resize(sizeHint());

  // --------
  DBC_ENSURE(static_cast<int>(waveforms.size()) >= channels_rep);
  // --------
}


Generated by  Doxygen 1.6.0   Back to index