1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org> |
4 | SPDX-FileCopyrightText: 2000-2005 David Faure <faure@kde.org> |
5 | SPDX-FileCopyrightText: 2001 Waldo Bastian <bastian@kde.org> |
6 | |
7 | SPDX-License-Identifier: GPL-2.0-or-later |
8 | */ |
9 | |
10 | #ifndef KIOEXEC_MAIN_H |
11 | #define KIOEXEC_MAIN_H |
12 | |
13 | #include <QList> |
14 | #include <QObject> |
15 | #include <QString> |
16 | |
17 | #include <QDateTime> |
18 | #include <QUrl> |
19 | |
20 | namespace KIO |
21 | { |
22 | class Job; |
23 | } |
24 | |
25 | class KJob; |
26 | class QCommandLineParser; |
27 | |
28 | class KIOExec : public QObject |
29 | { |
30 | Q_OBJECT |
31 | public: |
32 | KIOExec(const QStringList &args, bool tempFiles, const QString &suggestedFileName); |
33 | |
34 | bool exited() const |
35 | { |
36 | return mExited; |
37 | } |
38 | |
39 | public Q_SLOTS: |
40 | void slotResult(KJob *); |
41 | void slotRunApp(); |
42 | |
43 | protected: |
44 | bool mExited; |
45 | bool mTempFiles; |
46 | bool mUseDaemon; |
47 | QString mSuggestedFileName; |
48 | int counter; |
49 | int expectedCounter; |
50 | QString command; |
51 | struct FileInfo { |
52 | QString path; |
53 | QUrl url; |
54 | QDateTime time; |
55 | }; |
56 | QList<FileInfo> fileList; |
57 | int jobCounter; |
58 | QList<KIO::Job *> jobList; |
59 | }; |
60 | |
61 | #endif |
62 | |