File indexing completed on 2025-01-26 04:57:22
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "updatedatabaseinfo.h" 0010 #include "webengineviewer_export.h" 0011 #include <QObject> 0012 #include <memory> 0013 namespace WebEngineViewer 0014 { 0015 class CreateDatabaseFileJobPrivate; 0016 /** 0017 * @brief The CreateDatabaseFileJob class 0018 * @author Laurent Montel <montel@kde.org> 0019 */ 0020 class WEBENGINEVIEWER_EXPORT CreateDatabaseFileJob : public QObject 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit CreateDatabaseFileJob(QObject *parent = nullptr); 0025 ~CreateDatabaseFileJob() override; 0026 void start(); 0027 void setFileName(const QString &filename); 0028 [[nodiscard]] bool canStart() const; 0029 void setUpdateDataBaseInfo(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase); 0030 0031 Q_SIGNALS: 0032 void finished(bool success, const QString &newStateDatabase, const QString &minimumWaitDurationStr); 0033 0034 private: 0035 std::unique_ptr<CreateDatabaseFileJobPrivate> const d; 0036 }; 0037 }