Skip to content

Commit

Permalink
Webcam dialog shows cam port being used
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeldon committed Oct 16, 2017
1 parent 7cde89a commit b92dd38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
12 changes: 4 additions & 8 deletions gui/design/webcam_dialog_design.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'webcam_view.ui'
# Form implementation generated from reading ui file 'design\webcam_view.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
Expand All @@ -16,15 +16,12 @@ def _fromUtf8(s):

try:
_encoding = QtGui.QApplication.UnicodeUTF8


def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)


class Ui_WebCam(object):
def setupUi(self, WebCam):
WebCam.setObjectName(_fromUtf8("WebCam"))
Expand Down Expand Up @@ -74,9 +71,8 @@ def setupUi(self, WebCam):

def retranslateUi(self, WebCam):
WebCam.setWindowTitle(_translate("WebCam", "ThermoGUI - Webcam", None))
self.webcam_view.setText(_translate("WebCam",
"<html><head/><body><p align=\"center\"><span style=\" font-weight:600;\">WebCam</span></p></body></html>",
None))
self.webcam_view.setText(_translate("WebCam", "<html><head/><body><p align=\"center\"><span style=\" font-weight:600;\">WebCam</span></p></body></html>", None))
self.previous_button.setText(_translate("WebCam", "Previous", None))
self.ok_button.setText(_translate("WebCam", "OK!", None))
self.ok_button.setText(_translate("WebCam", "Use port 0!", None))
self.next_button.setText(_translate("WebCam", "Next", None))

2 changes: 1 addition & 1 deletion gui/design/webcam_view.ui
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<item>
<widget class="QPushButton" name="ok_button">
<property name="text">
<string>OK!</string>
<string>Use port 0!</string>
</property>
</widget>
</item>
Expand Down
1 change: 1 addition & 0 deletions gui/dialogs/webcam_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def set_webcam(self):
self.cap.release()
self.cap = cv2.VideoCapture(self.webcam_value)
self.start()
self.ok_button.setText("Use port {}!".format(self.webcam_value))

def start(self):
self.timer = QtCore.QTimer()
Expand Down

0 comments on commit b92dd38

Please sign in to comment.