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


Python QMessageBox.information方法代码示例

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


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

示例1: checkDirty

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def checkDirty(self):
        '''
        Asserts whether the dialog contains dirty controls.
        '''
        isDirty = False
        msgResponse = None
        
        if self._dirtyTracker.isDirty():
            isDirty = True
            msg = QApplication.translate(
                "MappedDialog",
                "Would you like to save changes before closing?"
            )
            msgResponse = QMessageBox.information(
                self, QApplication.translate(
                    "MappedDialog","Save Changes"
                ),
                msg,
                QMessageBox.Yes|QMessageBox.No|QMessageBox.Cancel
            )
            
        return isDirty,msgResponse 
开发者ID:gltn,项目名称:stdm,代码行数:24,代码来源:mapping.py

示例2: extract_message

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def extract_message(self):
		perform_ocr("original_img.jpg")
		print (self.boundary_xy)
		msg = QMessageBox()
		msg.setIcon(QMessageBox.Information)
		msg.setText("Text file saved")
		msg.setWindowTitle("Information")
		#msg.setStandardButtons(QMessageBox.Ok)
		a=QtGui.QPushButton('Ok')
		a.setStyleSheet("background-color: orange;border-radius: 15px; border-color: orange;padding-left: 20px;padding-right: 20px;padding-top: 10px;padding-bottom: 10px; border-top: 10px transparent;border-bottom: 10px transparent;border-right: 10px transparent;border-left: 20px transparent;");
		msg.addButton(a,QtGui.QMessageBox.YesRole)
		msg.setStyleSheet("background-color: rgb(189,189,189);")
		#msg.buttonClicked.connect(msgbtn)
		retval = msg.exec_()
		self.extract_complete_signal.emit()
		#os.startfile("output.txt")
		#w = QWidget()
		#QMessageBox.information(w, "Message", "Text file saved ") 
开发者ID:ishita27,项目名称:Printed-Text-recognition-and-conversion,代码行数:20,代码来源:gui.py

示例3: show_upload_finished_message

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def show_upload_finished_message(self):
        self.is_upload_active = False
        self.ui_single_file_upload.connections_onetime.setEnabled(True)
        self.ui_single_file_upload.start_upload_bt.setStyleSheet(("QPushButton:hover{\n"
                                                                  "  background-color: #83bf20;\n"
                                                                  "  border-color: #83bf20;\n"
                                                                  "}\n"
                                                                  "QPushButton:active {\n"
                                                                  "  background-color: #93cc36;\n"
                                                                  "  border-color: #93cc36;\n"
                                                                  "}\n"
                                                                  "QPushButton{\n"
                                                                  "  background-color: #88c425;\n"
                                                                  "    border: 1px solid #88c425;\n"
                                                                  "    color: #fff;\n"
                                                                  "    border-radius: 7px;\n"
                                                                  "}"))

        self.ui_single_file_upload.start_upload_bt.setEnabled(True)
        self.ui_single_file_upload.file_path.setText("")
        QMessageBox.information(self, 'Success!', 'File uploaded successfully!') 
开发者ID:lakewik,项目名称:EasyStorj,代码行数:23,代码来源:file_upload.py

示例4: deleteConnectionDialog

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def deleteConnectionDialog(self):
        # Delete connection.
        currentText = self.ui.connectionList.currentText()
        key = '/CartoDBPlugin/%s' % currentText
        msg = QApplication.translate('CartoDBPlugin', 'Remove connection {}?').format(currentText)

        result = QMessageBox.information(self, QApplication.translate('CartoDBPlugin', 'Confirm delete'), msg, QMessageBox.Ok | QMessageBox.Cancel)
        if result == QMessageBox.Ok:
            # Remove connection from list
            self.settings.remove(key)
            indexToDelete = self.ui.connectionList.currentIndex()
            self.ui.connectionList.removeItem(indexToDelete)
            self.setConnectionListPosition()
            if self.ui.connectionList.count() > 0:
                self.deleteconnetion.emit(currentText) 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:17,代码来源:ConnectionManager.py

示例5: do_verify

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def do_verify(self, tx):
        # 1. get the password and sign the verification request
        password = None
        if self.wallet.use_encryption:
            msg = _('GreenAddress requires your signature to verify that transaction is instant.\n'
                    'Please enter your password to sign a verification request.')
            password = self.win.password_dialog(msg)
            if not password:
                return
        try:
            self.verify_button.setText(_('Verifying...'))
            QApplication.processEvents()  # update the button label

            addr = self.get_my_addr(tx)
            message = "Please verify if %s is GreenAddress instant confirmed" % tx.hash()
            sig = self.wallet.sign_message(addr, message, password)

            # 2. send the request
            connection = httplib.HTTPSConnection('greenaddress.it')
            connection.request("GET", ("/verify/?signature=%s&txhash=%s" % (urllib.quote(sig), tx.hash())),
                None, {'User-Agent': 'Electrum'})
            response = connection.getresponse()
            response = json.loads(response.read())

            # 3. display the result
            if response.get('verified'):
                QMessageBox.information(None, _('Verification successful!'),
                    _('%s is covered by GreenAddress instant confirmation') % (tx.hash()), _('OK'))
            else:
                QMessageBox.critical(None, _('Verification failed!'),
                    _('%s is not covered by GreenAddress instant confirmation') % (tx.hash()), _('OK'))
        except BaseException as e:
            import traceback
            traceback.print_exc(file=sys.stdout)
            QMessageBox.information(None, _('Error'), str(e), _('OK'))
        finally:
            self.verify_button.setText(self.button_label) 
开发者ID:mazaclub,项目名称:encompass,代码行数:39,代码来源:greenaddress_instant.py

示例6: information

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def information(title, text):
        """
        Show a information QMessageBox
        :param title: title's box
        :param text: text's box
        :return: None
        """
        QMessageBox.information(None, title, text) 
开发者ID:danilabs,项目名称:rexploit,代码行数:10,代码来源:messagebox.py

示例7: compare_config_version

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def compare_config_version(self, path=None):
        """
        Method to check the version of the two files being copied and return the latest one
        :param newfile: QFile
        :return: QFile
        """
        if not path:
            path = self.userPath
        else:
            path = path
        base_file = self.baseSQLPath()
        user_file = path + '/%s' % DEFAULT_CONFIG
        if os.path.isfile(user_file):
            if QMessageBox.warning(None, QApplication.translate("FilePaths",
                                                                "Previous user configuration found"),
                                   QApplication.translate("FilePaths",
                                                          "Wizard detected previous configuration exists in the current directory."
                                                          "\nDo you want to overwrite the existing config?"),
                                   QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes:
                if filecmp.cmp(base_file, user_file, shallow=False):
                    pass
                else:
                    try:
                        os.remove(user_file)
                        shutil.copy(base_file, self.userPath)
                    except:
                        pass
            else:
                QMessageBox.information(None,
                                        QApplication.translate("FilePaths",
                                                               "Configuration Exist"),
                                        QApplication.translate("FilePaths",
                                                               "Previous configuration retained"))
        else:
            shutil.copy(base_file, user_file)
        self.createBackup() 
开发者ID:gltn,项目名称:stdm,代码行数:38,代码来源:configfile_paths.py

示例8: model

# 需要导入模块: from PyQt4.QtGui import QMessageBox [as 别名]
# 或者: from PyQt4.QtGui.QMessageBox import information [as 别名]
def model(self):
        if not self._model:
            QMessageBox.information(None, QApplication.translate("AttributeBrowser","Loading foreign keys"),
                                    QApplication.translate("AttributeBrowser","Foreign Key cannot be loaded"))
            return
        else:
            self._dbModel = self.mapping.tableMapping(self._model)
        return self._dbModel 
开发者ID:gltn,项目名称:stdm,代码行数:10,代码来源:fkbase_form.py


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