def __init__(self):
     super(AddUrl, self).__init__()
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.progressBar.setVisible(False)
     self.worker = WorkerBuilder.build(bool)
     self.parser = None
Exemple #2
0
 def __init__(self):
     super(YoutubeDLGui, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     Center(self)
     self.download_model = QStandardItemModel(0, 5, self)
     self.download_model.setHeaderData(0, QtCore.Qt.Horizontal, 'Name')
     self.download_model.setHeaderData(1, QtCore.Qt.Horizontal, 'Progress')
     self.download_model.setHeaderData(2, QtCore.Qt.Horizontal, 'Size')
     self.download_model.setHeaderData(3, QtCore.Qt.Horizontal, 'ETA')
     self.download_model.setHeaderData(4, QtCore.Qt.Horizontal, 'Speed')
     self.ui.downloadView.setModel(self.download_model)
     self.pending_model = QStandardItemModel(0, 2, self)
     self.pending_model.setHeaderData(0, QtCore.Qt.Horizontal, 'Name')
     self.pending_model.setHeaderData(1, QtCore.Qt.Horizontal, 'Quality')
     self.ui.pendingView.setModel(self.pending_model)
     self.ui.pendingView.setItemDelegate(CustomToolTipDelegate(self.ui.pendingView))
     self.init_status_bar()
     self.parsing_worker = WorkerBuilder.build(bool)
     self.pending_list = []