Beispiel #1
0
 def __init__(self, parent=None):
     super(CaptureSequenceWidget, self).__init__(parent)
     self.ui = Ui_CaptureSequence()
     self.ui.setupUi(self)
     self.viewImageScene = QtGui.QGraphicsScene()
     self.ui.viewImageGraphicsView.setScene(self.viewImageScene)
     self.ui.viewImageGraphicsView.scale(0.35, 0.35)
Beispiel #2
0
class CaptureSequenceWidget(QtGui.QWidget):
    def __init__(self, parent=None):
        super(CaptureSequenceWidget, self).__init__(parent)
        self.ui = Ui_CaptureSequence()
        self.ui.setupUi(self)
        self.viewImageScene = QtGui.QGraphicsScene()
        self.ui.viewImageGraphicsView.setScene(self.viewImageScene)
        self.ui.viewImageGraphicsView.scale(0.35, 0.35)

    def setCaptureSize(self, max):
        self.capSize = max

    def setCurrentCaptureNumber(self, currentNo):
        dspTxt = "Done capture: " + str(currentNo) + " of " + str(self.capSize)
        self.ui.captureProgressLabel.setText(dspTxt)

    def setCurrentDownloadNumber(self, currentNo, saveFilePath):
        dspTxt = "\nDownloaded capture " + str(
            currentNo) + " to: " + saveFilePath
        self.ui.captureProgressLabel.setText(dspTxt)
        self.setViewImage(QtGui.QPixmap(saveFilePath))

    def setDisplayTest(self, text):
        self.ui.captureProgressLabel.setText(text)

    def setViewImage(self, pixmap):
        gitems = self.viewImageScene.items()
        for gitem in gitems:
            self.viewImageScene.removeItem(gitem)
        self.viewImageScene.addPixmap(pixmap)
        self.viewImageScene.setSceneRect(0, 0, pixmap.width(), pixmap.height())