KJobWidgets

kjobwidgets.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2013 David Faure <[email protected]>
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 <kjobwidgets_export.h>
12 
13 class QWidget;
14 class QWindow;
15 class KJob;
16 
17 /**
18  * KJobWidgets namespace
19  */
20 namespace KJobWidgets
21 {
22 /**
23  * Associate this job with a window given by @p window.
24  * This is used:
25  * @li by KDialogJobUiDelegate as parent widget for error messages
26  * @li by KWidgetJobTracker as parent widget for progress dialogs
27  * @li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs
28  * and possibly more.
29  * @li by KIO::DropJob as parent widget of popup menus.
30  * This is required on Wayland to properly position the menu.
31  *
32  * @since 5.0
33  */
34 KJOBWIDGETS_EXPORT void setWindow(KJob *job, QWidget *widget);
35 
36 /**
37  * Return the window associated with this job.
38  * @since 5.0
39  */
40 KJOBWIDGETS_EXPORT QWidget *window(KJob *job);
41 
42 /**
43  * Updates the last user action timestamp to the given time.
44  * @since 5.0
45  */
46 KJOBWIDGETS_EXPORT void updateUserTimestamp(KJob *job, unsigned long time);
47 /**
48  * Returns the last user action timestamp
49  * @since 5.0
50  */
51 KJOBWIDGETS_EXPORT unsigned long userTimestamp(KJob *job);
52 }
53 
54 /**
55  * KJobWindows namespace
56  */
57 namespace KJobWindows
58 {
59 /**
60  * Associate this job with a window given by @p window.
61  * This is used:
62  * @li by KDialogJobUiDelegate as parent widget for error messages
63  * @li by KWidgetJobTracker as parent widget for progress dialogs
64  * @li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs
65  * and possibly more.
66  * @li by KIO::DropJob as parent widget of popup menus.
67  * This is required on Wayland to properly position the menu.
68  *
69  * @since 5.42
70  */
71 KJOBWIDGETS_EXPORT void setWindow(KJob *job, QWindow *window);
72 
73 /**
74  * Return the window associated with this job.
75  * @since 5.42
76  */
77 KJOBWIDGETS_EXPORT QWindow *window(KJob *job);
78 }
79 
80 #endif
KJOBWIDGETS_EXPORT void setWindow(KJob *job, QWindow *window)
Associate this job with a window given by window.
Definition: kjobwidgets.cpp:49
KJOBWIDGETS_EXPORT void setWindow(KJob *job, QWidget *widget)
Associate this job with a window given by window.
Definition: kjobwidgets.cpp:14
KJobWindows namespace.
Definition: kjobwidgets.h:57
KJOBWIDGETS_EXPORT unsigned long userTimestamp(KJob *job)
Returns the last user action timestamp.
Definition: kjobwidgets.cpp:44
KJOBWIDGETS_EXPORT QWindow * window(KJob *job)
Return the window associated with this job.
Definition: kjobwidgets.cpp:57
KJOBWIDGETS_EXPORT void updateUserTimestamp(KJob *job, unsigned long time)
Updates the last user action timestamp to the given time.
Definition: kjobwidgets.cpp:36
KJobWidgets namespace.
Definition: kjobwidgets.h:20
KJOBWIDGETS_EXPORT QWidget * window(KJob *job)
Return the window associated with this job.
Definition: kjobwidgets.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 04:15:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.