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

void QEWaveForm::current_position_relative ( int  xcoord  )  [slot]

Set current position in as xcoord relative to current widget width

Definition at line 79 of file qewaveform.cpp.

References repaint_current_position().

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

  xpos = xpos_coord;
  double pos = visible_area_begin_rep;
  pos += (static_cast<double>(xpos) / width()) * (visible_area_end_rep - visible_area_begin_rep);
  current_position_rep = static_cast<int>(pos);

  //  cerr << "cur_pos_rep[2]: " << current_position_rep << ", xpos: " <<  xpos << ".\n";

  repaint_current_position();
}


Generated by  Doxygen 1.6.0   Back to index