class CameraWidget(QtGui.QWidget): """ Constructor """ def __init__(self,main_widget): # Call parent class constructor super(CameraWidget,self).__init__() # Assign main layout self.main_widget = main_widget # Call child constructor self.initUI() def initUI(self): self.cameraFeed = CameraFeed(self.main_widget) self.cameraControl = CameraControl(self.main_widget) vbox = QtGui.QVBoxLayout() self.setLayout(vbox) vbox.addWidget(self.cameraFeed) vbox.addWidget(self.cameraControl) def updateImage(self,Stack = False): if Stack: self.cameraFeed.updateImage(self.main_widget.imageProcessingTab.mask_btn.isChecked(),Stack = Stack) else: self.cameraFeed.updateImage(self.main_widget.imageProcessingTab.mask_btn.isChecked()) self.cameraControl.update_exposure_value()
def initUI(self): self.cameraFeed = CameraFeed(self.main_widget) self.cameraControl = CameraControl(self.main_widget) vbox = QtGui.QVBoxLayout() self.setLayout(vbox) vbox.addWidget(self.cameraFeed) vbox.addWidget(self.cameraControl)