-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.cpp
62 lines (53 loc) · 1.55 KB
/
mainwindow.cpp
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "stitching.cpp"
#include <QButtonGroup>
#include <stdlib.h>
#include <QFileDialog>
#include <list>
using namespace std;
// 是否启用GPU加速
QButtonGroup *btnGroupGPU;
// 波形校正方向
QButtonGroup *btnGroupWaveCorrect;
// 是否保存过程图片
QButtonGroup *btnGroupSaveGraph;
// 融合平面
QButtonGroup *btnGroupWrapType;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
// btnGroupWaveCorrect = new QButtonGroup(this);
// btnGroupWaveCorrect->addButton(ui->radioButton_1, 0);
// btnGroupWaveCorrect->addButton(ui->radioButton_2, 1);
// ui->radioButton_1->setChecked(true);
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_startButton_clicked()
{
int len = this->path.size();
char* argv[len];
for(int i = 0; i < len; i++)
{
const char* file = this->path[i].toStdString().c_str();
argv[i] = new char[strlen(file)+1];
strcpy(argv[i], file);
}
start(len, argv);
}
void MainWindow::on_actionOpen_triggered()
{
QStringList path = QFileDialog::getOpenFileNames(this, tr("Open Image"), ".", tr("Image File(*.jpg *.png)")); //标题:Open Image 过滤器筛选jpg和png
if(path.length() == 0)
{
cout << "You didn't select any files." << endl;
} else {
ui->megapix_2->setText(path.join(' '));
this->path = path;
}
}