#include "imagemanager.h" #include #include ImageManager::ImageManager(QObject *parent) : QObject(parent), screens(new QList), vManager(new VideoManger), imagesCount(0), imagesFolder("C://Documents/") { connect(vManager.get(), SIGNAL(videoSaved()), this, SLOT(onVideoSaved())); } void ImageManager::append(QVariant image) { // Q_UNUSED(image) QImage tmpImg = qvariant_cast(image); screens.get()->push_back(tmpImg); } void ImageManager::saveAll() const { int counter = 0; for(int i = 0; i < screens.get()->count(); ++i){ screens.get()->at(i).save(imagesFolder + QString("%1.png").arg(counter++)); } } void ImageManager::createVideo() const { // vManager.get()->makeVideo(screens.get(), imagesFolder); } void ImageManager::onVideoSaved() { // for(int i = 0; i < screens.get()->count(); ++i){ // QFile file(imagesFolder + QString::number(i) + ".png"); // } screens.get()->clear(); }