KWidgetsAddons

kjobwidgets.h
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 KJOBWIDGETS_H
9#define KJOBWIDGETS_H
10
11#include <kwidgetsaddons_export.h>
12
13class QObject;
14class QWidget;
15class QWindow;
16
17/**
18 * KJobWidgets namespace
19 */
20namespace KJobWidgets
21{
22/**
23 * Associate this job with a window given by @p window.
24 *
25 * @param job should be a KJob subclass
26 *
27 * This is used:
28 * @li by KDialogJobUiDelegate as parent widget for error messages
29 * @li by KWidgetJobTracker as parent widget for progress dialogs
30 * @li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs
31 * and possibly more.
32 * @li by KIO::DropJob as parent widget of popup menus.
33 * This is required on Wayland to properly position the menu.
34 *
35 * @since 6.0
36 */
37KWIDGETSADDONS_EXPORT void setWindow(QObject *job, QWidget *widget);
38
39#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(6, 5)
40/**
41 * Associate this job with a window given by @p window.
42 *
43 * Note that setWindow() will set the window handle too.
44 *
45 * @param job should be a KJob subclass
46 *
47 * @since 6.4
48 * @deprecated since 6.5, use KJobWindows::setWindow() instead.
49 */
50KWIDGETSADDONS_EXPORT KWIDGETSADDONS_DEPRECATED_VERSION(6, 5, "Use KJobWindows::setWindow() instead") void setWindowHandle(QObject *job, QWindow *window);
51#endif
52
53/**
54 * Return the window associated with this job.
55 *
56 * @param job should be a KJob subclass
57 *
58 * @since 6.0
59 */
60KWIDGETSADDONS_EXPORT QWidget *window(QObject *job);
61
62#if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(6, 5)
63/**
64 * Returns the window handle associated with this job.
65 *
66 * @param job should be a KJob subclass
67 *
68 * @since 6.4
69 * @deprecated since 6.5, use KJobWindows::window() instead.
70 */
71KWIDGETSADDONS_EXPORT KWIDGETSADDONS_DEPRECATED_VERSION(6, 5, "Use KJobWindows::window() instead") QWindow *windowHandle(QObject *job);
72#endif
73
74/**
75 * Updates the last user action timestamp to the given time.
76 *
77 * @param job should be a KJob subclass
78 *
79 * @since 6.0
80 */
81KWIDGETSADDONS_EXPORT void updateUserTimestamp(QObject *job, unsigned long time);
82/**
83 * Returns the last user action timestamp
84 *
85 * @param job should be a KJob subclass
86 *
87 * @since 6.0
88 */
89KWIDGETSADDONS_EXPORT unsigned long userTimestamp(QObject *job);
90}
91
92#endif
KJobWidgets namespace.
Definition kjobwidgets.h:21
void setWindow(QObject *job, QWidget *widget)
Associate this job with a window given by window.
void updateUserTimestamp(QObject *job, unsigned long time)
Updates the last user action timestamp to the given time.
unsigned long userTimestamp(QObject *job)
Returns the last user action timestamp.
void setWindowHandle(QObject *job, QWindow *window)
Associate this job with a window given by window.
QWidget * window(QObject *job)
Return the window associated with this job.
QWindow * windowHandle(QObject *job)
Returns the window handle associated with this job.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:05:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.