Messagelib

openwithurlinfo.h
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8#include "messageviewer_export.h"
9#include <QDebug>
10namespace MessageViewer
11{
12/**
13 * @brief The OpenWithUrlInfo class
14 * @author Laurent Montel <montel@kde.org>
15 */
16class MESSAGEVIEWER_EXPORT OpenWithUrlInfo
17{
18 Q_GADGET
19public:
22
23 [[nodiscard]] const QString &command() const;
24 void setCommand(const QString &newCommand);
25
26 [[nodiscard]] const QString &url() const;
27 void setUrl(const QString &newUrl);
28
29 [[nodiscard]] bool isValid() const;
30
31 [[nodiscard]] const QString &commandLine() const;
32 void setCommandLine(const QString &newCommandLine);
33
34 [[nodiscard]] bool operator==(const OpenWithUrlInfo &other) const;
35
36 [[nodiscard]] bool isLocalOpenWithInfo() const;
37 void setIsLocalOpenWithInfo(bool newLocalOpenWith);
38
39 [[nodiscard]] bool enabled() const;
40 void setEnabled(bool newEnabled);
41
42private:
43 QString mCommandLine;
44 QString mCommand;
45 QString mUrl;
46 bool mIsLocalOpenWithInfo = true;
47 bool mEnabled = true;
48};
49}
50Q_DECLARE_TYPEINFO(MessageViewer::OpenWithUrlInfo, Q_RELOCATABLE_TYPE);
51MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::OpenWithUrlInfo &t);
The OpenWithUrlInfo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.