PimCommon::ShareServiceUrlManager Class

The ShareServiceUrlManager class manages service URLs for sharing Author: Laurent Montel <montel@kde.org>. More...

Header: #include <PimCommon/ShareServiceUrlManager>
CMake: find_package(KPim6PimCommon REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::PimCommon)
Inherits: QObject

Public Functions

ShareServiceUrlManager(QObject *parent = nullptr)
virtual ~ShareServiceUrlManager() override
QUrl generateServiceUrl(const QString &link, const QString &title, PimCommon::ShareServiceUrlManager::ServiceType type)
KActionMenu *menu() const
void openUrl(const QUrl &url)

Public Slots

void slotSelectServiceUrl(QAction *act)

Signals

void serviceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type)

Detailed Description

Member Function Documentation

[explicit] ShareServiceUrlManager::ShareServiceUrlManager(QObject *parent = nullptr)

Constructs a ShareServiceUrlManager. @param parent The parent QObject

[override virtual noexcept] ShareServiceUrlManager::~ShareServiceUrlManager()

Destructs the ShareServiceUrlManager.

QUrl ShareServiceUrlManager::generateServiceUrl(const QString &link, const QString &title, PimCommon::ShareServiceUrlManager::ServiceType type)

Generates a service URL for sharing. @param link The link to share @param title The title for the shared link @param type The type of service to use @return A QUrl for the share service

Returns the menu containing the share service actions. @return A KActionMenu with share service options

void ShareServiceUrlManager::openUrl(const QUrl &url)

Opens a URL in the default browser or service. @param url The URL to open

[signal] void ShareServiceUrlManager::serviceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type)

Emitted when a service URL has been selected. @param type The type of service selected

[slot] void ShareServiceUrlManager::slotSelectServiceUrl(QAction *act)

Called when a service is selected from the menu. @param act The action that was selected