def help(self, button): if not Help.isHelpWidgetAvailable: return QApplication.setOverrideCursor(Qt.WaitCursor) helpWidget = Help.HelpWidget(button) helpWidget.setLabel(_('No help available for web views')) helpWidget.setType(helpWidget.ViewType) helpWidget.show() QApplication.restoreOverrideCursor() return
def help(self, button): if not isHelpWidgetAvailable: return QApplication.setOverrideCursor( Qt.WaitCursor ) helpWidget = Help.HelpWidget( button ) helpWidget.setLabel( self.name ) helpWidget.setType( helpWidget.ViewType ) helpWidget.setFilter( (self.model, self.screen.currentView().viewType()) ) helpWidget.show() QApplication.restoreOverrideCursor()
def showHelp(self): QApplication.setOverrideCursor(Qt.WaitCursor) helpWidget = Help.HelpWidget(self.sender()) helpWidget.setLabel(self.attrs.get('string', '')) helpWidget.setHelp(self.attrs.get('help', '')) helpWidget.setType(helpWidget.FieldType) if self.record: # TODO: self.record should be optional helpWidget.setFilter((self.record.group.resource, self.name)) helpWidget.show() QApplication.restoreOverrideCursor()
def help(self, button): if self.model != 'ir.ui.menu': return idx = self.uiTree.currentIndex() record = self.treeModel.recordFromIndex(idx) if not record: return if not Help.isHelpWidgetAvailable: return QApplication.setOverrideCursor(Qt.WaitCursor) helpWidget = Help.HelpWidget(button) helpWidget.setLabel(record.value('name')) helpWidget.setFilter(record.id) helpWidget.setType(helpWidget.MenuType) helpWidget.show() QApplication.restoreOverrideCursor()