当前位置: 首页>>代码示例>>Python>>正文


Python QtGui.QProgressBar方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QProgressBar方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QProgressBar方法的具体用法?Python QtGui.QProgressBar怎么用?Python QtGui.QProgressBar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui的用法示例。


在下文中一共展示了QtGui.QProgressBar方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:21,代码来源:ListItemWidgets.py

示例2: add_row_files_queue_table

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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]) 
开发者ID:lakewik,项目名称:EasyStorj,代码行数:22,代码来源:file_upload.py

示例3: addLoadingMsg

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:10,代码来源:CartoDBPlugin.py

示例4: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:swharden,项目名称:Python-GUI-examples,代码行数:40,代码来源:ui_main.py

示例5: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:33,代码来源:masterDialog.py

示例6: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
def __init__(self, parent, stages=1):
        QtGui.QProgressBar.__init__(self, parent)

        self.stages = stages
        self.stages_completed = 0
        self.current_stage_progress = 0

    # @Override 
开发者ID:KanoComputing,项目名称:kano-burners,代码行数:10,代码来源:widgets.py

示例7: start_program

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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_() 
开发者ID:Warflop,项目名称:Telebix,代码行数:29,代码来源:telebix.py

示例8: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:nasa,项目名称:CrisisMappingToolkit,代码行数:32,代码来源:measure_interface.py

示例9: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:reza-arjmandi,项目名称:rpi-course,代码行数:34,代码来源:MotorControlModernUi.py

示例10: add_row_upload_queue_table

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:lakewik,项目名称:EasyStorj,代码行数:32,代码来源:file_upload.py

示例11: add_row_download_queue_table

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:lakewik,项目名称:EasyStorj,代码行数:31,代码来源:file_download.py

示例12: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QProgressBar [as 别名]
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) 
开发者ID:juliarizza,项目名称:certificate_generator,代码行数:59,代码来源:certificates.py


注:本文中的PyQt4.QtGui.QProgressBar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。