Logo Search packages:      
Sourcecode: kdenlive version File versions

DocClipRef * DocClipProject::selectedClip (  ) 

Returns a clip that is currently selected. Only one clip is returned! This function is intended for times when you need a "master" clip. but have no preferred choice.

Definition at line 807 of file docclipproject.cpp.

References DocTrackBase::firstClip(), DocTrackBase::hasSelectedClips(), and m_tracks.

Referenced by KdenliveDoc::emitCurrentClipPosition(), KdenliveDoc::selectedClip(), Gui::KdenliveApp::slotAddTransition(), Gui::KdenliveApp::slotDeleteTransition(), Gui::KdenliveApp::slotEditCopy(), Gui::KdenliveApp::slotEditCut(), and Gui::KdenliveApp::slotRazorSelectedClips().

{
    DocClipRef *pResult = 0;
    DocTrackBase *srcTrack = 0;

    for (uint track = 0; track < numTracks(); track++) {
      srcTrack = m_tracks.at(track);
      if (srcTrack->hasSelectedClips() > 0) {
          pResult = srcTrack->firstClip(true).current();
            break;
      }
    }

    return pResult;
}


Generated by  Doxygen 1.6.0   Back to index