Messagelib

viewerplugin.h
1/*
2 SPDX-FileCopyrightText: 2015-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 <QObject>
11#include <memory>
13
14namespace MessageViewer
15{
16class ViewerPluginPrivate;
17class ViewerPluginInterface;
18/**
19 * @brief The ViewerPlugin class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class MESSAGEVIEWER_EXPORT ViewerPlugin : public QObject
23{
24 Q_OBJECT
25public:
26 explicit ViewerPlugin(QObject *parent = nullptr);
27 ~ViewerPlugin() override;
28
29 [[nodiscard]] virtual MessageViewer::ViewerPluginInterface *createView(QWidget *parent, KActionCollection *ac) = 0;
30 [[nodiscard]] virtual QString viewerPluginName() const = 0;
31 virtual void showConfigureDialog(QWidget *parent = nullptr);
32 [[nodiscard]] virtual bool hasConfigureDialog() const;
33
34 void setIsEnabled(bool enabled);
35 [[nodiscard]] bool isEnabled() const;
36
37Q_SIGNALS:
38 void configChanged();
39
40private:
41 std::unique_ptr<ViewerPluginPrivate> const d;
42};
43}
The ViewerPluginInterface class.
The ViewerPlugin class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.