28 lines
1006 B
C++
28 lines
1006 B
C++
|
|
#ifndef MAVLINKINSPECTORPLUGIN_H
|
||
|
|
#define MAVLINKINSPECTORPLUGIN_H
|
||
|
|
#include <QObject>
|
||
|
|
#include <QWidget>
|
||
|
|
#include <QPointer>
|
||
|
|
#include "IPlugin.h"
|
||
|
|
class MAVLinkInspector;
|
||
|
|
|
||
|
|
class MavLinkInspectorPlugin : public QObject, public IPlugin {
|
||
|
|
Q_OBJECT Q_INTERFACES(IPlugin)
|
||
|
|
Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin.json")
|
||
|
|
public:
|
||
|
|
explicit MavLinkInspectorPlugin(QObject *p = nullptr);
|
||
|
|
QString name() const override { return "MAVLinkInspector"; }
|
||
|
|
QString title() const override { return "MAVLink检查器"; }
|
||
|
|
QString version() const override { return "2.0"; }
|
||
|
|
QWidget *createWidget(QWidget *parent) override;
|
||
|
|
void onMavLinkMessage(const mavlink_message_t &msg) override;
|
||
|
|
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);
|
||
|
|
private:
|
||
|
|
QPointer<MAVLinkInspector> m_widget;
|
||
|
|
};
|
||
|
|
#endif
|