예제 #1
0
 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
예제 #2
0
	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()
예제 #3
0
 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()
예제 #4
0
    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()