def main(): window = tk.Tk() window.title("Camera Monitor System") window.geometry("1030x480") # title title = tk.Label(window, text="Camera Monitor - v1.0", bg='green', fg="white", font=('Arial', 12), width=30, height=2) title.grid(row=1, column=2, ipadx=10) # blank gap blank_label = tk.Label(window, height=4) blank_label.grid(row=2, column=1) for i in range(3): sub_window_list.append(CameraWindow(i, window)) for win in sub_window_list: win.join_all_threads() window.mainloop()
def __init__(self, manager, name, config): Module.__init__(self, manager, name, config) #camDev = self.config['camDev'] #self.cam = self.manager.getDevice(camDev) self.ui = CameraWindow(self) mp = os.path.dirname(__file__) self.ui.setWindowIcon(QtGui.QIcon(os.path.join(mp, 'icon.png'))) manager.declareInterface(name, ['cameraModule'], self)
class Camera(Module): def __init__(self, manager, name, config): Module.__init__(self, manager, name, config) self.ui = CameraWindow(self) mp = os.path.dirname(__file__) self.ui.setWindowIcon(QtGui.QIcon(os.path.join(mp, 'icon.png'))) manager.declareInterface(name, ['cameraModule'], self) def window(self): return self.ui def quit(self, fromUi=False): if not fromUi: self.ui.quit() Module.quit(self) def insertROI(self, roi): return handle
class Camera(Module): def __init__(self, manager, name, config): Module.__init__(self, manager, name, config) #camDev = self.config['camDev'] #self.cam = self.manager.getDevice(camDev) self.ui = CameraWindow(self) mp = os.path.dirname(__file__) self.ui.setWindowIcon(QtGui.QIcon(os.path.join(mp, 'icon.png'))) manager.declareInterface(name, ['cameraModule'], self) def window(self): return self.ui def quit(self, fromUi=False): if not fromUi: self.ui.quit() Module.quit(self) #def hasInterface(self, interface): #return interface in ['DataSource', 'Canvas'] def insertROI(self, roi): return handle
def __init__(self, manager, name, config): Module.__init__(self, manager, name, config) self.ui = CameraWindow(self) mp = os.path.dirname(__file__) self.ui.setWindowIcon(QtGui.QIcon(os.path.join(mp, 'icon.png'))) manager.declareInterface(name, ['cameraModule'], self)