File indexing completed on 2024-04-28 03:54:17

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2013 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef KJOBWINDOWS_H
0009 #define KJOBWINDOWS_H
0010 
0011 #include <kguiaddons_export.h>
0012 
0013 class QWindow;
0014 class QObject;
0015 
0016 /**
0017  * KJobWindows namespace
0018  */
0019 namespace KJobWindows
0020 {
0021 /**
0022  * Associate this job with a window given by @p window.
0023  *
0024  * @param job should be a KJob subclass
0025  *
0026  * This is used:
0027  * @li by KDialogJobUiDelegate as parent widget for error messages
0028  * @li by KWidgetJobTracker as parent widget for progress dialogs
0029  * @li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs
0030  * and possibly more.
0031  * @li by KIO::DropJob as parent widget of popup menus.
0032  * This is required on Wayland to properly position the menu.
0033  *
0034  * @since 6.0
0035  */
0036 KGUIADDONS_EXPORT void setWindow(QObject *job, QWindow *window);
0037 
0038 /**
0039  * Return the window associated with this job.
0040  *
0041  * @param job should be a KJob subclass
0042  *
0043  * @since 6.0
0044  */
0045 KGUIADDONS_EXPORT QWindow *window(QObject *job);
0046 }
0047 
0048 #endif