File indexing completed on 2024-04-28 04:36:30
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_ILAUNCHER_H 0008 #define KDEVPLATFORM_ILAUNCHER_H 0009 0010 #include "interfacesexport.h" 0011 0012 #include <QList> 0013 0014 class KJob; 0015 class QString; 0016 0017 namespace KDevelop 0018 { 0019 0020 class ILaunchConfiguration; 0021 class LaunchConfigurationPageFactory; 0022 0023 /** 0024 * The ILauncher interface allows one to actually run launch configurations. 0025 * Additionally it allows one to provide configuration pages specific to the 0026 * launcher and to identify for which modes this launcher may be used 0027 */ 0028 class KDEVPLATFORMINTERFACES_EXPORT ILauncher 0029 { 0030 public: 0031 virtual ~ILauncher(); 0032 0033 /** 0034 * Returns a unique identifier for the launcher, 0035 * used for example for ILaunchConfigurationType::launcherForId(). 0036 */ 0037 virtual QString id() = 0; 0038 0039 /** 0040 * a user visible name for the launcher 0041 * @returns a translatable string as description for the launcher 0042 */ 0043 virtual QString name() const = 0; 0044 0045 /** 0046 * provides a short description about this launcher 0047 * @returns a description of what the launcher can do 0048 */ 0049 virtual QString description() const = 0; 0050 0051 /** 0052 * returns the ids of the supported launch modes 0053 * @returns a list of id's for ILaunchMode's that are supported 0054 */ 0055 virtual QStringList supportedModes() const = 0; 0056 0057 /** 0058 * provide a list of config pages for this launcher 0059 * @returns the config pages that this launcher needs 0060 */ 0061 virtual QList<LaunchConfigurationPageFactory*> configPages() const = 0; 0062 0063 /** 0064 * create a KJob that executes @p cfg in @p launchMode when started. 0065 * @param launchMode the mode in which the launcher should execute the configuration 0066 * @param cfg the launch configuration to be executed 0067 * @returns a KJob that starts the configured launchable 0068 */ 0069 virtual KJob* start( const QString& launchMode, ILaunchConfiguration* cfg ) = 0; 0070 }; 0071 0072 } 0073 0074 #endif 0075