|
|
|
@ -1,3 +1,17 @@
|
|
|
|
|
/**
|
|
|
|
|
* ************************************************************************
|
|
|
|
|
* @file ground_robort.h
|
|
|
|
|
* @author 丁梓坚
|
|
|
|
|
* @brief GroundRobort界面类,负责显示四足机器人信息
|
|
|
|
|
* @version 1.0
|
|
|
|
|
* @date 2023-06-30
|
|
|
|
|
* ************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* @copyright Copyright (c) 2023 XXX
|
|
|
|
|
* For study and research only, no reprinting
|
|
|
|
|
* ************************************************************************
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef GROUND_ROBORT_H
|
|
|
|
|
#define GROUND_ROBORT_H
|
|
|
|
|
|
|
|
|
@ -24,10 +38,6 @@
|
|
|
|
|
#include <QTextEdit>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class GroundRobort;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class GroundRobort : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
@ -36,6 +46,7 @@ public:
|
|
|
|
|
explicit GroundRobort(QWidget *parent = 0);
|
|
|
|
|
~GroundRobort();
|
|
|
|
|
|
|
|
|
|
//测试是否成功连接
|
|
|
|
|
Ping* m_ping;
|
|
|
|
|
QThread* m_pingThread;
|
|
|
|
|
|
|
|
|
@ -45,36 +56,38 @@ private:
|
|
|
|
|
std::string name;
|
|
|
|
|
int id;
|
|
|
|
|
|
|
|
|
|
//基本控件
|
|
|
|
|
QPushButton *join_mission;
|
|
|
|
|
QPushButton *stop_mission;
|
|
|
|
|
|
|
|
|
|
QPushButton *directcontrol_button;
|
|
|
|
|
DirectControl *directcontrol;
|
|
|
|
|
|
|
|
|
|
QPushButton *modify_settings;
|
|
|
|
|
QPushButton *delete_robort;
|
|
|
|
|
|
|
|
|
|
QTextEdit *robort_name;
|
|
|
|
|
QTextEdit *robort_type;
|
|
|
|
|
QTextEdit *robort_ip;
|
|
|
|
|
QTextEdit *robort_ping;
|
|
|
|
|
|
|
|
|
|
//更新机器人信息
|
|
|
|
|
RobortUpdate *robortupdate;
|
|
|
|
|
|
|
|
|
|
//通信节点
|
|
|
|
|
UdpReceiveNode *udpreceivenode;
|
|
|
|
|
UdpSendNode *udpsendnode;
|
|
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
void send_connected_robort(QString);
|
|
|
|
|
//信号函数
|
|
|
|
|
void send_connected_robort(QString); //发送是否连接成功信息到MissionWindow类
|
|
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
|
void getRobortData(std::string, int, int, std::string);
|
|
|
|
|
void directControl();
|
|
|
|
|
void getPing(QString);
|
|
|
|
|
void deleteThisRobort();
|
|
|
|
|
void updateThisRobort();
|
|
|
|
|
void joinMission();
|
|
|
|
|
void stopMission();
|
|
|
|
|
//槽函数
|
|
|
|
|
void getRobortData(std::string, int, int, std::string); //接收MissionWindow从数据库中查找到到机器人相关信息
|
|
|
|
|
void directControl(); //直接控制
|
|
|
|
|
void getPing(QString); //判断连接情况
|
|
|
|
|
void deleteThisRobort(); //从数据库删除此机器人信息
|
|
|
|
|
void updateThisRobort(); //从数据库更新此机器人信息
|
|
|
|
|
void joinMission(); //加入任务
|
|
|
|
|
void stopMission(); //停止任务
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|