File indexing completed on 2024-04-28 04:52:13

0001 /*
0002     SPDX-FileCopyrightText: 2011 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003 
0004 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_backupdialog_ui.h"
0010 
0011 #include <QUrl>
0012 
0013 /** @class BackupWidget
0014     @brief A widget allowing to parse backup project files
0015     @author Jean-Baptiste Mardelle
0016  */
0017 class BackupWidget : public QDialog, public Ui::BackupDialog_UI
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     BackupWidget(const QUrl &projectUrl, QUrl projectFolder, const QString &projectId, QWidget *parent = nullptr);
0023     // Constructor for extracting widget
0024     ~BackupWidget() override;
0025     /** @brief Return the path for selected backup file. */
0026     QString selectedFile() const;
0027 
0028 private Q_SLOTS:
0029     /** @brief Parse the backup files in project folder. */
0030     void slotParseBackupFiles();
0031     /** @brief Display a thumbnail preview of selected backup. */
0032     void slotDisplayBackupPreview();
0033 
0034 private:
0035     QString m_projectWildcard;
0036     QUrl m_projectFolder;
0037 };