File indexing completed on 2024-06-23 05:29:36
0001 /* 0002 SPDX-FileCopyrightText: 2020 Alexander Lohnau <alexander.lohnau@gmx.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QObject> 0010 0011 class QFileInfo; 0012 0013 class AbstractJob : public QObject 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 /** 0019 * @param fileInfo QFileInfo of the file or directory 0020 * @param mimeType Mime type of the file 0021 * @param install Set to true if the entry should be installed, flase if it should be uninstalled 0022 */ 0023 virtual void executeOperation(const QFileInfo &fileInfo, const QString &mimeType, bool install) = 0; 0024 0025 Q_SIGNALS: 0026 void finished(); 0027 void error(const QString &errorMessage); 0028 0029 protected: 0030 void runScriptInTerminal(const QString &script, const QString &pwd); 0031 QString terminalCloseMessage(bool install); 0032 };