本文整理汇总了Python中util.qui_utils.notify_error函数的典型用法代码示例。如果您正苦于以下问题:Python notify_error函数的具体用法?Python notify_error怎么用?Python notify_error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了notify_error函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _on_new_message_alert
def _on_new_message_alert(self):
with qui_utils.notify_error(self._errorLog):
if self._app.alarmHandler.alarmType == self._app.alarmHandler.ALARM_APPLICATION:
if self._currentTab == self.MESSAGES_TAB or not self._app.ledHandler.isReal:
self._errorLog.push_message("New messages")
else:
self._app.ledHandler.on()
开发者ID:epage,项目名称:DialCentral,代码行数:7,代码来源:dialcentral_qt.py
示例2: _on_window_resized
def _on_window_resized(self):
with qui_utils.notify_error(self._app.errorLog):
windowOrientation = self.idealWindowOrientation
if windowOrientation == QtCore.Qt.Horizontal:
self._tabWidget.setTabPosition(QtGui.QTabWidget.West)
else:
self._tabWidget.setTabPosition(QtGui.QTabWidget.South)
开发者ID:epage,项目名称:DialCentral,代码行数:7,代码来源:dialcentral_qt.py
示例3: _on_row_activated
def _on_row_activated(self, index):
with qui_utils.notify_error(self._errorLog):
timeIndex = index.parent()
if not timeIndex.isValid():
return
timeRow = timeIndex.row()
row = index.row()
detailsItem = self._categoryManager.get_item(timeRow, row, self.DETAILS_IDX)
fromItem = self._categoryManager.get_item(timeRow, row, self.FROM_IDX)
contactDetails = detailsItem.data()
title = unicode(fromItem.text())
number = str(contactDetails["number"])
contactId = number # ids don't seem too unique so using numbers
descriptionRows = []
for t in xrange(self._itemStore.rowCount()):
randomTimeItem = self._itemStore.item(t, 0)
for i in xrange(randomTimeItem.rowCount()):
iItem = randomTimeItem.child(i, 0)
iContactDetails = iItem.data()
iNumber = str(iContactDetails["number"])
if number != iNumber:
continue
relTime = misc_utils.abbrev_relative_date(iContactDetails["relTime"])
action = str(iContactDetails["action"])
number = str(iContactDetails["number"])
prettyNumber = misc_utils.make_pretty(number)
rowItems = relTime, action, prettyNumber
descriptionRows.append("<tr><td>%s</td></tr>" % "</td><td>".join(rowItems))
description = "<table>%s</table>" % "".join(descriptionRows)
numbersWithDescriptions = [(str(contactDetails["number"]), "")]
self._session.draft.add_contact(contactId, None, title, description, numbersWithDescriptions)
开发者ID:epage,项目名称:DialCentral,代码行数:33,代码来源:gv_views.py
示例4: _on_play_invalidated
def _on_play_invalidated(self):
with qui_utils.notify_error(self._app.errorLog):
self._playButton.show()
self._pauseButton.hide()
self._resumeButton.hide()
self._stopButton.hide()
self._invalidate_token()
开发者ID:epage,项目名称:DialCentral,代码行数:7,代码来源:dialogs.py
示例5: _on_op_error
def _on_op_error(self, message):
with qui_utils.notify_error(self._app.errorLog):
self._smsEntry.setReadOnly(False)
self._cancelButton.setVisible(False)
self._smsButton.setVisible(True)
self._dialButton.setVisible(True)
self._errorLog.push_error(message)
开发者ID:epage,项目名称:DialCentral,代码行数:8,代码来源:dialogs.py
示例6: _on_refresh_history
def _on_refresh_history(self):
with qui_utils.notify_error(self._app.errorLog):
draftContactsCount = self._session.draft.get_num_contacts()
if draftContactsCount != 1:
# Changing contact count will automatically refresh it
return
(cid, ) = self._session.draft.get_contacts()
self._update_history(cid)
开发者ID:epage,项目名称:DialCentral,代码行数:8,代码来源:dialogs.py
示例7: _on_op_finished
def _on_op_finished(self):
with qui_utils.notify_error(self._app.errorLog):
self._smsEntry.setPlainText("")
self._smsEntry.setReadOnly(False)
self._cancelButton.setVisible(False)
self._smsButton.setVisible(True)
self._dialButton.setVisible(True)
self.close()
self.destroy()
开发者ID:epage,项目名称:DialCentral,代码行数:9,代码来源:dialogs.py
示例8: _on_app_alert
def _on_app_alert(self):
with qui_utils.notify_error(self._errorLog):
if self._session.state == self._session.LOGGEDIN_STATE:
messageType = {
(True, True): self._session.MESSAGE_ALL,
(True, False): self._session.MESSAGE_TEXTS,
(False, True): self._session.MESSAGE_VOICEMAILS,
}[(self._app.notifyOnSms, self._app.notifyOnVoicemail)]
self._session.update_messages(messageType, force=True)
开发者ID:epage,项目名称:DialCentral,代码行数:9,代码来源:dialcentral_qt.py
示例9: _on_sms_clicked
def _on_sms_clicked(self, checked = False):
with qui_utils.notify_error(self._errorLog):
number = misc_utils.make_ugly(str(self._entry.text()))
self._entry.clear()
contactId = number
title = misc_utils.make_pretty(number)
description = misc_utils.make_pretty(number)
numbersWithDescriptions = [(number, "")]
self._session.draft.add_contact(contactId, None, title, description, numbersWithDescriptions)
开发者ID:epage,项目名称:DialCentral,代码行数:10,代码来源:gv_views.py
示例10: _on_import
def _on_import(self, checked = True):
with qui_utils.notify_error(self._errorLog):
csvName = QtGui.QFileDialog.getOpenFileName(self._window, caption="Import", filter="CSV Files (*.csv)")
csvName = unicode(csvName)
if not csvName:
return
import shutil
shutil.copy2(csvName, self._app.fsContactsPath)
if self._tabsContents[self.CONTACTS_TAB].has_child:
self._tabsContents[self.CONTACTS_TAB].child.update_addressbooks()
开发者ID:epage,项目名称:DialCentral,代码行数:10,代码来源:dialcentral_qt.py
示例11: _on_row_activated
def _on_row_activated(self, index):
with qui_utils.notify_error(self._errorLog):
if index.column() == self._CLOSE_COLUMN:
self._historyStore.removeRow(index.row(), index.parent())
self._rowCount -= 1
elif index.column() == self._EQ_COLUMN:
self._duplicate_row(index)
elif index.column() == self._RESULT_COLUMN:
self._duplicate_row(index)
else:
raise NotImplementedError("Unsupported column to activate %s" % index.column())
开发者ID:epage,项目名称:ejpi,代码行数:11,代码来源:qhistory.py
示例12: _on_single_change_number
def _on_single_change_number(self, index):
with qui_utils.notify_error(self._app.errorLog):
# Exception thrown when the first item is removed
cid = self._cids[0]
try:
numbers = self._session.draft.get_numbers(cid)
except KeyError:
_moduleLogger.error("Contact no longer available (or bizarre error): %r (%r)" % (cid, index))
return
number = numbers[index][0]
self._session.draft.set_selected_number(cid, number)
开发者ID:epage,项目名称:DialCentral,代码行数:11,代码来源:dialogs.py
示例13: _on_recipients_changed
def _on_recipients_changed(self):
with qui_utils.notify_error(self._errorLog):
if self._session.draft.get_num_contacts() == 0:
return
if self._smsEntryDialog is None:
import dialogs
self._smsEntryDialog = dialogs.SMSEntryWindow(self.window, self._app, self._session, self._errorLog)
self._smsEntryDialog.window.destroyed.connect(self._on_child_close)
self._smsEntryDialog.window.closed.connect(self._on_child_close)
self._smsEntryDialog.window.show()
开发者ID:epage,项目名称:DialCentral,代码行数:11,代码来源:dialcentral_qt.py
示例14: _on_voicemail_save
def _on_voicemail_save(self, arg = None):
with qui_utils.notify_error(self._app.errorLog):
targetPath = QtGui.QFileDialog.getSaveFileName(None, caption="Save Voicemail", filter="Audio File (*.mp3)")
targetPath = unicode(targetPath)
if not targetPath:
return
(cid, ) = self._session.draft.get_contacts()
messageId = self._session.draft.get_message_id(cid)
sourcePath = self._session.voicemail_path(messageId)
import shutil
shutil.copy2(sourcePath, targetPath)
开发者ID:epage,项目名称:DialCentral,代码行数:12,代码来源:dialogs.py
示例15: _on_voicemail_play
def _on_voicemail_play(self, arg = None):
with qui_utils.notify_error(self._app.errorLog):
(cid, ) = self._session.draft.get_contacts()
messageId = self._session.draft.get_message_id(cid)
sourcePath = self._session.voicemail_path(messageId)
self._invalidate_token()
uri = "file://%s" % sourcePath
self._token = self._app.streamHandler.set_file(uri)
self._token.stateChange.connect(self._on_play_state)
self._token.invalidated.connect(self._on_play_invalidated)
self._token.error.connect(self._on_play_error)
self._token.play()
开发者ID:epage,项目名称:DialCentral,代码行数:13,代码来源:dialogs.py
示例16: _on_item_changed
def _on_item_changed(self, item):
with qui_utils.notify_error(self._errorLog):
if self._programmaticUpdate:
_moduleLogger.info("Blocking updating %r recursively" % item)
return
self._programmaticUpdate = True
try:
if item.column() in [self._EQ_COLUMN, self._RESULT_COLUMN]:
self._update_input(item)
else:
raise NotImplementedError("Unsupported column to edit %s" % item.column())
except StandardError, e:
self._errorReporter.push_exception()
finally:
开发者ID:epage,项目名称:ejpi,代码行数:14,代码来源:qhistory.py
示例17: _on_login
def _on_login(self):
with qui_utils.notify_error(self._errorLog):
changedAccounts = self._defaultCredentials != self._curentCredentials
noCallback = not self._session.get_callback_number()
if changedAccounts or noCallback:
self._show_account_dialog()
self._defaultCredentials = self._curentCredentials
for tab in self._tabsContents:
tab.enable()
self._initialize_tab(self._currentTab)
if self._updateVoicemailOnMissedCall:
self._init_call_handler()
self._callHandler.start()
开发者ID:epage,项目名称:DialCentral,代码行数:15,代码来源:dialcentral_qt.py
示例18: _on_play_state
def _on_play_state(self, state):
with qui_utils.notify_error(self._app.errorLog):
if state == self._token.STATE_PLAY:
self._playButton.hide()
self._pauseButton.show()
self._resumeButton.hide()
self._stopButton.show()
elif state == self._token.STATE_PAUSE:
self._playButton.hide()
self._pauseButton.hide()
self._resumeButton.show()
self._stopButton.show()
elif state == self._token.STATE_STOP:
self._playButton.show()
self._pauseButton.hide()
self._resumeButton.hide()
self._stopButton.hide()
开发者ID:epage,项目名称:DialCentral,代码行数:17,代码来源:dialogs.py
示例19: _on_focus_changed
def _on_focus_changed(self, oldWindow, newWindow):
with qui_utils.notify_error(self._app.errorLog):
if oldWindow is None and newWindow is not None:
self._window.setUpdatesEnabled(True)
elif oldWindow is not None and newWindow is None:
self._window.setUpdatesEnabled(False)
开发者ID:epage,项目名称:omnom,代码行数:6,代码来源:qwrappers.py
示例20: _on_close_window
def _on_close_window(self, checked = True):
with qui_utils.notify_error(self._errorLog):
self.close()
开发者ID:epage,项目名称:omnom,代码行数:3,代码来源:qwrappers.py
注:本文中的util.qui_utils.notify_error函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论