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

void QEWaveForm::current_position ( long int  blocks  )  [slot]

Set current position in blocks

Definition at line 57 of file qewaveform.cpp.

References repaint_current_position().

                                                 { 
  // --------
  DBC_REQUIRE(waveblock != 0);
  DBC_REQUIRE(blocks >= 0);
  // --------

  current_position_rep = blocks;
  if (current_position_rep >= visible_area_begin_rep &&
      current_position_rep <= visible_area_end_rep) {
    double pos = current_position_rep - visible_area_begin_rep;
    pos /= (visible_area_end_rep - visible_area_begin_rep);
    pos *= width();
    xpos = static_cast<int>(pos);
  }
  else {
    xpos = 0;
  }
  //  cerr << "cur_pos_rep[1]: " << current_position_rep << ", xpos: " <<   xpos << ".\n";

  repaint_current_position();
}


Generated by  Doxygen 1.6.0   Back to index