KIO

widgetsopenorexecutefilehandler.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2020 Ahmad Samir <a.samirh78@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef WIDGETSOPENOREXECUTEFILEHANDLER_H
9#define WIDGETSOPENOREXECUTEFILEHANDLER_H
10
11#include "openorexecutefileinterface.h"
12
13namespace KIO
14{
15// TODO KF6: Make KIO::JobUiDelegate inherit from WidgetsOpenOrExecuteFileHandler
16// (or even merge the two classes)
17// so that setDelegate(new KIO::JobUiDelegate) invokes the dialog boxes on error
18// and when showing ExecutableFileOpenDialog.
19
20class WidgetsOpenOrExecuteFileHandler : public OpenOrExecuteFileInterface
21{
23public:
24 explicit WidgetsOpenOrExecuteFileHandler(QObject *parent = nullptr);
25 ~WidgetsOpenOrExecuteFileHandler() override;
26
27 void promptUserOpenOrExecute(KJob *job, const QString &mimetype) override;
28
29 void setWindow(QWidget *window);
30
31private:
32 // Note: no d pointer because it's not exported at this point
33 QWidget *m_parentWidget = nullptr;
34};
35
36}
37
38#endif // WIDGETSOPENOREXECUTEFILEHANDLER_H
A namespace for KIO globals.
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
Find MIME type for one file or directory.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:49:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.