Pimcommon

shareserviceurlmanager.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "pimcommon_export.h"
10#include <QObject>
11#include <QUrl>
12#include <memory>
13
14class KActionMenu;
15class QAction;
16namespace PimCommon
17{
18class ShareServiceUrlManagerPrivate;
19/**
20 * @brief The ShareServiceUrlManager class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class PIMCOMMON_EXPORT ShareServiceUrlManager : public QObject
24{
25 Q_OBJECT
26public:
27 explicit ShareServiceUrlManager(QObject *parent = nullptr);
28 ~ShareServiceUrlManager() override;
29 enum ServiceType {
30 Fbook = 0,
31 Twitter,
32 MailTo,
33 LinkedIn,
34 Evernote,
35 Pocket,
36 LiveJournal,
37 ServiceEndType,
38 };
39
40 [[nodiscard]] KActionMenu *menu() const;
41
42 [[nodiscard]] QUrl generateServiceUrl(const QString &link, const QString &title, ServiceType type);
43
44 void openUrl(const QUrl &url);
45
46public Q_SLOTS:
47 void slotSelectServiceUrl(QAction *act);
48
49Q_SIGNALS:
50 void serviceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type);
51
52private:
53 std::unique_ptr<ShareServiceUrlManagerPrivate> const d;
54};
55}
56Q_DECLARE_METATYPE(PimCommon::ShareServiceUrlManager::ServiceType)
The ShareServiceUrlManager class.
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.