Pimcommon

purposemenuwidget.h
1/*
2 SPDX-FileCopyrightText: 2018-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>
11namespace Purpose
12{
13class Menu;
14}
15class QMenu;
16class QTemporaryFile;
17namespace PimCommon
18{
19/**
20 * @brief The PurposeMenuWidget class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class PIMCOMMON_EXPORT PurposeMenuWidget : public QObject
24{
25 Q_OBJECT
26public:
27 explicit PurposeMenuWidget(QWidget *parentWidget, QObject *parent = nullptr);
28 ~PurposeMenuWidget() override;
29
30 [[nodiscard]] virtual QByteArray text() = 0;
31 [[nodiscard]] QMenu *menu() const;
32
33Q_SIGNALS:
34 void shareError(const QString &message);
35 void shareSuccess(const QString &url);
36
37private:
38 PIMCOMMON_NO_EXPORT void slotInitializeShareMenu();
39 PIMCOMMON_NO_EXPORT void slotShareActionFinished(const QJsonObject &output, int error, const QString &message);
40 QWidget *const mParentWidget;
41 Purpose::Menu *const mShareMenu;
42 QTemporaryFile *mTemporaryShareFile = nullptr;
43};
44}
The PurposeMenuWidget class.
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:48:30 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.