Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Client
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rutherford Experiment Lab Course Online
Client
Commits
0d086d1e
Verified
Commit
0d086d1e
authored
4 years ago
by
Tobias Triffterer
Browse files
Options
Downloads
Patches
Plain Diff
Accept Histogram Clearing from Server
To synchronize the histogram content, clear it when it is cleared on the server.
parent
37b3124c
No related branches found
No related tags found
No related merge requests found
Pipeline
#3176
passed with stage
Stage:
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/clientgui.cpp
+6
-2
6 additions, 2 deletions
src/clientgui.cpp
src/clientgui.h
+1
-1
1 addition, 1 deletion
src/clientgui.h
with
7 additions
and
3 deletions
src/clientgui.cpp
+
6
−
2
View file @
0d086d1e
...
@@ -101,7 +101,10 @@ void ClientGui::handleMessageFromServer(const QString& message)
...
@@ -101,7 +101,10 @@ void ClientGui::handleMessageFromServer(const QString& message)
case
Protocol
::
Action
::
closeVacuumValve
:
case
Protocol
::
Action
::
closeVacuumValve
:
case
Protocol
::
Action
::
startAdc
:
case
Protocol
::
Action
::
startAdc
:
case
Protocol
::
Action
::
stopAdc
:
case
Protocol
::
Action
::
stopAdc
:
break
;
case
Protocol
::
Action
::
clearHistogram
:
case
Protocol
::
Action
::
clearHistogram
:
clearHistogram
(
true
);
break
;
case
Protocol
::
Action
::
adcThresholdUp
:
case
Protocol
::
Action
::
adcThresholdUp
:
case
Protocol
::
Action
::
adcThresholdDown
:
case
Protocol
::
Action
::
adcThresholdDown
:
case
Protocol
::
Action
::
queryServerInformation
:
case
Protocol
::
Action
::
queryServerInformation
:
...
@@ -251,7 +254,7 @@ void ClientGui::fillEventsIntoHistogram(const QString& adcchannels)
...
@@ -251,7 +254,7 @@ void ClientGui::fillEventsIntoHistogram(const QString& adcchannels)
_rootcanvas
.
getCanvas
()
->
Update
();
_rootcanvas
.
getCanvas
()
->
Update
();
}
}
void
ClientGui
::
clearHistogram
()
void
Fp311Online
::
ClientGui
::
clearHistogram
(
const
bool
fromServer
)
{
{
sendSimpleActiontoServer
(
Protocol
::
Action
::
clearHistogram
);
sendSimpleActiontoServer
(
Protocol
::
Action
::
clearHistogram
);
for
(
int
i
=
0
;
i
<
ExperimentState
::
NumberOfAdcChannels
-
1
;
i
++
)
for
(
int
i
=
0
;
i
<
ExperimentState
::
NumberOfAdcChannels
-
1
;
i
++
)
...
@@ -260,7 +263,8 @@ void ClientGui::clearHistogram()
...
@@ -260,7 +263,8 @@ void ClientGui::clearHistogram()
_rootcanvas
.
getCanvas
()
->
Modified
();
_rootcanvas
.
getCanvas
()
->
Modified
();
_rootcanvas
.
getCanvas
()
->
Update
();
_rootcanvas
.
getCanvas
()
->
Update
();
sendSimpleActiontoServer
(
Protocol
::
Action
::
clearHistogram
);
if
(
!
fromServer
)
sendSimpleActiontoServer
(
Protocol
::
Action
::
clearHistogram
);
}
}
void
ClientGui
::
showEvent
(
QShowEvent
*
event
)
void
ClientGui
::
showEvent
(
QShowEvent
*
event
)
...
...
This diff is collapsed.
Click to expand it.
src/clientgui.h
+
1
−
1
View file @
0d086d1e
...
@@ -85,7 +85,7 @@ private:
...
@@ -85,7 +85,7 @@ private:
void
displayExperimentState
();
void
displayExperimentState
();
void
fillEventsIntoHistogram
(
const
QString
&
adcchannels
);
void
fillEventsIntoHistogram
(
const
QString
&
adcchannels
);
void
clearHistogram
();
void
clearHistogram
(
const
bool
fromServer
=
false
);
void
showEvent
(
QShowEvent
*
event
)
override
;
void
showEvent
(
QShowEvent
*
event
)
override
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment