KGuiAddons

kjobwindows.cpp
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#include "kjobwindows.h"
9#include <QObject>
10#include <QVariant>
11#include <QWindow>
12
14{
15 job->setProperty("window", QVariant::fromValue(window));
16 if (window) {
17 job->setProperty("window-id", QVariant::fromValue(window->winId()));
18 }
19}
20
22{
23 return job->property("window").value<QWindow *>();
24}
KGUIADDONS_EXPORT void setWindow(QObject *job, QWindow *window)
Associate this job with a window given by window.
KGUIADDONS_EXPORT QWindow * window(QObject *job)
Return the window associated with this job.
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
QVariant fromValue(T &&value)
T value() const const
WId winId() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 10 2024 11:48:59 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.