Logo Search packages:      
Sourcecode: kdenlive version File versions

void KdenliveDoc::updateTracksThumbnails (  )  [slot]

Updates all clipthumbnails in the document

Definition at line 764 of file kdenlivedoc.cpp.

References timelineClipUpdated(), and trackList().

Referenced by Gui::KdenliveApp::updateConfiguration().

{
    if (!qApp->mainWidget()) {
      QTimer::singleShot(3*1000, this, SLOT(updateTracksThumbnails()));
      return;
    }
    QPtrListIterator < DocTrackBase > trackItt(trackList());
    QApplication::postEvent(qApp->mainWidget(), new ProgressEvent(-1, 10006));
    int clipTotal = 0;

    while (trackItt.current()) {
        clipTotal += trackItt.current()->firstClip(false).count();
      clipTotal += trackItt.current()->firstClip(true).count();
      ++trackItt;
    }
    trackItt.toFirst();

    int ix = 0;
    while (trackItt.current()) {
        QPtrListIterator < DocClipRef > clipItt(trackItt.current()->firstClip(true));
        while (clipItt.current() && KdenliveSettings::videothumbnails()) {
            (*clipItt)->generateThumbnails();
            ++clipItt;
          ix++;
        }
        
        QPtrListIterator < DocClipRef > clipItt2(trackItt.current()->firstClip(false));
        while (clipItt2.current() && KdenliveSettings::videothumbnails()) {
            (*clipItt2)->generateThumbnails();
          QApplication::postEvent(qApp->mainWidget(), new ProgressEvent(ix * 100 / clipTotal, 10006));
          qApp->processEvents();
            ++clipItt2;
          ix++;
        }
        ++trackItt;
    }
    QApplication::postEvent(qApp->mainWidget(), new ProgressEvent(0, 10006));
    emit timelineClipUpdated();
}


Generated by  Doxygen 1.6.0   Back to index