From 41329fae5f819eee8c394571125f11f0a0b67cd9 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 23 Jun 2018 12:50:10 +0200 Subject: Add ConfigurationEditor plugin Removed poi-config --- plugins/interfaces.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'plugins/interfaces.h') diff --git a/plugins/interfaces.h b/plugins/interfaces.h index 1a12f02..aad43c1 100644 --- a/plugins/interfaces.h +++ b/plugins/interfaces.h @@ -18,6 +18,7 @@ class QString; class QAction; class QDialog; class WebProfile; +class Configuration; struct Plugin { @@ -27,26 +28,37 @@ struct Plugin QObject *instance; }; +typedef QHash> CommandHash_t; + class PluginInterface { public: virtual ~PluginInterface() = default; - virtual QHash> commands() = 0; + virtual CommandHash_t commands() = 0; + virtual QDialog *createWidget(QWidget *parent = nullptr) = 0; }; class ProfileInterface { public: virtual ~ProfileInterface() = default; - virtual QDialog *createWidget(QWidget *parent = nullptr) = 0; - virtual void registerProfile(WebProfile *profile) = 0; }; +class ConfigurationInterface +{ +public: + virtual ~ConfigurationInterface() = default; + virtual void setConfiguration(Configuration *cfg) = 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) +#define ConfigurationInterfaceIid "net.iserlohn-fortress.smolbote.ConfigurationInterface" +Q_DECLARE_INTERFACE(ConfigurationInterface, ConfigurationInterfaceIid) + #endif // SMOLBOTE_PLUGIN_INTERFACES_H -- cgit v1.2.1