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

int DocClipProject::playlistTrackNum ( int  ix  )  const [slot]

Return the position of a track in the MLT playlist

Definition at line 317 of file docclipproject.cpp.

References m_tracks.

Referenced by Command::KAddEffectCommand::addEffect(), Command::KAddEffectCommand::deleteEffect(), Command::KMoveClipsCommand::execute(), and Command::KMoveClipsCommand::unexecute().

{
    int result = 0;
    int audioTracks = 0;
    bool isAudioTrack = false;
    QPtrListIterator < DocTrackBase > trackItt(m_tracks);
    while (ix>0) {
      if (trackItt.current()->clipType() != "Sound") audioTracks ++; 
        ++trackItt;
      if (!trackItt) return 0; 
        ix--;
    }
    if (trackItt.current()->clipType() == "Sound") isAudioTrack = true;
    while (trackItt) {
        if  (trackItt.current()->clipType() != "Sound") result++;
      else if (isAudioTrack) audioTracks ++; ;
        ++trackItt;
    }
    if (isAudioTrack) result += audioTracks;
    return result;
}


Generated by  Doxygen 1.6.0   Back to index