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


Python KQMessageBox.information方法代码示例

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


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

示例1: findPrev

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def findPrev(self):
     """
     Public slot to find the next previous of text.
     """
     if not self.havefound or self.ui.findtextCombo.currentText().isEmpty():
         self.show(self.viewmanager.textForFind())
         return
     
     self.__findBackwards = True
     txt = self.ui.findtextCombo.currentText()
     
     # This moves any previous occurrence of this statement to the head
     # of the list and updates the combobox
     self.findHistory.removeAll(txt)
     self.findHistory.prepend(txt)
     self.ui.findtextCombo.clear()
     self.ui.findtextCombo.addItems(self.findHistory)
     self.emit(SIGNAL('searchListChanged'))
     
     ok = self.__findNextPrev(txt, True)
     if ok:
         if self.replace:
             self.ui.replaceButton.setEnabled(True)
             self.ui.replaceSearchButton.setEnabled(True)
     else:
         KQMessageBox.information(self, self.windowTitle(),
             self.trUtf8("'%1' was not found.").arg(txt))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:29,代码来源:SearchReplaceWidget.py

示例2: on_namedReferenceButton_clicked

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def on_namedReferenceButton_clicked(self):
     """
     Private slot to handle the named reference toolbutton.
     """
     # determine cursor position as length into text
     length = self.regexpTextEdit.textCursor().position()
     
     # only present group names that occur before the current cursor position
     regex = unicode(self.regexpTextEdit.toPlainText().left(length))
     names = self.namedGroups(regex)
     if not names:
         KQMessageBox.information(None,
             self.trUtf8("Named reference"),
             self.trUtf8("""No named groups have been defined yet."""))
         return
         
     qs = QStringList()
     for name in names:
         qs.append(name)
     groupName, ok = KQInputDialog.getItem(\
         None,
         self.trUtf8("Named reference"),
         self.trUtf8("Select group name:"),
         qs,
         0, True)
     if ok and not groupName.isEmpty():
         self.__insertString("(?P=%s)" % groupName)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:29,代码来源:PyRegExpWizardDialog.py

示例3: __generateTSFileDone

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __generateTSFileDone(self, exitCode, exitStatus):
     """
     Private slot to handle the finished signal of the pylupdate process.
     
     @param exitCode exit code of the process (integer)
     @param exitStatus exit status of the process (QProcess.ExitStatus)
     """
     if exitStatus == QProcess.NormalExit and exitCode == 0:
         KQMessageBox.information(None,
             self.trUtf8("Translation file generation"),
             self.trUtf8("The generation of the translation files (*.ts)"
                 " was successful."))
     else:
         KQMessageBox.critical(None,
             self.trUtf8("Translation file generation"),
             self.trUtf8("The generation of the translation files (*.ts) has failed."))
     
     proc = self.sender()
     for index in range(len(self.__pylupdateProcesses)):
         if proc == self.__pylupdateProcesses[index][0]:
             try:
                 os.remove(self.__pylupdateProcesses[index][1])
             except EnvironmentError:
                 pass
             del self.__pylupdateProcesses[index]
             break
     if not self.__pylupdateProcesses:
         # all done
         self.pylupdateProcRunning = False
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:31,代码来源:ProjectTranslationsBrowser.py

示例4: __init__

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __init__(self, parent = None):
     """
     Constructor
     
     @param parent reference to the parent widget (QWidget)
     """
     QWidget.__init__(self, parent)
     self.setupUi(self)
     
     self.table.addAction(self.insertRowAction)
     self.table.addAction(self.deleteRowAction)
     
     if QSqlDatabase.drivers().isEmpty():
         KQMessageBox.information(None,
             self.trUtf8("No database drivers found"),
             self.trUtf8("""This tool requires at least one Qt database driver. """
             """Please check the Qt documentation how to build the """
             """Qt SQL plugins."""))
     
     self.connect(self.connections, SIGNAL("tableActivated(QString)"), 
                  self.on_connections_tableActivated)
     self.connect(self.connections, SIGNAL("schemaRequested(QString)"), 
                  self.on_connections_schemaRequested)
     self.connect(self.connections, SIGNAL("cleared()"), 
                  self.on_connections_cleared)
     
     self.emit(SIGNAL("statusMessage(QString)"), self.trUtf8("Ready"))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:29,代码来源:SqlBrowserWidget.py

示例5: on_validateButton_clicked

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def on_validateButton_clicked(self):
     """
     Private slot to validate the entered regexp.
     """
     regex = self.regexpLineEdit.text()
     if not regex.isEmpty():
         re = QRegExp(regex)
         if self.caseSensitiveCheckBox.isChecked():
             re.setCaseSensitivity(Qt.CaseSensitive)
         else:
             re.setCaseSensitivity(Qt.CaseInsensitive)
         re.setMinimal(self.minimalCheckBox.isChecked())
         if self.wildcardCheckBox.isChecked():
             re.setPatternSyntax(QRegExp.Wildcard)
         else:
             re.setPatternSyntax(QRegExp.RegExp)
         if re.isValid():
             KQMessageBox.information(None,
                 self.trUtf8(""),
                 self.trUtf8("""The regular expression is valid."""))
         else:
             KQMessageBox.critical(None,
                 self.trUtf8("Error"),
                 self.trUtf8("""Invalid regular expression: %1""")
                     .arg(re.errorString()))
             return
     else:
         KQMessageBox.critical(None,
             self.trUtf8("Error"),
             self.trUtf8("""A regular expression must be given."""))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:32,代码来源:QRegExpWizardDialog.py

示例6: _selectEntries

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def _selectEntries(self, local = True, filter = None):
     """
     Protected method to select entries based on their VCS status.
     
     @param local flag indicating local (i.e. non VCS controlled) file/directory
         entries should be selected (boolean)
     @param filter list of classes to check against
     """
     if self.project.vcs is None:
         return
     
     if local:
         compareString = QApplication.translate('ProjectBaseBrowser', "local")
     else:
         compareString = QString(self.project.vcs.vcsName())
     
     # expand all directories in order to iterate over all entries
     self._expandAllDirs()
     
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QApplication.processEvents()
     self.selectionModel().clear()
     QApplication.processEvents()
     
     # now iterate over all entries
     startIndex = None
     endIndex = None
     selectedEntries = 0
     index = self.model().index(0, 0)
     while index.isValid():
         itm = self.model().item(index)
         if self.wantedItem(itm, filter) and \
            QString.compare(compareString, itm.data(1)) == 0:
             if startIndex is not None and \
                startIndex.parent() != index.parent():
                 self._setItemRangeSelected(startIndex, endIndex, True)
                 startIndex = None
             selectedEntries += 1
             if startIndex is None:
                 startIndex = index
             endIndex = index
         else:
             if startIndex is not None:
                 self._setItemRangeSelected(startIndex, endIndex, True)
                 startIndex = None
         index = self.indexBelow(index)
     if startIndex is not None:
         self._setItemRangeSelected(startIndex, endIndex, True)
     QApplication.restoreOverrideCursor()
     QApplication.processEvents()
     
     if selectedEntries == 0:
         KQMessageBox.information(None,
         QApplication.translate('ProjectBaseBrowser', "Select entries"),
         QApplication.translate('ProjectBaseBrowser', 
             """There were no matching entries found."""))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:58,代码来源:ProjectBaseBrowser.py

示例7: on_helpButton_clicked

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def on_helpButton_clicked(self):
     """
     Public slot to show some help.
     """
     KQMessageBox.information(self,
         self.trUtf8("Template Help"),
         self.trUtf8(\
             """<p>To use variables in a template, you just have to enclose"""
             """ the variablename with $-characters. When you use the template,"""
             """ you will then be asked for a value for this variable.</p>"""
             """<p>Example template: This is a $VAR$</p>"""
             """<p>When you use this template you will be prompted for a value"""
             """ for the variable $VAR$. Any occurrences of $VAR$ will then be"""
             """ replaced with whatever you've entered.</p>"""
             """<p>If you need a single $-character in a template, which is not"""
             """ used to enclose a variable, type $$(two dollar characters)"""
             """ instead. They will automatically be replaced with a single"""
             """ $-character when you use the template.</p>"""
             """<p>If you want a variables contents to be treated specially,"""
             """ the variablename must be followed by a ':' and one formatting"""
             """ specifier (e.g. $VAR:ml$). The supported specifiers are:"""
             """<table>"""
             """<tr><td>ml</td><td>Specifies a multiline formatting."""
             """ The first line of the variable contents is prefixed with the string"""
             """ occuring before the variable on the same line of the template."""
             """ All other lines are prefixed by the same amount of whitespace"""
             """ as the line containing the variable."""
             """</td></tr>"""
             """<tr><td>rl</td><td>Specifies a repeated line formatting."""
             """ Each line of the variable contents is prefixed with the string"""
             """ occuring before the variable on the same line of the template."""
             """</td></tr>"""
             """</table></p>"""
             """<p>The following predefined variables may be used in a template:"""
             """<table>"""
             """<tr><td>date</td>"""
             """<td>today's date in ISO format (YYYY-MM-DD)</td></tr>"""
             """<tr><td>year</td>"""
             """<td>the current year</td></tr>"""
             """<tr><td>project_name</td>"""
             """<td>the name of the project (if any)</td></tr>"""
             """<tr><td>path_name</td>"""
             """<td>full path of the current file</td></tr>"""
             """<tr><td>dir_name</td>"""
             """<td>full path of the parent directory</td></tr>"""
             """<tr><td>file_name</td>"""
             """<td>the current file name (without directory)</td></tr>"""
             """<tr><td>base_name</td>"""
             """<td>like <i>file_name</i>, but without extension</td></tr>"""
             """<tr><td>ext</td>"""
             """<td>the extension of the current file</td></tr>"""
             """</table></p>"""
             """<p>If you want to change the default delimiter to anything"""
             """ different, please use the configuration dialog to do so.</p>"""))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:56,代码来源:TemplatePropertiesDialog.py

示例8: __stealLock

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __stealLock(self):
     """
     Private slot to handle the Break Lock context menu entry.
     """
     names = [os.path.join(self.dname, unicode(itm.text(self.__pathColumn))) \
              for itm in self.__getLockActionItems(self.stealBreakLockIndicators)]
     if not names:
         KQMessageBox.information(self,
             self.trUtf8("Steal Lock"),
             self.trUtf8("""There are no locked files available/selected."""))
         return
     
     self.vcs.svnLock(names, parent=self, stealIt=True)
     self.on_refreshButton_clicked()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:16,代码来源:SvnStatusDialog.py

示例9: __downloadPluginsDone

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __downloadPluginsDone(self):
     """
     Private method called, when the download of the plugins is finished.
     """
     self.__downloadButton.setEnabled(len(self.__selectedItems()))
     self.__installButton.setEnabled(True)
     self.__doneMethod = None
     KQMessageBox.information(None,
         self.trUtf8("Download Plugin Files"),
         self.trUtf8("""The requested plugins were downloaded."""))
     self.downloadProgress.setValue(0)
     
     # repopulate the list to update the refresh icons
     self.__populateList()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:16,代码来源:PluginRepositoryDialog.py

示例10: __showHelp

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __showHelp(self):
     """
     Private method to show some help.
     """
     KQMessageBox.information(self,
         self.trUtf8("Template Help"),
         self.trUtf8("""<p><b>Template groups</b> are a means of grouping individual"""
                     """ templates. Groups have an attribute that specifies,"""
                     """ which programming language they apply for."""
                     """ In order to add template entries, at least one group"""
                     """ has to be defined.</p>"""
                     """<p><b>Template entries</b> are the actual templates."""
                     """ They are grouped by the template groups. Help about"""
                     """ how to define them is available in the template edit"""
                     """ dialog.</p>"""))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:17,代码来源:TemplateViewer.py

示例11: __restoreMissing

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __restoreMissing(self):
     """
     Private slot to handle the Restore Missing context menu entry.
     """
     names = [os.path.join(self.dname, unicode(itm.text(self.__pathColumn))) \
              for itm in self.__getMissingItems()]
     if not names:
         KQMessageBox.information(self,
             self.trUtf8("Revert"),
             self.trUtf8("""There are no missing items available/selected."""))
         return
     
     self.vcs.vcsRevert(names)
     self.on_refreshButton_clicked()
     self.vcs.checkVCSStatus()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:17,代码来源:SvnStatusDialog.py

示例12: __removeFromChangelist

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __removeFromChangelist(self):
     """
     Private slot to remove entries from their changelists.
     """
     names = [os.path.join(self.dname, unicode(itm.text(self.__pathColumn))) \
              for itm in self.__getChangelistItems()]
     if not names:
         KQMessageBox.information(self,
             self.trUtf8("Remove from Changelist"),
             self.trUtf8(
                 """There are no files available/selected belonging to a changelist."""
             )
         )
         return
     self.vcs.svnRemoveFromChangelist(names)
     self.on_refreshButton_clicked()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:18,代码来源:SvnStatusDialog.py

示例13: __activateFilter

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __activateFilter(self, on):
     """
     Private slot to handle the "Filtered display" context menu entry.
     
     @param on flag indicating the filter state (boolean)
     """
     if on and not self.taskFilter.hasActiveFilter():
         res = KQMessageBox.information(None,
             self.trUtf8("Activate task filter"),
             self.trUtf8("""The task filter doesn't have any active filters."""
                         """ Do you want to configure the filter settings?"""),
             QMessageBox.StandardButtons(\
                 QMessageBox.No | \
                 QMessageBox.Yes),
             QMessageBox.Yes)
         if res != QMessageBox.Yes:
             on = False
         else:
             self.__configureFilter()
             on = self.taskFilter.hasActiveFilter()
     
     self.taskFilter.setActive(on)
     self.__menuFilteredAct.setChecked(on)
     self.__backMenuFilteredAct.setChecked(on)
     self.__refreshDisplay()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:27,代码来源:TaskViewer.py

示例14: on_testButton_clicked

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def on_testButton_clicked(self):
     """
     Private slot to test the mail server login data.
     """
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QApplication.processEvents()
     try:
         server = smtplib.SMTP(str(self.mailServerEdit.text()),
                               self.portSpin.value(), timeout=10)
         if self.useTlsCheckBox.isChecked():
             server.starttls()
         try:
             server.login(unicode(self.mailUserEdit.text()),
                          unicode(self.mailPasswordEdit.text()))
             QApplication.restoreOverrideCursor()
             KQMessageBox.information(self,
                 self.trUtf8("Login Test"),
                 self.trUtf8("""The login test succeeded."""))
         except (smtplib.SMTPException, socket.error) as e:
             QApplication.restoreOverrideCursor()
             if isinstance(e,  smtplib.SMTPResponseException):
                 errorStr = e.smtp_error.decode()
             elif isinstance(e, socket.timeout):
                 errorStr = str(e)
             elif isinstance(e, socket.error):
                 errorStr = e[1]
             else:
                 errorStr = str(e)
             KQMessageBox.critical(self,
                 self.trUtf8("Login Test"),
                 self.trUtf8("""<p>The login test failed.<br>Reason: %1</p>""")
                     .arg(errorStr))
         server.quit()
     except (smtplib.SMTPException, socket.error) as e:
         QApplication.restoreOverrideCursor()
         if isinstance(e,  smtplib.SMTPResponseException):
             errorStr = e.smtp_error.decode()
         elif isinstance(e, socket.timeout):
             errorStr = str(e)
         elif isinstance(e, socket.error):
             errorStr = e[1]
         else:
             errorStr = str(e)
         KQMessageBox.critical(self,
             self.trUtf8("Login Test"),
             self.trUtf8("""<p>The login test failed.<br>Reason: %1</p>""")
                 .arg(errorStr))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:49,代码来源:EmailPage.py

示例15: __revert

# 需要导入模块: from KdeQt import KQMessageBox [as 别名]
# 或者: from KdeQt.KQMessageBox import information [as 别名]
 def __revert(self):
     """
     Private slot to handle the Revert context menu entry.
     """
     names = [os.path.join(self.dname, unicode(itm.text(self.__pathColumn))) \
              for itm in self.__getModifiedItems()]
     if not names:
         KQMessageBox.information(self,
             self.trUtf8("Revert"),
             self.trUtf8("""There are no uncommitted changes available/selected."""))
         return
     
     self.vcs.vcsRevert(names)
     self.raise_()
     self.activateWindow()
     self.on_refreshButton_clicked()
     self.vcs.checkVCSStatus()
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:19,代码来源:SvnStatusDialog.py


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