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 QWidget;
14class QObject;
15
16/**
17 * KJobWidgets namespace
18 */
19namespace KJobWidgets
20{
21/**
22 * Associate this job with a window given by @p window.
23 *
24 * @param job should be a KJob subclass
25 *
26 * This is used:
27 * @li by KDialogJobUiDelegate as parent widget for error messages
28 * @li by KWidgetJobTracker as parent widget for progress dialogs
29 * @li by KIO::AbstractJobInteractionInterface as parent widget for rename/skip dialogs
30 * and possibly more.
31 * @li by KIO::DropJob as parent widget of popup menus.
32 * This is required on Wayland to properly position the menu.
33 *
34 * @since 6.0
35 */
36KWIDGETSADDONS_EXPORT void setWindow(QObject *job, QWidget *widget);
37
38/**
39 * Return the window associated with this job.
40 *
41 * @param job should be a KJob subclass
42 *
43 * @since 6.0
44 */
45KWIDGETSADDONS_EXPORT QWidget *window(QObject *job);
46
47/**
48 * Updates the last user action timestamp to the given time.
49 *
50 * @param job should be a KJob subclass
51 *
52 * @since 6.0
53 */
54KWIDGETSADDONS_EXPORT void updateUserTimestamp(QObject *job, unsigned long time);
55/**
56 * Returns the last user action timestamp
57 *
58 * @param job should be a KJob subclass
59 *
60 * @since 6.0
61 */
62KWIDGETSADDONS_EXPORT unsigned long userTimestamp(QObject *job);
63}
64
65#endif
KJobWidgets namespace.
Definition kjobwidgets.h:20
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.
QWidget * window(QObject *job)
Return the window associated with this job.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:08:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.