Пример #1
0
 def setup_ui(self):
     self.setWindowIcon(QIcon(I('download-metadata.png')))
     self.choose_resources = cr = ChooseResources(self)
     self.download_status = ds = DownloadStatus(self)
     self.success = s = QLabel('')
     s.setWordWrap(True)
     self.l = l = QVBoxLayout(self)
     self.wait = WaitStack(_('Searching for external resources...'), cr, self)
     self.wait.addWidget(ds), self.wait.addWidget(s)
     self.wait.start()
     for t, f in ((_('Select &none'), cr.select_none), (_('Select &all'), cr.select_all)):
         b = self.bb.addButton(t, QDialogButtonBox.ButtonRole.ActionRole)
         b.clicked.connect(f), b.setAutoDefault(False)
     self.bb.setVisible(False)
     l.addWidget(self.wait), l.addWidget(self.bb)
     t = Thread(name='GetResources', target=self.get_resources)
     t.daemon = True
     t.start()