1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2013 David Faure <faure@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
6 | */ |
7 | |
8 | #ifndef KJOBWINDOWS_H |
9 | #define KJOBWINDOWS_H |
10 | |
11 | #include <kguiaddons_export.h> |
12 | |
13 | class QWindow; |
14 | class QObject; |
15 | |
16 | /*! |
17 | * \namespace KJobWindows |
18 | * \inmodule KGuiAddons |
19 | * |
20 | * \brief Associate jobs with a window. |
21 | */ |
22 | namespace KJobWindows |
23 | { |
24 | /*! |
25 | * Associate this job with a window given by \a window. |
26 | * |
27 | * \a job should be a KJob subclass |
28 | * |
29 | * This is used: |
30 | * \list |
31 | * \li by KDialogJobUiDelegate as parent widget for error messages |
32 | * \li by KWidgetJobTracker as parent widget for progress dialogs |
33 | * \li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs |
34 | * and possibly more. |
35 | * \li by KIO::DropJob as parent widget of popup menus. |
36 | * This is required on Wayland to properly position the menu. |
37 | * \endlist |
38 | * |
39 | * \since 6.0 |
40 | */ |
41 | KGUIADDONS_EXPORT void setWindow(QObject *job, QWindow *window); |
42 | |
43 | /*! |
44 | * Returns the window associated with this job. |
45 | * |
46 | * \a job should be a KJob subclass |
47 | * |
48 | * \since 6.0 |
49 | */ |
50 | KGUIADDONS_EXPORT QWindow *window(QObject *job); |
51 | } |
52 | |
53 | #endif |
54 | |