KIO

widgetsopenwithhandler.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2020 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 WIDGETSOPENWITHHANDLER_H
9#define WIDGETSOPENWITHHANDLER_H
10
11#include "openwithhandlerinterface.h"
12
13class QDialog;
14class QWidget;
15
16namespace KIO
17{
18// TODO KF6: Make KIO::JobUiDelegate inherit from WidgetsOpenWithHandler
19// (or even merge the two classes)
20// so that setDelegate(new KIO::JobUiDelegate) provides both dialog boxes on error
21// and the open-with dialog.
22
23class WidgetsOpenWithHandler : public OpenWithHandlerInterface
24{
26public:
27 explicit WidgetsOpenWithHandler(QObject *parent = nullptr);
28 ~WidgetsOpenWithHandler() override;
29
30 void promptUserForApplication(KJob *job, const QList<QUrl> &urls, const QString &mimeType) override;
31
32 void setWindow(QWidget *widget);
33
34private:
35 // Note: no d pointer because not exported at this point
36 QWidget *m_parentWidget = nullptr;
37};
38
39}
40
41#endif // WIDGETSOPENWITHHANDLER_H
A namespace for KIO globals.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.