File indexing completed on 2024-04-28 03:59:06
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 KJOBWIDGETS_H 0009 #define KJOBWIDGETS_H 0010 0011 #include <kwidgetsaddons_export.h> 0012 0013 class QWidget; 0014 class QObject; 0015 0016 /** 0017 * KJobWidgets namespace 0018 */ 0019 namespace KJobWidgets 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 KWIDGETSADDONS_EXPORT void setWindow(QObject *job, QWidget *widget); 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 KWIDGETSADDONS_EXPORT QWidget *window(QObject *job); 0046 0047 /** 0048 * Updates the last user action timestamp to the given time. 0049 * 0050 * @param job should be a KJob subclass 0051 * 0052 * @since 6.0 0053 */ 0054 KWIDGETSADDONS_EXPORT void updateUserTimestamp(QObject *job, unsigned long time); 0055 /** 0056 * Returns the last user action timestamp 0057 * 0058 * @param job should be a KJob subclass 0059 * 0060 * @since 6.0 0061 */ 0062 KWIDGETSADDONS_EXPORT unsigned long userTimestamp(QObject *job); 0063 } 0064 0065 #endif