添加协议显示界面,添加指令传输和json
This commit is contained in:
+28
-10
@@ -1,6 +1,7 @@
|
||||
#include "ToolsUI.h"
|
||||
#include "ui_ToolsUI.h"
|
||||
|
||||
|
||||
ToolsUI::ToolsUI(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ToolsUI)
|
||||
@@ -15,21 +16,15 @@ ToolsUI::ToolsUI(QWidget *parent) :
|
||||
this->setStyleSheet(stylesheet);
|
||||
file.close();
|
||||
|
||||
index0 = new Index0(this);
|
||||
index1 = new Index1(this);;
|
||||
|
||||
|
||||
|
||||
index0 = new Tools_Index0(this);
|
||||
index1 = new Tools_Index1(this);
|
||||
|
||||
connect(this,SIGNAL(IndexChanged(int)),
|
||||
this,SLOT(onTabIndexChanged(int)));
|
||||
|
||||
|
||||
|
||||
CurrentIndex = 0;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
|
||||
|
||||
}
|
||||
|
||||
ToolsUI::~ToolsUI()
|
||||
@@ -62,12 +57,35 @@ void ToolsUI::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void ToolsUI::onTabIndexChanged(const int &index)//界面选择管理
|
||||
{
|
||||
//软件设置
|
||||
if(index == 0) index0->show();
|
||||
else index0->hide();
|
||||
|
||||
//硬件设置
|
||||
if(index == 1) index1->show();
|
||||
else index1->hide();
|
||||
}
|
||||
|
||||
|
||||
void ToolsUI::on_pushButton_Inspector_clicked()
|
||||
{
|
||||
CurrentIndex = 0;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void ToolsUI::on_pushButton_Log_clicked()
|
||||
{
|
||||
CurrentIndex = 1;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void ToolsUI::on_pushButton_Replay_clicked()
|
||||
{
|
||||
CurrentIndex = 2;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
void ToolsUI::on_pushButton_Console_clicked()
|
||||
{
|
||||
CurrentIndex = 3;
|
||||
emit IndexChanged(CurrentIndex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user