Exemplo n.º 1
0
QString Snapshot::saveSnapshot() {
    QFile* snapshotFile = savedFileForSnapshot(false);
    
    // we don't need the snapshot file, so close it, grab its filename and delete it
    snapshotFile->close();
    
    QString snapshotPath = QFileInfo(*snapshotFile).absoluteFilePath();
    
    delete snapshotFile;
    
    return snapshotPath;
}
Exemplo n.º 2
0
QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) {
    // return whatever we get back from saved file for snapshot
    return static_cast<QTemporaryFile*>(savedFileForSnapshot(image, true));
}