File indexing completed on 2024-04-28 04:38:39
0001 /* 0002 SPDX-FileCopyrightText: 2009 Andreas Pakulat <apaku@gmx.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_PLUGIN_NATIVEAPPJOB_H 0008 #define KDEVPLATFORM_PLUGIN_NATIVEAPPJOB_H 0009 0010 #include <outputview/outputexecutejob.h> 0011 0012 #include <QMessageBox> 0013 0014 namespace KDevelop 0015 { 0016 class ILaunchConfiguration; 0017 } 0018 0019 class NativeAppJob : public KDevelop::OutputExecuteJob 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 NativeAppJob( QObject* parent, KDevelop::ILaunchConfiguration* cfg ); 0025 0026 void start() override; 0027 0028 // Actions for what to do when a job is already running 0029 static constexpr auto startAnother = QMessageBox::Yes; 0030 static constexpr auto killAllInstances = QMessageBox::No; 0031 static constexpr auto askIfRunning = QMessageBox::Cancel; 0032 0033 Q_SIGNALS: 0034 void killBeforeExecutingAgainChanged(int killBeforeExecutingAgainChanged); 0035 private: 0036 QString m_name; 0037 int m_killBeforeExecutingAgain = startAnother; 0038 }; 0039 0040 #endif