From 76a1b0d0a70fce68cc5357436650a15c64fdbce3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mei=C3=9Fner?= <daniel.meissner@inf.h-brs.de>
Date: Sun, 3 Jan 2016 14:39:40 +0100
Subject: [PATCH] gui: added progress bar

---
 lib/gui/gui.py           |  5 +++++
 lib/gui/su_mainwindow.ui | 13 +++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/lib/gui/gui.py b/lib/gui/gui.py
index 40913cc..4cb9c52 100644
--- a/lib/gui/gui.py
+++ b/lib/gui/gui.py
@@ -32,6 +32,7 @@ class SuGui(QtWidgets.QMainWindow):
         self._set_default_dump_file_path()
         self.lineEdit_dump_file.setCursorPosition(0)
         self.refresh_hw_button()
+        self.button_stop.setEnabled(False)
         # button events
         self.button_start.clicked.connect(self.start_button)
         self.button_stop.clicked.connect(self.stop_button)
@@ -67,6 +68,8 @@ class SuGui(QtWidgets.QMainWindow):
         # labels
         self._update_status_label()
         self.label_file_overwrite.setText("change path")
+        # progress_bar
+        self.progressBar.setValue(0)
 
     def start_button(self):
         """
@@ -81,6 +84,8 @@ class SuGui(QtWidgets.QMainWindow):
                 options['capture_time'],
                 options['device']
             )
+            self.button_stop.setEnabled(True)
+            self.button_start.setEnabled(False)
 
             file_sink.capture()
 
diff --git a/lib/gui/su_mainwindow.ui b/lib/gui/su_mainwindow.ui
index 35620f3..cda6d2c 100644
--- a/lib/gui/su_mainwindow.ui
+++ b/lib/gui/su_mainwindow.ui
@@ -380,6 +380,19 @@
      </property>
     </widget>
    </widget>
+   <widget class="QProgressBar" name="progressBar">
+    <property name="geometry">
+     <rect>
+      <x>410</x>
+      <y>2</y>
+      <width>141</width>
+      <height>21</height>
+     </rect>
+    </property>
+    <property name="value">
+     <number>0</number>
+    </property>
+   </widget>
   </widget>
   <widget class="QMenuBar" name="menubar">
    <property name="geometry">
-- 
GitLab