From: <je...@us...> - 2003-08-08 00:37:58
|
Update of /cvsroot/quickrip/quickrip/qt In directory sc8-pr-cvs1:/tmp/cvs-serv8469/qt Modified Files: qtmain.py Log Message: Changed int_* to ui_* Index: qtmain.py =================================================================== RCS file: /cvsroot/quickrip/quickrip/qt/qtmain.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** qtmain.py 7 Aug 2003 13:55:56 -0000 1.2 --- qtmain.py 8 Aug 2003 00:30:01 -0000 1.3 *************** *** 13,17 **** from base import * try: ! from qt import * except: print """ --- 13,18 ---- from base import * try: ! #from qt import * ! import qt except: print """ *************** *** 46,59 **** """GUI-specific functions to add a Qt GUI to the DVD class: changeState() - start/stop the ripping process ! int_startScanning() - notify user that the DVD is being scanned ! int_noTracks() - notify user that no tracks were found ! int_dispDVD() - display information about the DVD ! int_dispTrack() - display information about scanned track ! int_finishScanning() - notify user that scanning has finished ! int_startRipping() - notify user that ripping has started ! int_newTrack() - notify that ripping has begun on a new track ! int_newPass() - notify that new ripping pass has begun ! int_updateProgress() - update any ripping progress display being used ! int_finishRipping() - notify user that ripping has finished""" def __init__(self, app, parent=None): --- 47,60 ---- """GUI-specific functions to add a Qt GUI to the DVD class: changeState() - start/stop the ripping process ! ui_startScanning() - notify user that the DVD is being scanned ! ui_noTracks() - notify user that no tracks were found ! ui_dispDVD() - display information about the DVD ! ui_dispTrack() - display information about scanned track ! ui_finishScanning() - notify user that scanning has finished ! ui_startRipping() - notify user that ripping has started ! ui_newTrack() - notify that ripping has begun on a new track ! ui_newPass() - notify that new ripping pass has begun ! ui_updateProgress() - update any ripping progress display being used ! ui_finishRipping() - notify user that ripping has finished""" def __init__(self, app, parent=None): *************** *** 73,88 **** self.outdir = self.config['outputdir'] ! def int_configError(self, bin): self.errormsg = "QuickRip was unable to find " + bin + " on your system.\nCheck it is installed then retry" ! QMessageBox.critical(self, "QuickRip Error", self.errormsg, "OK") sys.exit(2) ! def int_startScanning(self): print "* Scanning DVD..." self.b_ScanDVD.setText("Scanning...") self.dvdTracks.clear() ! def int_noTracks(self): ! QMessageBox.warning(self, "QuickRip Error", "QuickRip was unable to find any " "DVD tracks.\n\nCheck:\n* Mplayer and Transcode are " "installed\n* The program paths are correct in Settings\n" --- 74,89 ---- self.outdir = self.config['outputdir'] ! def ui_configError(self, bin): self.errormsg = "QuickRip was unable to find " + bin + " on your system.\nCheck it is installed then retry" ! qt.QMessageBox.critical(self, "QuickRip Error", self.errormsg, "OK") sys.exit(2) ! def ui_startScanning(self): print "* Scanning DVD..." self.b_ScanDVD.setText("Scanning...") self.dvdTracks.clear() ! def ui_noTracks(self): ! qt.QMessageBox.warning(self, "QuickRip Error", "QuickRip was unable to find any " "DVD tracks.\n\nCheck:\n* Mplayer and Transcode are " "installed\n* The program paths are correct in Settings\n" *************** *** 91,95 **** self.b_ScanDVD.setText("Scan DVD") ! def int_dispDVD(self): #print "Found %s titles" % (self.numtitles) #print "Found audio languages %s" % (self.alangs) --- 92,96 ---- self.b_ScanDVD.setText("Scan DVD") ! def ui_dispDVD(self): #print "Found %s titles" % (self.numtitles) #print "Found audio languages %s" % (self.alangs) *************** *** 103,110 **** self.subTitles.insertItem(lang, -1) ! def int_dispTrack(self, track): self.track = track print "Track %2s: %2s" % (self.track['id'], self.track['timelabel']) ! item = QListViewItem(self.dvdTracks,None) item.setText(0, self.track['name']) item.setText(1, str(self.track['timelabel'])) --- 104,111 ---- self.subTitles.insertItem(lang, -1) ! def ui_dispTrack(self, track): self.track = track print "Track %2s: %2s" % (self.track['id'], self.track['timelabel']) ! item = qt.QListViewItem(self.dvdTracks,None) item.setText(0, self.track['name']) item.setText(1, str(self.track['timelabel'])) *************** *** 114,129 **** if i < 10: i = "0" + str(i) chap_label = "Chapter %s" % (i) ! subitem = QListViewItem(item,None) subitem.setText(0, self.tr(chap_label)) self.app.processEvents() ! def int_finishScanning(self): print "* Finished scanning" self.b_ScanDVD.setText("Scan DVD") ! def int_startRipping(self): print "* Starting ripping" ! def int_newTrack(self, name, number, total, vbr): print "*\tRipping track '%s' (%s of %s) at %skbps" % (name, number, total, vbr) if self.config['passes'] is 1: --- 115,130 ---- if i < 10: i = "0" + str(i) chap_label = "Chapter %s" % (i) ! subitem = qt.QListViewItem(item,None) subitem.setText(0, self.tr(chap_label)) self.app.processEvents() ! def ui_finishScanning(self): print "* Finished scanning" self.b_ScanDVD.setText("Scan DVD") ! def ui_startRipping(self): print "* Starting ripping" ! def ui_newTrack(self, name, number, total, vbr): print "*\tRipping track '%s' (%s of %s) at %skbps" % (name, number, total, vbr) if self.config['passes'] is 1: *************** *** 138,142 **** self.Dialogue.rippingXofY.setText("".join(["Ripping ", str(name), " (", str(number), " of ", str(total), ")"])) ! def int_newPass(self, passtype): self.passtype = passtype if self.passtype is "video1": --- 139,143 ---- self.Dialogue.rippingXofY.setText("".join(["Ripping ", str(name), " (", str(number), " of ", str(total), ")"])) ! def ui_newPass(self, passtype): self.passtype = passtype if self.passtype is "video1": *************** *** 146,150 **** ! def int_updateProgress(self, perc, trem, tpass): self.percentage = perc self.trem = trem --- 147,151 ---- ! def ui_updateProgress(self, perc, trem, tpass): self.percentage = perc self.trem = trem *************** *** 162,166 **** self.app.processEvents() ! def int_finishRipping(self): if self.config['passes'] is 1: self.Dialogue.pm_audioPass.setProgress(100) --- 163,167 ---- self.app.processEvents() ! def ui_finishRipping(self): if self.config['passes'] is 1: self.Dialogue.pm_audioPass.setProgress(100) *************** *** 274,278 **** def browseHD(self): """Launch file dialogue and set output directory""" ! directory = QFileDialog.getExistingDirectory(self.config['outputdir'], \ self, \ "get existing directory", \ --- 275,279 ---- def browseHD(self): """Launch file dialogue and set output directory""" ! directory = qt.QFileDialog.getExistingDirectory(self.config['outputdir'], \ self, \ "get existing directory", \ *************** *** 299,306 **** # Add in progress bars appropriate to number of passes ! l_audiopass = QHBoxLayout(None,0,6,"l_audiopass") ! self.Dialogue.textLabel3 = QLabel(self.Dialogue.groupBox3,"textlabel3") l_audiopass.addWidget(self.Dialogue.textLabel3) ! self.Dialogue.pm_audioPass = QProgressBar(self.Dialogue.groupBox3,"pm_audioPass") self.Dialogue.pm_audioPass.setMinimumSize(QSize(400,0)) l_audiopass.addWidget(self.Dialogue.pm_audioPass) --- 300,307 ---- # Add in progress bars appropriate to number of passes ! l_audiopass = qt.QHBoxLayout(None,0,6,"l_audiopass") ! self.Dialogue.textLabel3 = qt.QLabel(self.Dialogue.groupBox3,"textlabel3") l_audiopass.addWidget(self.Dialogue.textLabel3) ! self.Dialogue.pm_audioPass = qt.QProgressBar(self.Dialogue.groupBox3,"pm_audioPass") self.Dialogue.pm_audioPass.setMinimumSize(QSize(400,0)) l_audiopass.addWidget(self.Dialogue.pm_audioPass) *************** *** 309,316 **** if self.config['passes'] is 2 or self.config['passes'] is 3: ! l_videopass1 = QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel4 = QLabel(self.Dialogue.groupBox3,"textlabel4") l_videopass1.addWidget(self.Dialogue.textLabel4) ! self.Dialogue.pm_videoPass1 = QProgressBar(self.Dialogue.groupBox3,"pm_videoPass1") self.Dialogue.pm_videoPass1.setMinimumSize(QSize(400,0)) l_videopass1.addWidget(self.Dialogue.pm_videoPass1) --- 310,317 ---- if self.config['passes'] is 2 or self.config['passes'] is 3: ! l_videopass1 = qt.QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel4 = qt.QLabel(self.Dialogue.groupBox3,"textlabel4") l_videopass1.addWidget(self.Dialogue.textLabel4) ! self.Dialogue.pm_videoPass1 = qt.QProgressBar(self.Dialogue.groupBox3,"pm_videoPass1") self.Dialogue.pm_videoPass1.setMinimumSize(QSize(400,0)) l_videopass1.addWidget(self.Dialogue.pm_videoPass1) *************** *** 320,327 **** if self.config['passes'] is 3: ! l_videopass2 = QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel5 = QLabel(self.Dialogue.groupBox3,"textlabel5") l_videopass2.addWidget(self.Dialogue.textLabel5) ! self.Dialogue.pm_videoPass2 = QProgressBar(self.Dialogue.groupBox3,"pm_videoPass2") self.Dialogue.pm_videoPass2.setMinimumSize(QSize(400,0)) l_videopass2.addWidget(self.Dialogue.pm_videoPass2) --- 321,328 ---- if self.config['passes'] is 3: ! l_videopass2 = qt.QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel5 = qt.QLabel(self.Dialogue.groupBox3,"textlabel5") l_videopass2.addWidget(self.Dialogue.textLabel5) ! self.Dialogue.pm_videoPass2 = qt.QProgressBar(self.Dialogue.groupBox3,"pm_videoPass2") self.Dialogue.pm_videoPass2.setMinimumSize(QSize(400,0)) l_videopass2.addWidget(self.Dialogue.pm_videoPass2) *************** *** 407,411 **** """Launch file dialogue and set path to MPlayer""" self.path = re.compile('(/.*)/.*').search(self.config['mplayer']).group(1) ! mplayer = QFileDialog.getOpenFileName( self.path, \ "*", \ --- 408,412 ---- """Launch file dialogue and set path to MPlayer""" self.path = re.compile('(/.*)/.*').search(self.config['mplayer']).group(1) ! mplayer = qt.QFileDialog.getOpenFileName( self.path, \ "*", \ *************** *** 418,422 **** """Launch file dialogue and set path to Mencoder""" self.path = re.compile('(/.*)/.*').search(self.config['mencoder']).group(1) ! mencoder = QFileDialog.getOpenFileName( self.path, \ "*", \ --- 419,423 ---- """Launch file dialogue and set path to Mencoder""" self.path = re.compile('(/.*)/.*').search(self.config['mencoder']).group(1) ! mencoder = qt.QFileDialog.getOpenFileName( self.path, \ "*", \ *************** *** 429,433 **** """Launch file dialogue and set path to Tcprobe""" self.path = re.compile('(/.*)/.*').search(self.config['tcprobe']).group(1) ! tcprobe = QFileDialog.getOpenFileName( self.path, \ "*", \ --- 430,434 ---- """Launch file dialogue and set path to Tcprobe""" self.path = re.compile('(/.*)/.*').search(self.config['tcprobe']).group(1) ! tcprobe = qt.QFileDialog.getOpenFileName( self.path, \ "*", \ *************** *** 443,447 **** except: self.path = os.path.join("/", "dev", "dvd") ! dvd_device = QFileDialog.getOpenFileName( self.path, \ "*", \ --- 444,448 ---- except: self.path = os.path.join("/", "dev", "dvd") ! dvd_device = qt.QFileDialog.getOpenFileName( self.path, \ "*", \ *************** *** 453,457 **** def selectOutDir(self): """Launch file dialogue and set output directory""" ! directory = QFileDialog.getExistingDirectory(self.config['outputdir'], \ self, \ "get existing directory", \ --- 454,458 ---- def selectOutDir(self): """Launch file dialogue and set output directory""" ! directory = qt.QFileDialog.getExistingDirectory(self.config['outputdir'], \ self, \ "get existing directory", \ *************** *** 506,511 **** def main(): print "%s v%s, %s\n" % (__app__, __version__, __copyright__) ! app = QApplication(sys.argv) ! QObject.connect(app, SIGNAL('lastWindowClosed()'), app, SLOT('quit()')) win = GUI(app) --- 507,512 ---- def main(): print "%s v%s, %s\n" % (__app__, __version__, __copyright__) ! app = qt.QApplication(sys.argv) ! qt.QObject.connect(app, SIGNAL('lastWindowClosed()'), app, SLOT('quit()')) win = GUI(app) |