File indexing completed on 2024-04-28 04:38:39
0001 /* 0002 SPDX-FileCopyrightText: 2009 Andreas Pakulat <apaku@gmx.de> 0003 SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef PLASMOIDEXECUTIONJOB_H 0009 #define PLASMOIDEXECUTIONJOB_H 0010 0011 #include <QProcess> 0012 #include <outputview/outputjob.h> 0013 0014 class ExecutePlasmoidPlugin; 0015 0016 namespace KDevelop 0017 { 0018 class ILaunchConfiguration; 0019 class OutputModel; 0020 class CommandExecutor; 0021 } 0022 0023 0024 class PlasmoidExecutionJob : public KDevelop::OutputJob 0025 { 0026 Q_OBJECT 0027 public: 0028 PlasmoidExecutionJob( ExecutePlasmoidPlugin* parent, KDevelop::ILaunchConfiguration* cfg ); 0029 void start() override; 0030 bool doKill() override; 0031 KDevelop::OutputModel* model(); 0032 0033 static QString executable(KDevelop::ILaunchConfiguration* cfg); 0034 static QStringList arguments(KDevelop::ILaunchConfiguration* cfg); 0035 static QString workingDirectory(KDevelop::ILaunchConfiguration* cfg); 0036 0037 public Q_SLOTS: 0038 void slotCompleted(int); 0039 void slotFailed(QProcess::ProcessError); 0040 0041 private: 0042 KDevelop::CommandExecutor* m_process; 0043 }; 0044 0045 #endif