[kamera commit] r74 - trunk/kamera

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 21, 2009, 12:56:24 AM1/21/09
to kamera-...@googlegroups.com
Author: ugur.jnmbk
Date: Tue Jan 20 20:48:29 2009
New Revision: 74

Modified:
trunk/kamera/mainwindow.py

Log:
connect the error signal

Modified: trunk/kamera/mainwindow.py
==============================================================================
--- trunk/kamera/mainwindow.py (original)
+++ trunk/kamera/mainwindow.py Tue Jan 20 20:48:29 2009
@@ -47,8 +47,8 @@
self.pixmap = QtGui.QPixmap.fromImage(self.image)
self.imageLabel.setPixmap(self.pixmap)
except TypeError:
- #webcam not recognized
- self.emit(QtCore.SIGNAL("error"))
+ self.emit(QtCore.SIGNAL("error"),
QtGui.QApplication.translate("MainWindow", "No webcam found"))
+ self.camThread.terminate()

class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
def __init__(self):
@@ -59,7 +59,7 @@
self.createImageList()
self.opencvwidget = MyOpenCVWidget(self.label_webcam)
self.configWindow = ConfigWindow(self)
- #TODO: connect opencvwidget's error signal to a slot
+ self.connect(self.opencvwidget, QtCore.SIGNAL("error"),
self.label_webcam.setText)

def createImageList(self):
self.imageFiles = [file for file in os.listdir(".") if
file.startswith("kamera_")]

Reply all
Reply to author
Forward
0 new messages