This commit is contained in:
chengyang 2021-02-25 15:01:46 +08:00
parent ba25802d73
commit 6f9824fd16
5 changed files with 839 additions and 779 deletions

View File

@ -140,5 +140,7 @@
<file>images/toolbar_other.png</file>
<file>images/toolbar_settings.png</file>
<file>images/get_pos.png</file>
<file>images/control.png</file>
<file>images/status.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

BIN
resources/images/status.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

View File

@ -124,6 +124,8 @@ void MainWindow::initUis()
ui.close_btn->setIcon(QIcon("://images/close.png"));
ui.btn_dash->setIcon(QIcon("://images/toolbar_dash.png"));
ui.btn_map->setIcon(QIcon("://images/toolbar_map.png"));
ui.btn_control->setIcon(QIcon("://images/control.png"));
ui.btn_status->setIcon(QIcon("://images/status.png"));
ui.btn_other->setIcon(QIcon("://images/toolbar_other.png"));
rock_widget =new JoyStick(ui.JoyStick_widget);
rock_widget->show();
@ -139,6 +141,12 @@ void MainWindow::connections()
QObject::connect(ui.btn_dash, &QPushButton::clicked, [=](){
ui.stackedWidget_main->setCurrentIndex(0);
});
QObject::connect(ui.btn_control,&QPushButton::clicked,[=](){
ui.stackedWidget_left->setCurrentIndex(1);
});
QObject::connect(ui.btn_status,&QPushButton::clicked,[=](){
ui.stackedWidget_left->setCurrentIndex(0);
});
QObject::connect(ui.btn_map, &QPushButton::clicked, [=](){
ui.stackedWidget_main->setCurrentIndex(1);
});
@ -182,8 +190,6 @@ void MainWindow::connections()
connect(ui.close_btn,SIGNAL(clicked()),this,SLOT(slot_closeWindows()));
connect(ui.min_btn,SIGNAL(clicked()),this,SLOT(slot_minWindows()));
connect(ui.max_btn,SIGNAL(clicked()),this,SLOT(slot_maxWindows()));
//hide
QObject::connect(ui.table_hide_btn,SIGNAL(clicked()),this,SLOT(slot_hide_table_widget()));
connect(rock_widget,SIGNAL(keyNumchanged(int)),this,SLOT(slot_rockKeyChange(int)));
connect(&qnode,SIGNAL(updateMap(QImage)),m_roboMap,SLOT(paintMaps(QImage)));
connect(&qnode,SIGNAL(plannerPath(QPolygonF)),m_roboMap,SLOT(paintPlannerPath(QPolygonF)));
@ -204,11 +210,10 @@ void MainWindow::slot_updateCursorPos(QPointF pos){
void MainWindow::slot_hide_table_widget(){
if(ui.stackedWidget_left->isHidden()){
ui.stackedWidget_left->show();
ui.table_hide_btn->setStyleSheet("QPushButton{background-image: url(://images/hide.png);border:none;}");
}
else{
ui.stackedWidget_left->hide();
ui.table_hide_btn->setStyleSheet("QPushButton{background-image: url(://images/show.png);border:none;}");
//ui.table_hide_btn->setStyleSheet("QPushButton{background-image: url(://images/show.png);border:none;}");
}
}
void MainWindow::initOthers(){

File diff suppressed because it is too large Load Diff