KIO

commandlauncherjob.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2020 David Faure <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #ifndef KIO_COMMANDLAUNCHERJOB_H
9 #define KIO_COMMANDLAUNCHERJOB_H
10 
11 #include "kiogui_export.h"
12 #include <KJob>
13 
14 class KRunPrivate; // KF6 REMOVE
15 class CommandLauncherJobTest; // KF6 REMOVE
16 
17 namespace KIO {
18 
19 class CommandLauncherJobPrivate;
20 
40 class KIOGUI_EXPORT CommandLauncherJob : public KJob
41 {
42 public:
53  explicit CommandLauncherJob(const QString &command, QObject *parent = nullptr);
54 
64  explicit CommandLauncherJob(const QString &executable, const QStringList &args, QObject *parent = nullptr);
65 
71  ~CommandLauncherJob() override;
72 
80  void setExecutable(const QString &executable);
81 
88  void setIcon(const QString &iconName);
89 
96  void setDesktopName(const QString &desktopName);
97 
102  void setStartupId(const QByteArray &startupId);
103 
108  void setWorkingDirectory(const QString &workingDirectory);
109 
114  void start() override;
115 
121  qint64 pid() const;
122 
123 private:
124  friend class ::KRunPrivate; // KF6 REMOVE
125  friend class ::CommandLauncherJobTest; // KF6 REMOVE
129  bool waitForStarted();
130 
131  friend class CommandLauncherJobPrivate;
133 };
134 
135 } // namespace KIO
136 
137 #endif
A namespace for KIO globals.
Definition: authinfo.h:21
CommandLauncherJob runs a command and watches it while running.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 23:01:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.