Python PyQt4.QtGui.QProgressBar() Examples
The following are 12
code examples of PyQt4.QtGui.QProgressBar().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt4.QtGui
, or try the search function
.
Example #1
Source File: ListItemWidgets.py From qgis-cartodb with GNU General Public License v2.0 | 6 votes |
def __init__(self, tableName=None, layer=None, size=None, rows=None): CartoDBDatasetsListItem.__init__(self, tableName, None, size, rows) ''' self.ui.statusLB = QLabel(self) self.ui.statusLB.setMaximumSize(QSize(100, 16777215)) self.ui.statusLB.setAlignment(Qt.AlignCenter | Qt.AlignTrailing | Qt.AlignVCenter) self.ui.statusLB.setWordWrap(True) self.ui.horizontalLayout.insertWidget(1, self.ui.statusLB) ''' self.ui.statusBar = QProgressBar(self) self.ui.statusBar.setProperty("value", 0) self.ui.statusBar.setFormat("Init") self.ui.statusBar.setAutoFillBackground(True) self.ui.statusBar.hide() self.ui.horizontalLayout.insertWidget(1, self.ui.statusBar) self.layer = layer
Example #2
Source File: file_upload.py From EasyStorj with MIT License | 6 votes |
def add_row_files_queue_table(self, row_data): self.files_queue_progressbar_list.append(QtGui.QProgressBar()) self.files_queue_table_row_count = self.ui_single_file_upload.files_queue_table_widget.rowCount() self.ui_single_file_upload.files_queue_table_widget.setRowCount( self.files_queue_table_row_count + 1) self.ui_single_file_upload.files_queue_table_widget.setItem( self.files_queue_table_row_count, 0, QtGui.QTableWidgetItem(os.path.split(str(row_data['file_path']))[1])) self.ui_single_file_upload.files_queue_table_widget.setItem( self.files_queue_table_row_count, 1, QtGui.QTableWidgetItem(row_data['file_path'])) self.ui_single_file_upload.files_queue_table_widget.setItem( self.files_queue_table_row_count, 2, QtGui.QTableWidgetItem(str(self.tools.human_size(os.path.getsize(str(row_data['file_path'])))))) self.ui_single_file_upload.files_queue_table_widget.setCellWidget( self.files_queue_table_row_count, 3, self.files_queue_progressbar_list[self.files_queue_table_row_count])
Example #3
Source File: CartoDBPlugin.py From qgis-cartodb with GNU General Public License v2.0 | 5 votes |
def addLoadingMsg(self, countLayers, barText='Downloading datasets'): barText = self.tr(barText) progressMessageBar = self.iface.messageBar().createMessage(barText, '0/' + str(countLayers)) progress = QProgressBar() progress.setMaximum(countLayers) progress.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) progressMessageBar.layout().addWidget(progress) return progressMessageBar, progress
Example #4
Source File: ui_main.py From Python-GUI-examples with MIT License | 5 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(993, 692) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.pbLevel = QtGui.QProgressBar(self.centralwidget) self.pbLevel.setMaximum(1000) self.pbLevel.setProperty("value", 123) self.pbLevel.setTextVisible(False) self.pbLevel.setOrientation(QtCore.Qt.Vertical) self.pbLevel.setObjectName(_fromUtf8("pbLevel")) self.horizontalLayout.addWidget(self.pbLevel) self.frame = QtGui.QFrame(self.centralwidget) self.frame.setFrameShape(QtGui.QFrame.NoFrame) self.frame.setFrameShadow(QtGui.QFrame.Plain) self.frame.setObjectName(_fromUtf8("frame")) self.verticalLayout = QtGui.QVBoxLayout(self.frame) self.verticalLayout.setMargin(0) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label = QtGui.QLabel(self.frame) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.grFFT = PlotWidget(self.frame) self.grFFT.setObjectName(_fromUtf8("grFFT")) self.verticalLayout.addWidget(self.grFFT) self.label_2 = QtGui.QLabel(self.frame) self.label_2.setObjectName(_fromUtf8("label_2")) self.verticalLayout.addWidget(self.label_2) self.grPCM = PlotWidget(self.frame) self.grPCM.setObjectName(_fromUtf8("grPCM")) self.verticalLayout.addWidget(self.grPCM) self.horizontalLayout.addWidget(self.frame) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #5
Source File: masterDialog.py From crazyflieROS with GNU General Public License v2.0 | 5 votes |
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(452, 139) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth()) Dialog.setSizePolicy(sizePolicy) self.gridLayout = QtGui.QGridLayout(Dialog) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label = QtGui.QLabel(Dialog) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setWordWrap(True) self.label.setObjectName(_fromUtf8("label")) self.gridLayout.addWidget(self.label, 0, 0, 1, 1) self.progressBar = QtGui.QProgressBar(Dialog) self.progressBar.setMinimum(0) self.progressBar.setMaximum(0) self.progressBar.setProperty("value", -1) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 1) self.buttonBox = QtGui.QDialogButtonBox(Dialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Help) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1) self.retranslateUi(Dialog) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
Example #6
Source File: widgets.py From kano-burners with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, stages=1): QtGui.QProgressBar.__init__(self, parent) self.stages = stages self.stages_completed = 0 self.current_stage_progress = 0 # @Override
Example #7
Source File: telebix.py From Telebix with GNU General Public License v3.0 | 5 votes |
def start_program(): app = QtGui.QApplication(sys.argv) splash_pix = QtGui.QPixmap('resources/telebix_splash.png') splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint) splash.setWindowIcon(QtGui.QIcon('resources/icon.png')) splash.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.FramelessWindowHint) splash.setEnabled(False) Bar = QtGui.QProgressBar(splash) Bar.setMaximum(10) Bar.setGeometry(0, splash_pix.height() - 20, splash_pix.width(), 20) splash.show() for i in range(1, 11): Bar.setValue(i) t = time.time() while time.time() < t + 0.2: app.processEvents() splash.close() ui = jobs.App() ui.plot_conf() ui.init_button() ui.show() app.exec_()
Example #8
Source File: measure_interface.py From CrisisMappingToolkit with Apache License 2.0 | 5 votes |
def __init__(self, cancel_function): QtGui.QWidget.__init__(self) self.update_signal.connect(self.apply_update, QtCore.Qt.QueuedConnection) self.cancel_function = cancel_function self.lake_totals = None self.lake_counts = None self.progressBar = QtGui.QProgressBar(self) self.progressBar.setMinimumSize(500, 50) self.progressBar.setMaximumSize(500, 50) self.progressBar.setRange(0, 100) self.progressBar.setValue(0) self.status = QtGui.QLabel(self) self.status.setText("") self.cancelButton = QtGui.QPushButton('Cancel', self) self.cancelButton.setMinimumSize(50, 30) self.cancelButton.setMaximumSize(100, 50) self.cancelButton.clicked[bool].connect(self._cancel) vbox = QtGui.QVBoxLayout(self) vbox.addWidget(self.progressBar) vbox.addWidget(self.status) vbox.addWidget(self.cancelButton) vbox.addStretch(1) self.setLayout(vbox)
Example #9
Source File: MotorControlModernUi.py From rpi-course with MIT License | 5 votes |
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(534, 310) self.dial = QtGui.QDial(Dialog) self.dial.setGeometry(QtCore.QRect(120, -10, 311, 261)) self.dial.setMaximum(100) self.dial.setObjectName(_fromUtf8("dial")) self.lcdNumber = QtGui.QLCDNumber(Dialog) self.lcdNumber.setGeometry(QtCore.QRect(10, 250, 71, 41)) self.lcdNumber.setAutoFillBackground(False) self.lcdNumber.setFrameShape(QtGui.QFrame.StyledPanel) self.lcdNumber.setFrameShadow(QtGui.QFrame.Raised) self.lcdNumber.setDigitCount(3) self.lcdNumber.setSegmentStyle(QtGui.QLCDNumber.Filled) self.lcdNumber.setObjectName(_fromUtf8("lcdNumber")) self.progressBar = QtGui.QProgressBar(Dialog) self.progressBar.setGeometry(QtCore.QRect(90, 250, 441, 41)) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.groupBox = QtGui.QGroupBox(Dialog) self.groupBox.setGeometry(QtCore.QRect(10, 160, 71, 80)) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.CWButton = QtGui.QRadioButton(self.groupBox) self.CWButton.setGeometry(QtCore.QRect(10, 20, 82, 17)) self.CWButton.setChecked(True) self.CWButton.setObjectName(_fromUtf8("CWButton")) self.CCWButton = QtGui.QRadioButton(self.groupBox) self.CCWButton.setGeometry(QtCore.QRect(10, 40, 81, 31)) self.CCWButton.setObjectName(_fromUtf8("CCWButton")) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
Example #10
Source File: file_upload.py From EasyStorj with MIT License | 5 votes |
def add_row_upload_queue_table(self, row_data): self.upload_queue_progressbar_list.append(QtGui.QProgressBar()) self.upload_queue_table_row_count = self.ui_single_file_upload.shard_queue_table_widget.rowCount() self.ui_single_file_upload.shard_queue_table_widget.setRowCount( self.upload_queue_table_row_count + 1) self.ui_single_file_upload.shard_queue_table_widget.setCellWidget( self.upload_queue_table_row_count, 0, self.upload_queue_progressbar_list[self.upload_queue_table_row_count]) self.ui_single_file_upload.shard_queue_table_widget.setItem( self.upload_queue_table_row_count, 1, QtGui.QTableWidgetItem(row_data['hash'])) self.ui_single_file_upload.shard_queue_table_widget.setItem( self.upload_queue_table_row_count, 2, QtGui.QTableWidgetItem( '%s:%d' % (row_data['farmer_address'], row_data['farmer_port']) + "/" + row_data['farmer_id'])) self.ui_single_file_upload.shard_queue_table_widget.setItem( self.upload_queue_table_row_count, 3, QtGui.QTableWidgetItem( str(row_data['state']))) self.ui_single_file_upload.shard_queue_table_widget.setItem( self.upload_queue_table_row_count, 4, QtGui.QTableWidgetItem( str(row_data['token']))) self.ui_single_file_upload.shard_queue_table_widget.setItem( self.upload_queue_table_row_count, 5, QtGui.QTableWidgetItem( str(row_data['shard_index']))) if AUTO_SCROLL_UPLOAD_DOWNLOAD_QUEUE: self.ui_single_file_upload.shard_queue_table_widget.scrollToBottom() self.upload_queue_progressbar_list[self.upload_queue_table_row_count].setValue(0) self.__logger.info(row_data)
Example #11
Source File: file_download.py From EasyStorj with MIT License | 5 votes |
def add_row_download_queue_table(self, row_data): """ Add a row to the download queue table """ self.download_queue_progressbar_list.append(QtGui.QProgressBar()) self.download_queue_table_row_count = \ self.ui_single_file_download.shard_queue_table.rowCount() self.ui_single_file_download.shard_queue_table.setRowCount( self.download_queue_table_row_count + 1) self.ui_single_file_download.shard_queue_table.setCellWidget( self.download_queue_table_row_count, 0, self.download_queue_progressbar_list[ self.download_queue_table_row_count]) self.ui_single_file_download.shard_queue_table.setItem( self.download_queue_table_row_count, 1, QtGui.QTableWidgetItem(row_data['hash'])) self.ui_single_file_download.shard_queue_table.setItem( self.download_queue_table_row_count, 2, QtGui.QTableWidgetItem('%s:%s' % ( row_data['farmer_address'], row_data['farmer_port']) + "/" + row_data['farmer_id'])) self.ui_single_file_download.shard_queue_table.setItem( self.download_queue_table_row_count, 3, QtGui.QTableWidgetItem(str(row_data['state']))) self.ui_single_file_download.shard_queue_table.setItem( self.download_queue_table_row_count, 4, QtGui.QTableWidgetItem(str(row_data['shard_index']))) self.download_queue_progressbar_list[ self.download_queue_table_row_count].setValue(0)
Example #12
Source File: certificates.py From certificate_generator with GNU General Public License v3.0 | 4 votes |
def __init__(self, save_folder, cert_data, clients, responsible, preview=False): """ Setup all widgets. """ super(GenerateCertificateProgress, self).__init__() # Window config self.setWindowTitle(u"Gerando certificados") self.setGeometry(450, 300, 400, 200) self.preview = preview self.n = 0 self.total = len(clients)+1 # Creates the new thread self.generate_thread = GenerateThread(self.preview) self.generate_thread._get_info(save_folder, cert_data, clients, responsible) # Connect the signals with slots self.connect( self.generate_thread, QtCore.SIGNAL("finished()"), self.done ) self.connect( self.generate_thread, QtCore.SIGNAL("update"), self.update ) # Defines the layouts self.mainLayout = QtGui.QVBoxLayout() # Widget config self.titleLabel = QtGui.QLabel(u"Gerando certificados", self) self.titleLabel.setFont(titleFont) # Make the progress bar from 0 to 100 self.progress_bar = QtGui.QProgressBar() self.progress_bar.setRange(0, 100) self.status = QtGui.QLabel(u"Carregando...", self) # Make the cancel button self.cancelBtn = QtGui.QPushButton(u"Cancelar") self.cancelBtn.clicked.connect(self.generate_thread.terminate) # Add all widgets to the mainLayout self.mainLayout.addWidget(self.titleLabel) self.mainLayout.addWidget(self.progress_bar) self.mainLayout.addWidget(self.status) self.mainLayout.addWidget(self.cancelBtn) # Runs the thread self.generate_thread.start() # Set the mainLayout as the visible layout self.setLayout(self.mainLayout)