Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LO21_Pin_Noir_Boucher_Bouri_Detree
CellulutLO21
Commits
9de7e6dd
Unverified
Commit
9de7e6dd
authored
Jun 09, 2021
by
Merwane Bouri
Browse files
Correction Bouton Play/Pause
parent
d4e87f28
Pipeline
#79526
passed with stages
in 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
forms/interface.ui
View file @
9de7e6dd
...
...
@@ -76,7 +76,7 @@
<item>
<widget
class=
"QPushButton"
name=
"playPauseButton"
>
<property
name=
"text"
>
<string>
P
ause
</string>
<string>
P
lay
</string>
</property>
</widget>
</item>
...
...
src/interface.cpp
View file @
9de7e6dd
...
...
@@ -794,11 +794,11 @@ void MainWindow::on_playPauseButton_clicked()
{
if
(
timer
->
isActive
())
{
//Pause
ui
->
playPauseButton
->
setText
(
"P
ause
"
);
ui
->
playPauseButton
->
setText
(
"P
lay
"
);
timer
->
stop
();
}
else
{
//Play
ui
->
playPauseButton
->
setText
(
"
play
"
);
ui
->
playPauseButton
->
setText
(
"
Pause
"
);
int
frequence
=
ui
->
simSpeedSpinbox
->
value
();
if
(
frequence
==
0
)
{
QMessageBox
::
critical
(
this
,
"Impossible de démarrer"
,
"Impossible de lancer la simulation à une vitesse nulle."
);
...
...
@@ -815,6 +815,7 @@ void MainWindow::on_resetButton_clicked() {
if
(
timer
->
isActive
())
{
timer
->
stop
();
}
ui
->
playPauseButton
->
setText
(
"Play"
);
simulation
.
reset
();
ui
->
grid_view
->
copy_grid
(
simulation
.
getGrid
());
ui
->
stepsPeriodLabel
->
setText
(
QString
::
number
(
simulation
.
getPeriod
())
+
" steps"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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