Messagelib

openurlwithmanager.h
1 /*
2  SPDX-FileCopyrightText: 2022-2023 Laurent Montel <[email protected]>
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 <QObject>
12 #include <QVector>
13 namespace MessageViewer
14 {
15 class MESSAGEVIEWER_EXPORT OpenUrlWithManager : public QObject
16 {
17  Q_OBJECT
18 public:
19  explicit OpenUrlWithManager(QObject *parent = nullptr);
20  ~OpenUrlWithManager() override;
21 
22  static OpenUrlWithManager *self();
23 
24  void clear();
25 
26  Q_REQUIRED_RESULT const QVector<OpenWithUrlInfo> &openWithUrlInfo() const;
27  void setOpenWithUrlInfo(const QVector<OpenWithUrlInfo> &newOpenWithUrlInfo);
28  void saveRules();
29 
30  Q_REQUIRED_RESULT OpenWithUrlInfo openWith(const QUrl &url);
31 
32 private:
33  MESSAGEVIEWER_NO_EXPORT void loadSettings();
34 
35  QVector<OpenWithUrlInfo> mOpenWithUrlInfo;
36 };
37 }
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:01:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.