def __init__(self): super(ProgressDialog, self).__init__() self.setWindowTitle('Exporting Textures ...') self.setEnabled(True) self.resize(350, 120) #set layout self.v_layout = QtGui.QVBoxLayout() self.setLayout(self.v_layout) #create cancel button & connect self.cancel_button = QtGui.QPushButton("Cancel") #todo: fix PySide ... utils not working #mari.utils.connect(self.cancel_button.clicked, lambda: self.cancel()) #create other widgets self.pbar = QtGui.QProgressBar(self) self.progress_text = QtGui.QLabel(self) self.progress_text.setText('Exporting Textures ...') self.pbar.setValue(0) #add widgets self.v_layout.addWidget(self.pbar) self.v_layout.addWidget(self.progress_text) self.v_layout.addWidget(self.cancel_button)
def __init__(self, maxStep): super(ProgressDialog, self).__init__() self.setWindowTitle('bnExporter') #--# Var self.breakBake = False #--# Layout layout = QtGui.QVBoxLayout() self.setLayout(layout) self.pbar = QtGui.QProgressBar(self) self.pbar.setRange(0, maxStep) self.pbar.setGeometry(30, 40, 200, 25) self.label = QtGui.QLabel('Exporting..') #--# Connection self.pbar.connect("valueChanged (int)", self.status) #--# Progress GUI layout.addWidget(self.label) layout.addWidget(self.pbar)
def __init__(self, maxStep): super(ProgressDialog, self).__init__() self.setWindowTitle('Exporting Images...') self.cancelCpy = False layout = QtGui.QVBoxLayout() self.setLayout(layout) self.pbar = QtGui.QProgressBar(self) self.pbar.setRange(0, maxStep) self.pbar.setGeometry(30, 40, 200, 25) self.pbar.connect("valueChanged (int)", self.status) layout.addWidget(self.pbar) self.cBtn = QtGui.QPushButton("cancel") self.cBtn.connect('clicked()', lambda: self.cancelCopy()) layout.addWidget(self.cBtn)
def spawnProgressBar(max, min): ql = QtGui.QProgressBar() ql.setMaximum(max) ql.setMinimum(min) ql.setOrientation(QtCore.Qt.Vertical) return ql