def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setWindowTitle("Color tuner") self.iWidget = ImagesWidget(self) self.cWidget = ControlWidget(self) self.verticalLayoutWidget = QWidget(self) self.verticalLayoutWidget.setGeometry(QRect(20, 30, 361, 301)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.vLayout = QVBoxLayout(self.verticalLayoutWidget) self.vLayout.setObjectName("vLayout") self.vLayout.addWidget(self.iWidget) self.vLayout.addWidget(self.cWidget) self.iWidget.setVisible(True) self.cWidget.setVisible(True) self.updGUI.connect(self.updateGUI) #self.controlCommunicator=Communicator() #self.imageCommunicator=Communicator() #self.setLayout(self.vLayout) self.setCentralWidget(self.verticalLayoutWidget) self.filt = 'Orig'
class MainWindow(QMainWindow): updGUI=pyqtSignal() def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setWindowTitle("Color tuner") self.iWidget = ImagesWidget(self) self.cWidget = ControlWidget(self) self.verticalLayoutWidget = QWidget(self) self.verticalLayoutWidget.setGeometry(QRect(20, 30, 361, 301)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.vLayout = QVBoxLayout(self.verticalLayoutWidget) self.vLayout.setObjectName("vLayout") self.vLayout.addWidget(self.iWidget) self.vLayout.addWidget(self.cWidget) self.iWidget.setVisible(True) self.cWidget.setVisible(True) self.updGUI.connect(self.updateGUI) #self.controlCommunicator=Communicator() #self.imageCommunicator=Communicator() #self.setLayout(self.vLayout) self.setCentralWidget(self.verticalLayoutWidget) self.filt = 'Orig' def getCamera(self): return self.camera def setCamera(self,camera): self.camera = camera def getFilterName(self): return self.filt def setFilterName(self,filt): self.filt = filt def updateGUI(self): self.iWidget.imageUpdate.emit() #self.cWidget.controlUpdate.emit() def closeEvent(self, event): self.camera.stop() event.accept()
class MainWindow(QMainWindow): updGUI = pyqtSignal() def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setWindowTitle("Color tuner") self.iWidget = ImagesWidget(self) self.cWidget = ControlWidget(self) self.verticalLayoutWidget = QWidget(self) self.verticalLayoutWidget.setGeometry(QRect(20, 30, 361, 301)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.vLayout = QVBoxLayout(self.verticalLayoutWidget) self.vLayout.setObjectName("vLayout") self.vLayout.addWidget(self.iWidget) self.vLayout.addWidget(self.cWidget) self.iWidget.setVisible(True) self.cWidget.setVisible(True) self.updGUI.connect(self.updateGUI) #self.controlCommunicator=Communicator() #self.imageCommunicator=Communicator() #self.setLayout(self.vLayout) self.setCentralWidget(self.verticalLayoutWidget) self.filt = 'Orig' def getCamera(self): return self.camera def setCamera(self, camera): self.camera = camera def getFilterName(self): return self.filt def setFilterName(self, filt): self.filt = filt def updateGUI(self): self.iWidget.imageUpdate.emit() #self.cWidget.controlUpdate.emit() def closeEvent(self, event): self.camera.stop() event.accept()