Commit 6b21e692 authored by LIGNEUL CLEMENT's avatar LIGNEUL CLEMENT
Browse files

add compiling and running indicators

parent f200e4ec
......@@ -202,6 +202,7 @@ export class Compile {
ez_makefile = ez_makefile.concat('mak');
var run = output_compile.compile('/usr/local/easena/bin/easena', params, dir_path);
compiling_label.show();
run.stdout.on('data', (data) => {
output_compile.text.insertPlainText(data.toString());
......@@ -223,6 +224,7 @@ export class Compile {
file_select.setEnabled(true);
compile_btn.setEnabled(true);
option_widget.setEnabled(true);
compiling_label.hide();
});
} else {
......@@ -292,10 +294,16 @@ export class Compile {
// load file box
const widget_load = new QWidget();
const hbox_load = new QBoxLayout(0);
const compiling_label = new QLabel();
compiling_label.setText('Compiling ...');
compiling_label.hide();
hbox_load.addWidget(label_loaded);
hbox_load.addWidget(file_loaded);
hbox_load.addWidget(compiling_label);
hbox_load.setStretch(0, 0);
hbox_load.setStretch(1, 1);
hbox_load.setStretch(2, 1);
widget_load.setLayout(hbox_load);
// compile box
......
......@@ -88,6 +88,10 @@ export class Run_tab {
island_btn.addEventListener('clicked', () => {
this.island_obj = island_option.execution();
});
const running_label = new QLabel();
running_label.setText('Runs in progress ...');
running_label.hide();
// run button
......@@ -282,6 +286,7 @@ export class Run_tab {
// run here
var run = output_run.run(cmd, this.options, this.dir_path, i+1);
running_label.show();
if(i === 0){
run.stdout.on('data', (data) => {
......@@ -300,6 +305,7 @@ export class Run_tab {
island_btn.setEnabled(true);
offsp_btn.setEnabled(true);
general_option_btn.setEnabled(true);
running_label.hide();
}
});
}
......@@ -332,6 +338,7 @@ export class Run_tab {
hbox_run.addWidget(general_option_btn,1,0);
hbox_run.addWidget(parent_btn,1,1);
hbox_run.addWidget(offsp_btn,1,2);
hbox_run.addWidget(running_label,2,0);
hbox_run.addWidget(run_btn,2,1);
hbox_run.addWidget(island_btn,1,3);
hbox_run.addWidget(stop_proc_btn,2,2);
......
import { QTextEdit, QTableWidget, QTableWidgetItem } from "@nodegui/nodegui";
import { QCheckBox, QGridLayout } from "@nodegui/nodegui";
import { ChildProcess } from "child_process";
import { Win_alert } from "./win_alert";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment