E5Gui/E5Application.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
7 Class implementing a specialized application class. 7 Class implementing a specialized application class.
8 """ 8 """
9 9
10 from PyQt4.QtCore import QCoreApplication 10 from PyQt4.QtCore import QCoreApplication
11 from PyQt4.QtGui import QApplication 11 from PyQt4.QtGui import QApplication
12
12 13
13 class E5Application(QApplication): 14 class E5Application(QApplication):
14 """ 15 """
15 Eric application class with an object registry. 16 Eric application class with an object registry.
16 """ 17 """
49 if name in self.__objectRegistry: 50 if name in self.__objectRegistry:
50 return self.__objectRegistry[name] 51 return self.__objectRegistry[name]
51 else: 52 else:
52 raise KeyError('Object "{0}" is not registered.'.format(name)) 53 raise KeyError('Object "{0}" is not registered.'.format(name))
53 54
54 def registerPluginObject(self, name, object, pluginType = None): 55 def registerPluginObject(self, name, object, pluginType=None):
55 """ 56 """
56 Public method to register a plugin object in the object registry. 57 Public method to register a plugin object in the object registry.
57 58
58 @param name name of the plugin object (string) 59 @param name name of the plugin object (string)
59 @param object reference to the plugin object 60 @param object reference to the plugin object

eric ide

mercurial