tychoGUI
1.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
configure_path.cpp
Go to the documentation of this file.
1
#include "
configure_path.h
"
2
#include "
ui_configure_path.h
"
3
#include <QFileDialog>
4
#include <stdio.h>
5
6
7
configure_path::configure_path
(QWidget *parent) :
8
QDialog(parent),
9
ui(new Ui::
configure_path
)
10
{
11
ui
->
setupUi
(
this
);
12
13
connect(
ui
->
pushButton
, SIGNAL(clicked()),
this
, SLOT(
tycho_exectuable_config_ini
()));
14
connect(
ui
->
pushButton_2
, SIGNAL(clicked()),
this
, SLOT(close()));
15
16
17
}
18
19
configure_path::~configure_path
()
20
{
21
delete
ui
;
22
}
23
24
25
void
configure_path::tycho_exectuable_config_ini
(){
26
27
QString tycho_exe_config;
28
29
tycho_exe_config = QFileDialog::getOpenFileName(
this
, tr(
"The TYCHO Executable"
), QString::null);
30
31
//write the new path of the TYCHO executable in the confif_tycho_gui.ini File.
32
FILE *fd;
33
34
fd = fopen(
"config_tycho_gui.ini"
,
"w"
);
35
fprintf(fd,
"#THIS IS A TYCHO GUI CONFIG FILE\n#WHICH STORES THE FULL PATH OF THE\n#TYCHO SIMULATION EXECUTABLE\n"
""
);
36
fprintf(fd,
"%s"
, tycho_exe_config.toStdString().c_str());
37
38
fclose(fd);
39
40
ui
->
lineEdit
->setText(tycho_exe_config);
41
42
43
}
Generated on Wed Oct 9 2013 19:57:23 for tychoGUI by
1.8.1.1