Beispiel #1
0
class ProgressBar (QtGui.QMainWindow):
	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)
        	self.ui_ = Ui_ProgressBarGui()
        	self.ui_.setupUi(self)

       		self.connect(self.ui_.pushButton, QtCore.SIGNAL('clicked()'),
				self.sair)
	
	def sair(self):
		quit()

	def setPercentagem(self, x):
		self.ui_.progressBar.setValue(x)
		#self.repaint()

	def setTotal (self, y):
		print y

	def setLabel (self, txt):
		print ">>> " + str(txt)
		self.ui_.status_label.setText(str(txt))
		self.repaint()
		return 1

	def getLabel (self):
		return self.ui_.status_label.text
Beispiel #2
0
	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)
        	self.ui_ = Ui_ProgressBarGui()
        	self.ui_.setupUi(self)

       		self.connect(self.ui_.pushButton, QtCore.SIGNAL('clicked()'),
				self.sair)