Messagelib

openurlwithmanager.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
9#include "messageviewer_export.h"
10#include "openwithurlinfo.h"
11#include <QList>
12#include <QObject>
13namespace MessageViewer
14{
15class MESSAGEVIEWER_EXPORT OpenUrlWithManager : public QObject
16{
17 Q_OBJECT
18public:
19 explicit OpenUrlWithManager(QObject *parent = nullptr);
20 ~OpenUrlWithManager() override;
21
22 static OpenUrlWithManager *self();
23
24 void clear();
25
26 [[nodiscard]] const QList<OpenWithUrlInfo> &openWithUrlInfo() const;
27 void setOpenWithUrlInfo(const QList<OpenWithUrlInfo> &newOpenWithUrlInfo);
28 void saveRules();
29
30 [[nodiscard]] OpenWithUrlInfo openWith(const QUrl &url);
31
32private:
33 MESSAGEVIEWER_NO_EXPORT void loadSettings();
34
35 QList<OpenWithUrlInfo> mOpenWithUrlInfo;
36};
37}
KGuiItem clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:37:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.