Skip to content

Commit

Permalink
minor improvements of QuickView UI
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Oct 7, 2019
1 parent 94adf36 commit fb2beaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions shapeout2/gui/quick_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ def show_event(self, event):
idmaxx = idmaxx if idmaxx < shx else shx
idmaxy = idmaxy if idmaxy < shy else shy
cellimg = cellimg[idminx:idmaxx, idminy:idmaxy]
self.imageView_image.setImage(cellimg, **imkw)
self.groupBox_image.show()
else:
cellimg = np.zeros((50, 50, 3))

self.imageView_image.setImage(cellimg, **imkw)
self.groupBox_image.hide()

if "trace" in ds:
for key in dclab.dfn.FLUOR_TRACES:
Expand All @@ -265,12 +265,15 @@ def show_event(self, event):
show = True
if (key in ds["trace"] and show):
# show the trace information
tracey = ds["trace"][key][event]
tracex = np.arange(tracey.size)
tracey = ds["trace"][key][event] # trace data
tracex = np.arange(tracey.size) # time data
self.trace_plots[key].setData(tracex, tracey)
self.trace_plots[key].show()
else:
self.trace_plots[key].hide()
self.groupBox_trace.show()
else:
self.groupBox_trace.hide()

def on_tool(self):
"""Show and hide tools when the user selected a tool button"""
Expand Down Expand Up @@ -376,6 +379,7 @@ def show_rtdc(self, path, filters):

self.spinBox_event.blockSignals(True)
self.spinBox_event.setMaximum(event_count)
self.spinBox_event.setToolTip("total: {}".format(event_count))
self.spinBox_event.setValue(1)
self.spinBox_event.blockSignals(False)

Expand Down
4 changes: 2 additions & 2 deletions shapeout2/gui/quick_view.ui
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="groupBox_image">
<property name="title">
<string>Brightfield image</string>
</property>
Expand Down Expand Up @@ -351,7 +351,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="groupBox_trace">
<property name="title">
<string>Fluorescence traces</string>
</property>
Expand Down

0 comments on commit fb2beaf

Please sign in to comment.