Helpviewer/WebPlugins/WebPluginInterface.py

changeset 2962
d6c9d1ca2da4
parent 2954
bf0215fe12d1
child 3057
10516539f238
child 3160
209a07d7e401
equal deleted inserted replaced
2961:e4e2efb4846a 2962:d6c9d1ca2da4
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the web plug-in interface. 7 Module implementing the web plug-in interface.
8 """ 8 """
9
10 from PyQt4.QtGui import QWidget
11 from PyQt4.QtWebKit import QWebPluginFactory
12 9
13 10
14 class WebPluginInterface(object): 11 class WebPluginInterface(object):
15 """ 12 """
16 Class implementing the web plug-in interface. 13 Class implementing the web plug-in interface.
17 """ 14 """
18 def metaPlugin(self): 15 def metaPlugin(self):
19 """ 16 """
20 Public method to create a meta plug-in object containing plug-in info. 17 Public method to create a meta plug-in object containing plug-in info.
21 18
22 @return meta plug-in object (QWebPluginFactory.Plugin) 19 @ireturn meta plug-in object (QWebPluginFactory.Plugin)
23 @exception NotImplementedError raised to indicate that this method 20 @exception NotImplementedError raised to indicate that this method
24 must be implemented by subclasses 21 must be implemented by subclasses
25 """ 22 """
26 raise NotImplementedError 23 raise NotImplementedError
27 return QWebPluginFactory.Plugin()
28 24
29 def create(self, mimeType, url, argumentNames, argumentValues): 25 def create(self, mimeType, url, argumentNames, argumentValues):
30 """ 26 """
31 Public method to create a plug-in instance for the given data. 27 Public method to create a plug-in instance for the given data.
32 28
33 @param mimeType MIME type for the plug-in (string) 29 @param mimeType MIME type for the plug-in (string)
34 @param url URL for the plug-in (QUrl) 30 @param url URL for the plug-in (QUrl)
35 @param argumentNames list of argument names (list of strings) 31 @param argumentNames list of argument names (list of strings)
36 @param argumentValues list of argument values (list of strings) 32 @param argumentValues list of argument values (list of strings)
37 @return reference to the created object (QWidget) 33 @ireturn reference to the created object (QWidget)
38 @exception NotImplementedError raised to indicate that this method 34 @exception NotImplementedError raised to indicate that this method
39 must be implemented by subclasses 35 must be implemented by subclasses
40 """ 36 """
41 raise NotImplementedError 37 raise NotImplementedError
42 return QWidget()
43 38
44 def configure(self): 39 def configure(self):
45 """ 40 """
46 Public method to configure the plug-in. 41 Public method to configure the plug-in.
47 42

eric ide

mercurial