File indexing completed on 2025-03-09 04:54:36

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "openwithurlinfo.h"
0010 #include <QUrl>
0011 
0012 #include <QObject>
0013 namespace MessageViewer
0014 {
0015 class OpenUrlWithJob : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit OpenUrlWithJob(QObject *parent = nullptr);
0020     ~OpenUrlWithJob() override;
0021 
0022     [[nodiscard]] bool canStart() const;
0023 
0024     void start();
0025 
0026     const OpenWithUrlInfo &info() const;
0027     void setInfo(const OpenWithUrlInfo &newInfo);
0028     void setUrl(const QUrl &url);
0029 
0030 private:
0031     QUrl mUrl;
0032     OpenWithUrlInfo mInfo;
0033 };
0034 }