2020-09-09 18:06:00 +08:00
|
|
|
#include "tools_Index0.h"
|
2020-05-29 19:30:33 +08:00
|
|
|
#include "ui_tools_Index0.h"
|
|
|
|
|
|
|
|
|
|
Tools_Index0::Tools_Index0(QWidget *parent) :
|
|
|
|
|
QWidget(parent),
|
|
|
|
|
ui(new Ui::Tools_Index0)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
//load qss
|
2020-06-10 20:04:56 +08:00
|
|
|
QFile file(":/qss/ToolsUI.qss");
|
2020-05-29 19:30:33 +08:00
|
|
|
file.open(QFile::ReadOnly);
|
|
|
|
|
QTextStream filetext(&file);
|
|
|
|
|
QString stylesheet = filetext.readAll();
|
|
|
|
|
this->setStyleSheet(stylesheet);
|
|
|
|
|
file.close();
|
|
|
|
|
|
2020-06-11 17:32:58 +08:00
|
|
|
mavlinkinspector = new MAVLinkInspector("mavlink inspector",nullptr,nullptr);
|
|
|
|
|
mavlinkinspector->setParent(this);
|
|
|
|
|
mavlinkinspector->show();
|
|
|
|
|
|
2020-08-01 10:53:17 +08:00
|
|
|
//scope = new Scope(this);
|
|
|
|
|
//scope->setGeometry(ui->frame->geometry());
|
|
|
|
|
//scope->show();
|
2020-06-11 17:32:58 +08:00
|
|
|
|
2020-05-29 19:30:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Tools_Index0::~Tools_Index0()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tools_Index0::resizeEvent(QResizeEvent *event)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(event)
|
2020-06-11 17:32:58 +08:00
|
|
|
if(mavlinkinspector)
|
2020-05-29 19:30:33 +08:00
|
|
|
{
|
2020-06-11 17:32:58 +08:00
|
|
|
mavlinkinspector->setGeometry(0,0,ui->frame->width(),ui->frame->height());
|
2020-05-29 19:30:33 +08:00
|
|
|
}
|
2020-08-01 10:53:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-29 19:30:33 +08:00
|
|
|
update();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tools_Index0::setInstallWidget(QWidget *w)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Inspect = w;
|
|
|
|
|
Inspect->setParent(this);
|
|
|
|
|
|
|
|
|
|
if(Inspect)
|
|
|
|
|
{
|
2020-06-04 18:20:13 +08:00
|
|
|
//qDebug() << "install param inspector";
|
2020-05-29 19:30:33 +08:00
|
|
|
Inspect->setGeometry(0,0,ui->frame->width(),ui->frame->height());
|
|
|
|
|
Inspect->show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|