forked from malcom2073/freeemssim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.cpp
48 lines (44 loc) · 1.84 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
/***************************************************************************
* Copyright (C) 2012 Michael Carpenter (malcom2073) *
* *
* This file is a part of FreeEmsSim *
* *
* FreeEmsSim is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 as *
* published by the Free Software Foundation. *
* *
* FreeEmsSim is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
*
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include "mainwindow.h"
#include <QFileDialog>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
connect(ui.browsePushButton,SIGNAL(clicked()),this,SLOT(browseButtonClicked()));
connect(ui.startPushButton,SIGNAL(clicked()),this,SLOT(startButtonClicked()));
}
void MainWindow::browseButtonClicked()
{
QFileDialog tmp;
if (tmp.exec())
{
if (tmp.selectedFiles().size() > 0)
{
ui.logFileLineEdit->setText(tmp.selectedFiles()[0]);
}
}
}
void MainWindow::startButtonClicked()
{
SimThread *thread = new SimThread();
thread->startSim(ui.logFileLineEdit->text());
}
MainWindow::~MainWindow()
{
}