-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsettingconfig.cpp
More file actions
28 lines (25 loc) · 852 Bytes
/
settingconfig.cpp
File metadata and controls
28 lines (25 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "settingconfig.h"
#include <QMessageBox>
#include "ImageProcess/ImageProcess.h"
#include "ui_settingconfig.h"
SettingConfig::SettingConfig(QWidget *parent) : QDialog(parent), ui(new Ui::SettingConfig) {
ui->setupUi(this);
ui->EditLKOptricalFlowTimes->setText(QString::number(ImageProcess::GetInstance().LKOptricalFlow_times));
}
SettingConfig::~SettingConfig() {
delete ui;
}
void SettingConfig::on_pushButtonFirm_clicked() {
auto gets = ui->EditLKOptricalFlowTimes->text();
bool ok;
int coverint = gets.toInt(&ok);
if (ok == false) {
QMessageBox::warning(this, tr("光流法捕捉点输入错误"), tr("请重试"));
} else {
ImageProcess::GetInstance().LKOptricalFlow_times = coverint;
this->close();
}
}
void SettingConfig::on_pushButtonCancel_clicked() {
this->close();
}