+ //if (frameoverlay_button->isChecked()) QTimer::singleShot(1000, this, SLOT(slotUpdateOverlay()));
+ QTimer::singleShot(1000, this, SLOT(slotUpdateFrameList()));
+}
+
+void StopmotionWidget::slotUpdateFrameList(int ix)
+{
+ kDebug()<< "// GET FRAME: "<<ix;
+ if (ix == -1) ix = m_sequenceFrame - 1;
+ QString path = getPathForFrame(ix);
+ if (!QFile::exists(path)) {
+ capture_button->setEnabled(true);
+ return;
+ }
+ QImage img(path);
+ if (img.isNull()) {
+ if (ix == m_sequenceFrame - 1) QTimer::singleShot(1000, this, SLOT(slotUpdateFrameList()));
+ return;
+ }
+ int height = 90;
+ int width = height * img.width() / img.height();
+ frame_list->setIconSize(QSize(width, height));
+ QPixmap pix = QPixmap::fromImage(img).scaled(width, height);
+ QString nb = QString::number(ix);
+ QPainter p(&pix);
+ QFontInfo finfo(font());
+ p.fillRect(0, 0, finfo.pixelSize() * nb.count() + 6, finfo.pixelSize() + 6, QColor(0, 0, 0, 150));
+ p.setPen(Qt::white);
+ p.drawText(QPoint(3, finfo.pixelSize() + 3), nb);
+ p.end();
+ QIcon icon(pix);
+ QListWidgetItem *item = new QListWidgetItem(icon, QString(), frame_list);
+ item->setData(Qt::UserRole, path);
+ item->setData(Qt::UserRole + 1, ix);
+ item->setToolTip(path);
+ capture_button->setEnabled(true);