2014-05-18 11:52:39 -04:00
|
|
|
#ifndef INCLUDE_PLUGINAPI_H
|
|
|
|
#define INCLUDE_PLUGINAPI_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include "util/export.h"
|
|
|
|
|
2016-05-14 22:38:37 -04:00
|
|
|
class QString;
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
class PluginManager;
|
|
|
|
class PluginInterface;
|
|
|
|
class MainWindow;
|
2016-05-16 04:35:36 -04:00
|
|
|
class MessageQueue;
|
2014-05-18 11:52:39 -04:00
|
|
|
class PluginGUI;
|
|
|
|
|
2015-08-29 19:26:51 -04:00
|
|
|
class SDRANGEL_API PluginAPI : public QObject {
|
2014-05-18 11:52:39 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
// MainWindow access
|
|
|
|
MessageQueue* getMainWindowMessageQueue();
|
|
|
|
|
|
|
|
// Channel stuff
|
2016-05-14 15:33:12 -04:00
|
|
|
void registerChannel(const QString& channelName, PluginInterface* plugin);
|
2014-05-18 11:52:39 -04:00
|
|
|
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
|
|
|
void removeChannelInstance(PluginGUI* pluginGUI);
|
|
|
|
|
|
|
|
// Sample Source stuff
|
|
|
|
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
|
|
|
|
2015-07-31 22:07:09 -04:00
|
|
|
// R/O access to main window
|
|
|
|
const MainWindow* getMainWindow() const { return m_mainWindow; }
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
protected:
|
|
|
|
PluginManager* m_pluginManager;
|
|
|
|
MainWindow* m_mainWindow;
|
|
|
|
|
2016-05-11 10:03:03 -04:00
|
|
|
PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow);
|
2016-05-13 05:42:03 -04:00
|
|
|
~PluginAPI();
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
friend class PluginManager;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_PLUGINAPI_H
|