21 lines
726 B
C++
21 lines
726 B
C++
|
|
#include <QObject>
|
||
|
|
#include <QWidget>
|
||
|
|
#include "IPlugin.h"
|
||
|
|
#include "evtol.h"
|
||
|
|
class EVTOLPlugin : public QObject, public IPlugin {
|
||
|
|
Q_OBJECT
|
||
|
|
Q_INTERFACES(IPlugin)
|
||
|
|
Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin.json")
|
||
|
|
public:
|
||
|
|
explicit EVTOLPlugin(QObject*p=nullptr):QObject(p){}
|
||
|
|
QString name()const override{return"eVTOL";}
|
||
|
|
QString title()const override{return"eVTOL";}
|
||
|
|
QString version()const override{return"2.0";}
|
||
|
|
QWidget*createWidget(QWidget*parent)override{return new evtol(parent);}
|
||
|
|
signals:
|
||
|
|
void sendCommand(const PluginCommand&);
|
||
|
|
void showStatus(const QString&,int);
|
||
|
|
void dataChanged(const QString&,const QVariant&);
|
||
|
|
void requestData(const QString&,const QVariantMap&);
|
||
|
|
};
|