Messagelib

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

KDE's Doxygen guidelines are available online.