KIO

jobuidelegate.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Stephan Kulow <[email protected]>
4  SPDX-FileCopyrightText: 2000 David Faure <[email protected]>
5  SPDX-FileCopyrightText: 2006 Kevin Ottens <[email protected]>
6  SPDX-FileCopyrightText: 2013 Dawit Alemayehu <[email protected]>
7 
8  SPDX-License-Identifier: LGPL-2.0-or-later
9 */
10 
11 #ifndef KIO_JOBUIDELEGATE_H
12 #define KIO_JOBUIDELEGATE_H
13 
14 #include <KDialogJobUiDelegate>
15 #include <kio/jobuidelegateextension.h>
16 #include <kio/skipdialog.h>
17 #include <kio/renamedialog.h>
18 #include <kio/global.h>
19 
20 class KJob;
21 namespace KIO
22 {
23 class Job;
24 
30 class KIOWIDGETS_EXPORT JobUiDelegate : public KDialogJobUiDelegate, public JobUiDelegateExtension
31 {
32  Q_OBJECT
33 
34 public:
38  JobUiDelegate();
39 
46  explicit JobUiDelegate(KJobUiDelegate::Flags flags, QWidget *window);
47 
51  virtual ~JobUiDelegate();
52 
53 public:
54 
60  void setWindow(QWidget *window) override;
61 
70  static void unregisterWindow(QWidget *window);
71 
91  RenameDialog_Result askFileRename(KJob *job,
92  const QString &caption,
93  const QUrl &src,
94  const QUrl &dest,
96  QString &newDest,
97  KIO::filesize_t sizeSrc = KIO::filesize_t(-1),
98  KIO::filesize_t sizeDest = KIO::filesize_t(-1),
99  const QDateTime &ctimeSrc = QDateTime(),
100  const QDateTime &ctimeDest = QDateTime(),
101  const QDateTime &mtimeSrc = QDateTime(),
102  const QDateTime &mtimeDest = QDateTime()) override;
103 
108  SkipDialog_Result askSkip(KJob *job,
109  KIO::SkipDialog_Options options,
110  const QString &error_text) override;
111 
124  bool askDeleteConfirmation(const QList<QUrl> &urls, DeletionType deletionType,
125  ConfirmationType confirmationType) override;
126 
144  // KF6 TODO Add a QString parameter for "details" and keep in sync with API in SlaveBase, SlaveInterface, and JobUiDelegateExtension.
145  int requestMessageBox(MessageBoxType type, const QString &text,
146  const QString &caption,
147  const QString &buttonYes,
148  const QString &buttonNo,
149  const QString &iconYes = QString(),
150  const QString &iconNo = QString(),
151  const QString &dontAskAgainName = QString(),
152  const KIO::MetaData &metaData = KIO::MetaData()) override;
153 
157  ClipboardUpdater *createClipboardUpdater(Job *job, ClipboardUpdaterMode mode) override;
161  void updateUrlInClipboard(const QUrl &src, const QUrl &dest) override;
162 
163 private:
164  class Private;
165  Private *const d;
166 };
167 }
168 
169 #endif
qulonglong filesize_t
64-bit file size
Definition: global.h:40
DeletionType
The type of deletion: real deletion, moving the files to the trash or emptying the trash Used by askD...
A namespace for KIO globals.
Definition: authinfo.h:21
MetaData is a simple map of key/value strings.
Definition: metadata.h:23
A UI delegate tuned to be used with KIO Jobs.
Definition: jobuidelegate.h:30
ConfirmationType
ForceConfirmation: always ask the user for confirmation DefaultConfirmation: don&#39;t ask the user if he...
An abstract class defining interaction with users from KIO jobs:
RenameDialog_Result
The result of a rename or skip dialog.
The base class for all jobs.
Definition: job_base.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:01:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.