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

void Rosegarden::Segment::setStartTime ( timeT  t )

Shift the start time of the Segment by moving the start times of all the events in the Segment.

Definition at line 222 of file Segment.cpp.

References erase(), insert(), and Rosegarden::Composition::setSegmentStartTime().

Referenced by Rosegarden::RosegardenDocument::transposeRecordedSegment(), and Rosegarden::RosegardenDocument::updateRecordingAudioSegments().

    int dt = t - m_startTime;
    if (dt == 0) return;

    // reset the time of all events.  can't just setAbsoluteTime on these,
    // partly 'cos we're not allowed, partly 'cos it might screw up the
    // quantizer (which is why we're not allowed)

    // still, this is rather unsatisfactory

    FastVector<Event *> events;

    for (iterator i = begin(); i != end(); ++i) {

    timeT previousEndTime = m_endTime;

    erase(begin(), end());

    m_endTime = previousEndTime + dt;
    if (m_endMarkerTime) *m_endMarkerTime += dt;

    if (m_composition) m_composition->setSegmentStartTime(this, t);
    else m_startTime = t;

    for (int i = 0; i < int(events.size()); ++i) {

    updateRefreshStatuses(m_startTime, m_endTime);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index