奥特QT DDS 插件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 5 месеци
123456789101112131415161718192021222324
  1. #pragma once
  2. #include <QObject>
  3. #include <QPluginLoader>
  4. #include "interfaces/plugin_interface.hpp"
  5. class PluginLoader : public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit PluginLoader(QObject *parent = nullptr);
  10. Q_INVOKABLE QObject* loadPlugin(const QString& path);
  11. Q_INVOKABLE bool unloadPlugin();
  12. Q_INVOKABLE QString errorString() const;
  13. signals:
  14. void messagePublished(const QString& message, int index);
  15. void error(const QString& errorString);
  16. private:
  17. QPluginLoader m_loader;
  18. };