From 037b039bfbfeda2e9b7ebef7e38616575411c876 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 14 Jan 2018 20:34:50 +0100 Subject: Initial plugins testing --- plugins/interfaces.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 plugins/interfaces.h (limited to 'plugins/interfaces.h') diff --git a/plugins/interfaces.h b/plugins/interfaces.h new file mode 100644 index 0000000..a43964a --- /dev/null +++ b/plugins/interfaces.h @@ -0,0 +1,39 @@ +/* + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: git://neueland.iserlohn-fortress.net/smolbote.git + * + * SPDX-License-Identifier: MIT + */ + +#ifndef INTERFACES_H +#define INTERFACES_H + +#include + +class QString; +class QAction; +class QWidget; +class QWebEngineProfile; + +class PluginInterface +{ +public: + virtual ~PluginInterface() = default; +}; + +class ProfileInterface +{ +public: + virtual ~ProfileInterface() = default; + + virtual QWidget *createWidget(QWebEngineProfile *profile, QWidget *parent) = 0; +}; + +#define PluginInterfaceIid "net.iserlohn-fortress.smolbote.PluginInterface" +Q_DECLARE_INTERFACE(PluginInterface, PluginInterfaceIid) + +#define ProfileInterfaceIid "net.iserlohn-fortress.smolbote.ProfileInterface" +Q_DECLARE_INTERFACE(ProfileInterface, ProfileInterfaceIid) + +#endif //INTERFACES_H -- cgit v1.2.1