Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LIGNEUL CLEMENT
GUIDE
Commits
6b21e692
Commit
6b21e692
authored
Jun 23, 2021
by
LIGNEUL CLEMENT
Browse files
add compiling and running indicators
parent
f200e4ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/compile_tab.ts
View file @
6b21e692
...
...
@@ -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
...
...
src/run_tab.ts
View file @
6b21e692
...
...
@@ -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
);
...
...
src/utilities.ts
View file @
6b21e692
import
{
Q
TextEdit
,
QTableWidget
,
QTableWidgetItem
}
from
"
@nodegui/nodegui
"
;
import
{
Q
CheckBox
,
QGridLayout
}
from
"
@nodegui/nodegui
"
;
import
{
ChildProcess
}
from
"
child_process
"
;
import
{
Win_alert
}
from
"
./win_alert
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment