Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dfss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mpcs
dfss
Commits
fe817aef
Commit
fe817aef
authored
May 19, 2016
by
Loïck Bonniot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '450_demo_step_by_step' into 'master'
[d] Add step-by-step and remove auto replay See merge request
!76
parents
1d07c0d8
1aa4eb66
Pipeline
#1827
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
dfssd/gui/events.go
dfssd/gui/events.go
+7
-0
dfssd/gui/widget.ui
dfssd/gui/widget.ui
+1
-1
dfssd/gui/window.go
dfssd/gui/window.go
+5
-1
No files found.
dfssd/gui/events.go
View file @
fe817aef
...
...
@@ -91,6 +91,7 @@ func (w *Window) initTimer() {
w
.
timer
.
OnTimeout
(
func
()
{
nbEvents
:=
len
(
w
.
scene
.
Events
)
if
w
.
scene
.
currentEvent
>=
nbEvents
{
w
.
stopButton
.
Click
()
w
.
replayButton
.
Click
()
return
}
...
...
@@ -116,6 +117,7 @@ func (w *Window) initTimer() {
quantum
:=
time
.
Duration
(
w
.
quantumField
.
Value
())
*
time
.
Microsecond
endOfQuantum
:=
w
.
scene
.
currentTime
.
Add
(
quantum
)
drawnEvents
:=
0
for
i
:=
w
.
scene
.
currentEvent
;
i
<
nbEvents
;
i
++
{
e
:=
w
.
scene
.
Events
[
i
]
...
...
@@ -125,10 +127,15 @@ func (w *Window) initTimer() {
w
.
DrawEvent
(
&
e
)
w
.
scene
.
currentEvent
++
drawnEvents
++
}
w
.
PrintQuantumInformation
()
w
.
scene
.
currentTime
=
endOfQuantum
if
w
.
speedSlider
.
Value
()
==
0
&&
drawnEvents
>
0
{
w
.
stopButton
.
Click
()
// step-by-step
}
})
}
...
...
dfssd/gui/widget.ui
View file @
fe817aef
...
...
@@ -187,7 +187,7 @@
<enum>
Qt::TabFocus
</enum>
</property>
<property
name=
"minimum"
>
<number>
1
</number>
<number>
0
</number>
</property>
<property
name=
"maximum"
>
<number>
20
</number>
...
...
dfssd/gui/window.go
View file @
fe817aef
...
...
@@ -122,7 +122,11 @@ func (w *Window) addActions() {
w
.
playButton
.
OnClicked
(
func
()
{
w
.
playButton
.
SetDisabled
(
true
)
w
.
stopButton
.
SetDisabled
(
false
)
speed
:=
2000
/
w
.
speedSlider
.
Value
()
s
:=
w
.
speedSlider
.
Value
()
if
s
==
0
{
s
=
100
// step-by-step arbitrary speed value
}
speed
:=
2000
/
s
w
.
timer
.
StartWithMsec
(
speed
)
})
...
...
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