aboutsummaryrefslogtreecommitdiff
path: root/eitControl.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-24 14:30:53 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-24 14:31:16 -0400
commite294049e605d90ed5465f766bbd2d26b7fc8d03c (patch)
treeb2158987e32c902de6230da23cbac5048f4557df /eitControl.py
parent2e9f7a2d42090a30a0c38b0d72cd49c9fee6b91d (diff)
downloadqolab-e294049e605d90ed5465f766bbd2d26b7fc8d03c.tar.gz
qolab-e294049e605d90ed5465f766bbd2d26b7fc8d03c.zip
added status line
Diffstat (limited to 'eitControl.py')
-rw-r--r--eitControl.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/eitControl.py b/eitControl.py
index f6c53e8..bbc5fd2 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -95,8 +95,10 @@ class Experiment:
d1 = Dock("Global", size=(5,1))
d2 = Dock("Data", size=(100,100))
d3 = Dock("RF Gen", size=(1,2))
+ dS = Dock("Status", size=(1,2))
area.addDock(d1, 'top')
- area.addDock(d2, 'bottom', d1)
+ area.addDock(dS, 'bottom', d1)
+ area.addDock(d2, 'bottom', dS)
area.addDock(d3, 'bottom', d2)
self.root.addWidget(area)
@@ -131,6 +133,10 @@ class Experiment:
w1.addWidget(bExit, row=0, col=4)
d1.addWidget(w1)
+ ## status line
+ self.statusline = l = QtGui.QLabel("All ok")
+ dS.addWidget(l, row=1, col=0)
+
# RF gen gui
fCent=self.rfGenFunc.getCenter()
fSpan=self.rfGenFunc.getSpan()
@@ -197,7 +203,6 @@ class Experiment:
def saveCmd(self):
csv_file = self.getNewDataFileName(ext='csv')
- print(f"Saving to {csv_file}")
data = self.data
try:
with open(csv_file, 'w') as csvfile:
@@ -206,6 +211,9 @@ class Experiment:
writer.writerows(zip(*data.values()))
except IOError:
print('I/O error')
+ msg = f"data saved to {csv_file}"
+ print(msg)
+ self.statusline.setText(msg)
png_file=csv_file.replace(".csv", ".png")
print(f"Picture saved to {png_file}")