#ifndef IPLUGIN_H #define IPLUGIN_H #include #include #include #include #include #include "service.h" class IPlugin { public: IPlugin() { m_ui = NULL; } virtual ~IPlugin() { } virtual QString pluginName() = 0; virtual QString pluginId() = 0; virtual QString pluginDescription() = 0; virtual int schemaVersion() = 0; virtual QStringList schemas() = 0; virtual QStringList dependsOn() = 0; virtual void init(const QJsonObject &metaData) = 0; virtual QWidget *ui() { return m_ui; } template Service *service() { return (Service*)m_service; } protected: QWidget *m_ui; void *m_service; }; #define PluginInterface_iid "cz.itsolved.prodejna.IPlugin" Q_DECLARE_INTERFACE(IPlugin, PluginInterface_iid) #endif // IPLUGIN_H