KIO

openurljob.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_OPENURLJOB_H
9 #define KIO_OPENURLJOB_H
10 
11 #include "kiogui_export.h"
12 #include "applicationlauncherjob.h"
13 #include <KCompositeJob>
14 #include <QScopedPointer>
15 
16 class QUrl;
17 
18 namespace KIO {
19 
20 class OpenUrlJobPrivate;
21 
38 class KIOGUI_EXPORT OpenUrlJob : public KCompositeJob
39 {
40  Q_OBJECT
41 public:
46  explicit OpenUrlJob(const QUrl &url, QObject *parent = nullptr);
47 
53  explicit OpenUrlJob(const QUrl &url, const QString &mimeType, QObject *parent = nullptr);
54 
60  ~OpenUrlJob() override;
61 
65  void setDeleteTemporaryFile(bool b);
66 
75  void setSuggestedFileName(const QString &suggestedFileName);
76 
81  void setStartupId(const QByteArray &startupId);
82 
88  void setRunExecutables(bool allow);
89 
118  void setShowOpenOrExecuteDialog(bool b);
119 
126  void setEnableExternalBrowser(bool b);
127 
133  void setFollowRedirections(bool b);
134 
140  void start() override;
141 
142 Q_SIGNALS:
149  void mimeTypeFound(const QString &mimeType);
150 
151 protected:
152  bool doKill() override;
153 
154 private:
155  void slotResult(KJob *job) override;
156 
157  friend class OpenUrlJobPrivate;
159 };
160 
161 } // namespace KIO
162 
163 #endif // OPENURLJOB_H
OpenUrlJob finds out the right way to "open" a URL.
Definition: openurljob.h:38
A namespace for KIO globals.
Definition: authinfo.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 23:01:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.