Logo Search packages:      
Sourcecode: kdenlive version File versions

QCursor TrackPanelRazorFunction::getMouseCursor ( Gui::KTrackPanel panel,
QMouseEvent *  event 
) [virtual]

Returns a relevant mouse cursor for the given mouse position

Implements TrackPanelFunction.

Definition at line 56 of file trackpanelrazorfunction.cpp.

References Gui::KTrackPanel::documentTrackIndex(), KdenliveDoc::framesPerSecond(), DocTrackBase::getClipAt(), Gui::KTrackPanel::hasDocumentTrackIndex(), lookingAtClip(), Gui::KTimeLine::mapLocalToValue(), and KdenliveDoc::track().

{
    if (panel->hasDocumentTrackIndex()) {
      DocTrackBase *track =
          m_document->track(panel->documentTrackIndex());
      if (track) {
            GenTime mouseTime((int)(m_timeline->mapLocalToValue(event->x())),
            m_document->framesPerSecond());
          DocClipRef *clip = track->getClipAt(mouseTime);
          if (clip) {
            emit lookingAtClip(clip,
                mouseTime - clip->trackStart() +
                clip->cropStartTime());
          }
      }
    }
    return m_razorCursor;
}


Generated by  Doxygen 1.6.0   Back to index