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

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 #include "messageviewer_export.h"
0009 #include <QDebug>
0010 namespace MessageViewer
0011 {
0012 /**
0013  * @brief The OpenWithUrlInfo class
0014  * @author Laurent Montel <montel@kde.org>
0015  */
0016 class MESSAGEVIEWER_EXPORT OpenWithUrlInfo
0017 {
0018     Q_GADGET
0019 public:
0020     OpenWithUrlInfo();
0021     ~OpenWithUrlInfo();
0022 
0023     [[nodiscard]] const QString &command() const;
0024     void setCommand(const QString &newCommand);
0025 
0026     [[nodiscard]] const QString &url() const;
0027     void setUrl(const QString &newUrl);
0028 
0029     [[nodiscard]] bool isValid() const;
0030 
0031     [[nodiscard]] const QString &commandLine() const;
0032     void setCommandLine(const QString &newCommandLine);
0033 
0034     [[nodiscard]] bool operator==(const OpenWithUrlInfo &other) const;
0035 
0036 private:
0037     QString mCommandLine;
0038     QString mCommand;
0039     QString mUrl;
0040 };
0041 }
0042 Q_DECLARE_TYPEINFO(MessageViewer::OpenWithUrlInfo, Q_RELOCATABLE_TYPE);
0043 MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::OpenWithUrlInfo &t);