#include "inter.h"
inter::inter(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
this->setWindowIcon(QIcon(":/envelopeMain/windowIcon.png"));
this->setWindowTitle(QStringLiteral("多项式拟合算法"));
this->setFixedSize(QDesktopWidget().availableGeometry(this).size() * 0.7);
// 设置背景
QPalette pal = this->palette();
pal.setBrush(QPalette::Background, QBrush(QPixmap(":/envelopeMain/background.png")));
setPalette(pal);
curtime = "NULL";
// 初始化等待界面
loading = new LoadingFrom(this);
loading->setFixedSize(this->size());//设置窗口大小
loading->setAutoFillBackground(true); //这个很重要,否则不会显示遮罩层
QPalette pal_mask = loading->palette();
//QColor color;
//color.setRgb(0, 255, 255, 255);
pal_mask.setColor(QPalette::Background, QColor(0x00, 0x00, 0x00, 0x30));
loading->setPalette(pal_mask);
loading->setVisible(false);//初始状态下隐藏,待需要显示时使用
// 左半部控件
lb_interval_set = new QLabel(QStringLiteral("区间大小"));
lb_interval_set->setAlignment(Qt::AlignCenter);
lb_interval_set->setFont(QFont("宋体"));
le_interval_set = new QLineEdit;
le_interval_set->setFixedHeight(30);
le_interval_set->setText(QString:: number(20));
le_interval_set->setFont(QFont("黑体"));
this->interval = le_interval_set->text().toInt(); // 区间大小默认20
connect(le_interval_set, SIGNAL(editingFinished()), this, SLOT(change_interval()));
lb_degree_set = new QLabel(QStringLiteral("阶数设置"));
lb_degree_set->setAlignment(Qt::AlignCenter);
le_degree_set = new QLineEdit;
le_degree_set->setFixedHeight(30);
le_degree_set->setText(QString::number(20));
this->degree = le_degree_set->text().toInt(); // 区间大小默认20
connect(le_degree_set, SIGNAL(editingFinished()), this, SLOT(change_degree()));
lb_index1_hint = new QLabel(QStringLiteral("区间覆盖率ICP"));
lb_index1_hint->setAlignment(Qt::AlignCenter);
lb_index1_show = new QLabel;
//lb_index1_show->setFrameShape(QFrame::Box);
lb_index1_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_index1_show->setFixedHeight(30);
lb_index2_hint = new QLabel(QStringLiteral("区间平均宽度百分比IMWP"));
lb_index2_hint->setAlignment(Qt::AlignCenter);
lb_index2_show = new QLabel;
//lb_index2_show->setFrameShape(QFrame::Box);
lb_index2_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_index2_show->setFixedHeight(30);
lb_index3_hint = new QLabel(QStringLiteral("平均带宽误差MWD"));
lb_index3_hint->setAlignment(Qt::AlignCenter);
lb_index3_show = new QLabel;
//lb_index3_show->setFrameShape(QFrame::Box);
lb_index3_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_index3_show->setFixedHeight(30);
print_report = new QPushButton(QStringLiteral("打印报告"));
print_report->setFixedSize(QSize(500, 150));
print_report->setFixedHeight(150);
print_report->setFont(QFont("黑体", 18));
print_report->setStyleSheet("background-color: #F6EBFF;");
connect(print_report, SIGNAL(clicked()), this, SLOT(report_output()));
action = new QPushButton(QStringLiteral("开始运行"));
action->setFixedSize(QSize(500, 150));
action->setFixedHeight(150);
action->setFont(QFont("黑体", 18));
action->setStyleSheet("background-color: #F6EBFF;");
connect(action, SIGNAL(clicked()), this, SLOT(create_thread()));
//右半部控件
lb_image1_hint = new QLabel(QStringLiteral("原始图片"));
lb_image1_hint->setAlignment(Qt::AlignCenter);
lb_image1_hint->setFixedHeight(20);
lb_image1_show = new QLabel;
lb_image1_show->setFrameShape(QFrame::Box);
lb_image1_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_image1_show->setFixedSize(QSize(500, 425));
lb_image2_hint = new QLabel(QStringLiteral("最大最小值提取"));
lb_image2_hint->setAlignment(Qt::AlignCenter);
lb_image2_hint->setFixedHeight(20);
lb_image2_show = new QLabel;
lb_image2_show->setFrameShape(QFrame::Box);
lb_image2_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_image2_show->setFixedSize(QSize(500, 425));
lb_image3_hint = new QLabel(QStringLiteral("移动后图片"));
lb_image3_hint->setAlignment(Qt::AlignCenter);
lb_image3_hint->setFixedHeight(20);
lb_image3_show = new QLabel;
lb_image3_show->setFrameShape(QFrame::Box);
lb_image3_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_image3_show->setFixedSize(QSize(500, 425));
lb_image4_hint = new QLabel(QStringLiteral("包络图片"));
lb_image4_hint->setAlignment(Qt::AlignCenter);
lb_image4_hint->setFixedHeight(20);
lb_image4_show = new QLabel;
lb_image4_show->setFrameShape(QFrame::Box);
lb_image4_show->setFrameStyle(QFrame::Panel | QFrame::Sunken);
lb_image4_show->setFixedSize(QSize(500, 425));
layout_left = new QGridLayout;
layout_left->setMargin(20);
layout_left->addWidget(lb_interval_set, 0, 0);
layout_left->addWidget(le_interval_set, 0, 1);
layout_left->addWidget(lb_degree_set, 1, 0);
layout_left->addWidget(le_degree_set, 1, 1);
layout_left->addWidget(lb_index1_hint, 2, 0);
layout_left->addWidget(lb_index1_show, 2, 1);
layout_left->addWidget(lb_index2_hint, 3, 0);
layout_left->addWidget(lb_index2_show, 3, 1);
layout_left->addWidget(lb_index3_hint, 4, 0);
layout_left->addWidget(lb_index3_show, 4, 1);
layout_left->addWidget(action, 5, 0, 1, 2);
layout_left->addWidget(print_report, 6, 0, 1, 2);
layout_left->setColumnStretch(0, 1);
layout_left->setColumnStretch(1, 2);
layout_left->setRowStretch(0, 1);
layout_left->setRowStretch(1, 1);
layout_left->setRowStretch(2, 1);
layout_left->setRowStretch(3, 1);
layout_left->setRowStretch(4, 1);
layout_left->setRowStretch(5, 2);
layout_left->setRowStretch(6, 2);
layout_left->setHorizontalSpacing(-1);
layout_left->setVerticalSpacing(50);
layout_right = new QGridLayout;
layout_right->addWidget(lb_image1_show, 0, 0);
layout_right->addWidget(lb_image1_hint, 1, 0);
layout_right->addWidget(lb_image3_show, 2, 0);
layout_right->addWidget(lb_image3_hint, 3, 0);
layout_right->addWidget(lb_image2_show, 0, 1);
layout_right->addWidget(lb_image2_hint, 1, 1);
layout_right->addWidget(lb_image4_show, 2, 1);
layout_right->addWidget(lb_image4_hint, 3, 1);
//layout_right->setAlignment(Qt::AlignHCenter);
layout_right->setMargin(50);
layout_right->setHorizontalSpacing(10);
layout_main = new QHBoxLayout(this);
layout_main->addLayout(layout_left);
layout_main->addLayout(layout_right);
layout_main->setStretchFactor(layout_left, 1);
layout_main->setStretchFactor(layout_right, 3);
// 获取桌面路径
desktop_path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
}
void inter::get_datapath(QString datapath)
{
this->datapath = datapath;
}
void inter::closeEvent(QCloseEvent* event)
{
emit this_to_fath();
event->accept();
}
void inter::change_interval()
{
this->interval = le_interval_set->text().toInt();
//qDebug() << interval << endl;
}
void inter::change_degree()
{
this->degree = le_degree_set->text().toInt();
//qDebug() << degree << endl;
}
void inter::create_thread()
{
if (datapath == nullptr)
{
QMessageBox::information(this, QStringLiteral("数据路径选取失败提示窗口"),
QStringLiteral("您的数据选取有误,请返回上一级重新选取"));
this->close();
return;
}
worker = new workerThread(datapath, interval, degree, 1); // para 4 代表选取当前方法
// 运行中窗口
loading->setVisible(true);
// 图片发送信号接收槽
connect(worker, SIGNAL(send_image1(QString)), this, SLOT(handle_img1(QString)));
connect(worker, SIGNAL(send_image2(QString)), this, SLOT(handle_img2(QString)));
connect(worker, SIGNAL(send_image3(QString)), this, SLOT(handle_img3(QString)));
connect(worker, SIGNAL(send_image4(QString)), this, SLOT(handle_img4(QString)));
// 误差结果接收槽
connect(worker, SIGNAL(resultsReady(double, double, double)), this, SLOT(handle_results(double, double, double)));
//connect(worker, SIGNAL(massion_complete()), this, SLOT(getMassion_state()));
worker->start();
}
void inter::handle_results(double icp, double imwp, double mwd)
{
QString i
没有合适的资源?快使用搜索试试~ 我知道了~
关于航天遥测数据包络检测. 毕业设计
共44个文件
h:10个
cpp:8个
ui:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 100 浏览量
2023-07-03
09:21:49
上传
评论 1
收藏 2.41MB ZIP 举报
温馨提示
关于航天遥测数据包络检测. 毕业设计
资源推荐
资源详情
资源评论
收起资源包目录
关于航天遥测数据包络检测.zip (44个子文件)
envelope_project-master
envelope_project.sln 1KB
.gitattributes 2KB
遥测数据包络分析系统
遥测数据包络分析系统.vdproj 106KB
envelope_project
inter.h 2KB
background.jpg 186KB
polynomial_interpolation.lib 4KB
envelopeMain.ui 797B
envelopeMain.qrc 290B
init_window.cpp 3KB
workerThread.h 1013B
resource.h 436B
envelope_project.vcxproj 7KB
envelope_project.rc 3KB
init_window.h 845B
windowIcon.png 4KB
envo_spline.h 3KB
LoadingFrom.ui 531B
main.cpp 2KB
envelope_project.vcxproj.filters 4KB
workerThread.cpp 3KB
spl.h 2KB
envelopeMain.cpp 3KB
inter.cpp 13KB
word.cpp 11KB
init_window.ui 531B
background.png 6KB
favicon.ico 17KB
envelopeMain.h 1008B
LoadingFrom.cpp 873B
start.gif 828KB
loadingFrom.gif 14KB
button_background.png 6KB
polynomial_interpolation.dll 717KB
inter.ui 507B
envo_spline.lib 3KB
spl.cpp 13KB
LoadingFrom.h 351B
polynomial_interpolation.h 3KB
envo_spline.dll 717KB
loadingFrom1.gif 14KB
word.h 3KB
spl.ui 499B
Setup
Setup.vdproj 40KB
.gitignore 6KB
共 44 条
- 1
资源评论
- 逆鳞郎2023-11-20资源有很好的参考价值,总算找到了自己需要的资源啦。
程序员奇奇
- 粉丝: 3w+
- 资源: 294
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功