对头文件添加了注释

dingzijian_develop
Dingzijian 1 year ago
parent 6f92476840
commit 33ef5f9305

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file commondialog.h
* @author
* @brief CommonDialog
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef COMMONDIALOG_H
#define COMMONDIALOG_H
@ -16,13 +30,15 @@ public:
explicit CommonDialog(QWidget *parent = 0);
~CommonDialog();
void setContent(QString);
void setContent(QString); //设置窗口显示内容
private:
//窗口控件
QDialogButtonBox *buttonBox;
QLabel *content;
void confirm();
void confirm(); //点击确定后delete此窗口
};
#endif // COMMONDIALOG_H

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file directcontrol.h
* @author
* @brief DirectControl
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef DIRECTCONTROL_H
#define DIRECTCONTROL_H
@ -20,17 +34,22 @@ public:
explicit DirectControl(QWidget *parent = 0);
~DirectControl();
void direct_control_send();
void direct_control_send(); //发送信息到控制节点
private:
//窗口控件
double linear, angular;
QDialogButtonBox *buttonBox;
QLabel *robortname;
//手动控制节点
DirectControlNode *direct_control_node;
void reject();
protected:
//按键按和释放消息处理
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
};

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file messagebox.h
* @author
* @brief MessageBoxMissonWinodw
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H
@ -8,9 +22,6 @@
#include <QDialogButtonBox>
#include <QTextEdit>
namespace Ui {
class MessageBox;
}
class MessageBox : public QDialog
{
@ -20,27 +31,29 @@ public:
explicit MessageBox(QWidget *parent);
~MessageBox();
QString robortmission;
Q_SIGNALS:
//发送数据的信号,不需要实体函数,在头文件定义就可以
//信号函数
void sendData(std::string, int, std::string);
private:
QString robortmission;
//窗口控件
QLabel *mission_robort;
QLabel *people_find;
QTextEdit *mission_page;
QTextEdit *people_page;
Ui::MessageBox *ui;
void accept();
void reject();
protected:
void paintEvent(QPaintEvent *event) override;
void paintEvent(QPaintEvent *event) override; //绘制MessageBox的边框
private Q_SLOTS:
void get_connect_robort(QString);//得到数据的槽函数
//槽函数
void get_connect_robort(QString); //接收机器人是否连接成功的信息
};
#endif // MESSAGEBOX_H

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file missionopen.h
* @author
* @brief MissionOpenMissionWindow
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MISSIONOPEN_H
#define MISSIONOPEN_H
@ -10,11 +24,6 @@
#include <QDialogButtonBox>
#include <string>
namespace Ui {
class MissionOpen;
}
class MissionOpen : public QDialog
{
Q_OBJECT
@ -22,22 +31,28 @@ class MissionOpen : public QDialog
public:
explicit MissionOpen(QWidget *parent = 0);
~MissionOpen();
QString name; //任务名称
Q_SIGNALS:
void sendData(QString);
void sendCloseSignal();
//信号函数
void sendData(QString); //连接missionwindow的getData()槽函数创建missionwindow窗口
void sendCloseSignal(); //连接mainwindow的getCloseSignal槽函数隐藏mainwindow窗口
private:
QString name; //任务名称
//窗口控件
QDialogButtonBox *buttonBox;
QLabel *missionname;
QComboBox *inputtype;
Ui::MissionOpen *ui;
//任务子窗口
MissionWindow *missionwindow;
void accept();
void reject();
//基本窗口设置
void basicFrameSet();
};

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file missionset.h
* @author
* @brief MissionSet
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MISSIONSET_H
#define MISSIONSET_H
@ -7,10 +21,6 @@
#include <QComboBox>
#include <QDialogButtonBox>
namespace Ui {
class MissionSet;
}
class MissionSet : public QDialog
{
Q_OBJECT
@ -20,19 +30,18 @@ public:
~MissionSet();
private:
QDialogButtonBox *buttonBox;
//窗口控件
QDialogButtonBox *buttonBox;
QLabel *missionname;
QLabel *missiontype;
QLineEdit *inputname;
QComboBox *inputtype;
Ui::MissionSet *ui;
void accept();
void reject();
//基本窗口设置
void basicFrameSet();
};

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file robortset.h
* @author
* @brief RobortSet
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef ROBORTSET_H
#define ROBORTSET_H
@ -7,10 +21,6 @@
#include <QComboBox>
#include <QDialogButtonBox>
namespace Ui {
class RobortSet;
}
class RobortSet : public QDialog
{
Q_OBJECT
@ -19,25 +29,23 @@ public:
explicit RobortSet(QWidget *parent = 0);
~RobortSet();
QString robortmission;
Q_SIGNALS:
//发送数据的信号,不需要实体函数,在头文件定义就可以
void sendData(std::string, int, std::string);
//信号函数
void sendData(std::string, int, std::string); //告知Mission类机器人设置完成
private:
QDialogButtonBox *buttonBox;
QString robortmission; //机器人所属任务
//窗口控件
QDialogButtonBox *buttonBox;
QLabel *robortname;
QLabel *roborttype;
QLabel *robortip;
QLineEdit *inputname;
QComboBox *inputtype;
QLineEdit *inputip;
Ui::RobortSet *ui;
void accept();
void reject();

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file robortupdate.h
* @author
* @brief RobortSet
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef ROBORTUPDATE_H
#define ROBORTUPDATE_H
@ -9,10 +23,6 @@
#include "../dialog/commondialog.h"
namespace Ui {
class RobortUpdate;
}
class RobortUpdate : public QDialog
{
Q_OBJECT
@ -20,22 +30,21 @@ class RobortUpdate : public QDialog
public:
explicit RobortUpdate(QWidget *parent = 0);
~RobortUpdate();
void getRobortID(int);
void getRobortID(int); //获取机器人id号
private:
QDialogButtonBox *buttonBox;
//窗口控件
QDialogButtonBox *buttonBox;
QLabel *robortname;
QLabel *roborttype;
QLabel *robortip;
QLineEdit *inputname;
QComboBox *inputtype;
QLineEdit *inputip;
CommonDialog *commondialog;
Ui::RobortUpdate *ui;
CommonDialog *commondialog; //更新完成后显示此对话框
void accept();
void reject();

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file mainwindow.h
* @author
* @brief MainWindow
* @version 1.0
* @date 2023-06-28
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
@ -20,10 +34,6 @@
#include <QGridLayout>
#include <QProcess>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
@ -33,19 +43,20 @@ public:
~MainWindow();
private:
Ui::MainWindow *ui;
QProcess *process; //启动roscore
QPushButton *startbutton; //创建任务按钮
QPushButton *openbutton; //打开任务按钮
MissionSet *missionset; //任务设置窗口
MissionOpen *missionopen; //任务打开窗口
//基本窗口设置
//窗口控件
QMenuBar *menubar;
QWidget *centralwidget;
QStatusBar *statusbar;
QFrame *frame;
QGridLayout *gridLayout;
//基本窗口设置
void basicFrameSet();
private Q_SLOTS:

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file missionwindow.h
* @author
* @brief MissionWindow使
* @version 1.0
* @date 2023-06-29
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MISSIONWINDOW_H
#define MISSIONWINDOW_H
@ -27,10 +40,6 @@
#include <QThread>
namespace Ui {
class MissionWindow;
}
class MissionWindow : public QWidget
{
Q_OBJECT
@ -48,11 +57,11 @@ public:
GroundRobort *tab_ground;
Q_SIGNALS:
//信号函数
void sendRobortData(std::string, int, int, std::string);
private:
Ui::MissionWindow *ui;
MyViz *myviz;
int type;
std::vector<std::string> robort;
std::string name;
@ -62,16 +71,25 @@ private:
QPushButton *StartMission;
QPushButton *TerminateMission;
//用于显示雷达扫描图像
MyViz *myviz;
//显示任务执行信息等情况
MessageBox *message;
//创建机器人时显示此对话框
RobortSet *robortset;
//信息发送和接收节点
TcpReceiveNode *tcpreceivenode;
UdpReceiveNode *udpreceivenode;
UdpSendNode *udpsendnode;
ManageNode *managenode;
private Q_SLOTS:
void getData(QString);
void getData(std::string, int, std::string);
//槽函数
void getData(QString); //接收MainWindow窗口的信息从数据库查找相关任务信息
void getData(std::string, int, std::string); //创建新机器人后显示机器人内容,便于后期可能的扩展
void toRobortSet();
void startMission();
void terminateMission();

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file direct_control_node.h
* @author
* @brief DirectControlNodeunitree_legged_sdk
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef DIRECT_CONTROL_NODE_H
#define DIRECT_CONTROL_NODE_H

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file manage_node.h
* @author
* @brief ManageNode
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef MANAGE_NODE_H
#define MANAGE_NODE_H

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file tcp_port_receive_node.h
* @author
* @brief TcpReceiveNodeTCP/IP
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef TCP_PORT_RECEIVE_NODE_H
#define TCP_PORT_RECEIVE_NODE_H

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file tcp_port_send_node.h
* @author
* @brief TcpSendNodeTCP/IP
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef TCP_PORT_SEND_NODE_H
#define TCP_PORT_SEND_NODE_H

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file udp_port_receive_node.h
* @author
* @brief UdpReceiveNodeUDP/IP
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef UDP_PORT_RECEIVE_NODE_H
#define UDP_PORT_RECEIVE_NODE_H

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file udp_port_send_node.h
* @author
* @brief UdpSendNodeUDP/IP
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef UDP_PORT_SEND_NODE_H
#define UDP_PORT_SEND_NODE_H

@ -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(); //停止任务
};

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file sky_robort.h
* @author
* @brief SkyRobort
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef SKY_ROBORT_H
#define SKY_ROBORT_H
@ -24,10 +37,6 @@
#include <QTextEdit>
#include <QLabel>
namespace Ui {
class SkyRobort;
}
class SkyRobort : public QWidget
{
Q_OBJECT
@ -36,6 +45,7 @@ public:
explicit SkyRobort(QWidget *parent = 0);
~SkyRobort();
//测试是否成功连接
Ping* m_ping;
QThread* m_pingThread;
@ -45,36 +55,37 @@ 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(); //停止任务
};
#endif // SKY_ROBORT_H

@ -26,6 +26,17 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/**
* ************************************************************************
* @file myviz.h
* @author
* @brief MyViz
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*/
#ifndef MYVIZ_H
#define MYVIZ_H
@ -35,7 +46,7 @@ namespace rviz
{
class Display;
class RenderPanel;
class VisualizationManager;;
class VisualizationManager;
}
// BEGIN_TUTORIAL

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file ping.h
* @author
* @brief PingIP
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef PING_H
#define PING_H
@ -26,10 +40,11 @@ public:
void init(QString);
Q_SIGNALS:
void sendPing(QString);
//信号函数
void sendPing(QString); //发送结果信息到其他类
private Q_SLOTS:
int getResult();
int getResult(); //得到结果信息
};

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file plan.hpp
* @author
* @brief Plan
* @version 1.0
* @date 2023-06-29
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef PLAN_H
#define PLAN_H
#include <iostream>

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file sqlite.h
* @author
* @brief sqlite
* @version 1.0
* @date 2023-06-27
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef SQLITE_H
#define SQLITE_H

@ -1,3 +1,17 @@
/**
* ************************************************************************
* @file receive_transform.hpp
* @author
* @brief jsonROS
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef RECEIVE_TRANSFORM_HPP
#define RECEIVE_TRANSFORM_HPP
@ -20,7 +34,7 @@ std::string get_message_type(std::string &s)
}
int goal_receive_transform(geometry_msgs::PoseStamped &goal, std::string &s)
{
const auto& j = json::parse(s, nullptr, false);

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file send_transform.hpp
* @author
* @brief ROSjson
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef SEND_TRANSFORM_HPP
#define SEND_TRANSFORM_HPP

@ -1,3 +1,16 @@
/**
* ************************************************************************
* @file video.h
* @author
* @brief Video
* @version 1.0
* @date 2023-06-30
* ************************************************************************
*
* @copyright Copyright (c) 2023 XXX
* For study and research only, no reprinting
* ************************************************************************
*/
#ifndef VIDEO_H
#define VIDEO_H
@ -26,11 +39,13 @@ public:
void init(QString, int);
protected:
void paintEvent(QPaintEvent *event) override;
void paintEvent(QPaintEvent *event) override; //绘制Video的边框
private Q_SLOTS:
void openCamera();
void closeCamera();
//槽函数
void openCamera(); //接收从机器人窗口发来的消息
void closeCamera(); //接收从机器人窗口发来的消息
};

Loading…
Cancel
Save