1 /* 2 SPDX-FileCopyrightText: 2009 Andreas Pakulat <apaku@gmx.de> 3 4 SPDX-License-Identifier: LGPL-2.0-or-later 5 */ 6 7 #ifndef KDEVPLATFORM_PLUGIN_NATIVEAPPJOB_H 8 #define KDEVPLATFORM_PLUGIN_NATIVEAPPJOB_H 9 10 #include <outputview/outputexecutejob.h> 11 12 #include <QMessageBox> 13 14 namespace KDevelop 15 { 16 class ILaunchConfiguration; 17 } 18 19 class NativeAppJob : public KDevelop::OutputExecuteJob 20 { 21 Q_OBJECT 22 23 public: 24 NativeAppJob( QObject* parent, KDevelop::ILaunchConfiguration* cfg ); 25 26 void start() override; 27 28 // Actions for what to do when a job is already running 29 static constexpr auto startAnother = QMessageBox::Yes; 30 static constexpr auto killAllInstances = QMessageBox::No; 31 static constexpr auto askIfRunning = QMessageBox::Cancel; 32 33 Q_SIGNALS: 34 void killBeforeExecutingAgainChanged(int killBeforeExecutingAgainChanged); 35 private: 36 QString m_name; 37 int m_killBeforeExecutingAgain = startAnother; 38 }; 39 40 #endif 41