Exemple #1
0
 def __init__(self):
     '''
     Constructor
     '''
     
     super(MainWindow, self).__init__()
     uic.loadUi('ui/mainwindow.ui', self)
     self.zmq_ctx = zmq.Context()
     self.controller = MainWindowController(self.zmq_ctx, self)
Exemple #2
0
class MainWindow(QtWidgets.QMainWindow):
    '''
    '''


    def __init__(self):
        '''
        Constructor
        '''
        
        super(MainWindow, self).__init__()
        uic.loadUi('ui/mainwindow.ui', self)
        self.zmq_ctx = zmq.Context()
        self.controller = MainWindowController(self.zmq_ctx, self)
        
    def newStream(self):
        dlg = NewStreamDialog()
        if dlg.exec_() == QtWidgets.QDialog.Accepted:
            result = dlg.result()
            self.controller.startStream(result)
        
    def closeEvent(self, e):
        self.controller.stopAllStreams()