22 lines
822 B
C++
22 lines
822 B
C++
|
|
#include <QObject>
|
||
|
|
#include <QWidget>
|
||
|
|
#include "IPlugin.h"
|
||
|
|
|
||
|
|
class TransportPlugin : public QObject, public IPlugin {
|
||
|
|
Q_OBJECT Q_INTERFACES(IPlugin)
|
||
|
|
Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin.json")
|
||
|
|
public:
|
||
|
|
explicit TransportPlugin(QObject *p = nullptr) : QObject(p) {}
|
||
|
|
QString name() const override { return "Transport"; }
|
||
|
|
QString title() const override { return "传输层"; }
|
||
|
|
QString version() const override { return "1.0"; }
|
||
|
|
QWidget *createWidget(QWidget *parent) override {
|
||
|
|
return new QWidget(parent); // TODO: implement
|
||
|
|
}
|
||
|
|
signals:
|
||
|
|
void sendCommand(const PluginCommand &cmd);
|
||
|
|
void showStatus(const QString &text, int timeout);
|
||
|
|
void dataChanged(const QString &key, const QVariant &value);
|
||
|
|
void requestData(const QString &what, const QVariantMap ¶ms);
|
||
|
|
};
|