E5Gui/E5Application.py

Tue, 13 Mar 2018 18:16:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 13 Mar 2018 18:16:30 +0100
changeset 6189
337eb6283a57
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
permissions
-rw-r--r--

E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py

55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
6048
82ad8ec9548c Updated copyright for 2018.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5877
diff changeset
3 # Copyright (c) 2009 - 2018 Detlev Offenbach <detlev@die-offenbachs.de>
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Class implementing a specialized application class.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
5767
e899248519e0 Added code to suppress the generation of native widget siblings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
12 from PyQt5.QtCore import Qt, QCoreApplication
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
13 from PyQt5.QtWidgets import QApplication
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
15
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class E5Application(QApplication):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Eric application class with an object registry.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 def __init__(self, argv):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 Constructor
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 @param argv command line arguments
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
5877
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
26 try:
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
27 QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
28 # __IGNORE_EXCEPTION__
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
29 except AttributeError:
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
30 pass
6189
337eb6283a57 E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
31 try:
337eb6283a57 E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
32 QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
337eb6283a57 E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
33 # __IGNORE_EXCEPTION__
337eb6283a57 E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
34 except AttributeError:
337eb6283a57 E5Application: moved setting of 'Qt.AA_ShareOpenGLContexts' from Startup.py to E5Application.py
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
35 pass
5877
42482d9025af Little change to improve HighDPI compatibility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5778
diff changeset
36
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
37 super(E5Application, self).__init__(argv)
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
5767
e899248519e0 Added code to suppress the generation of native widget siblings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
39 QCoreApplication.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings)
5778
1ee0b025691e Extended the E5Application class to set High DPI pixmap usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5767
diff changeset
40 try:
1ee0b025691e Extended the E5Application class to set High DPI pixmap usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5767
diff changeset
41 QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
1ee0b025691e Extended the E5Application class to set High DPI pixmap usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5767
diff changeset
42 # __IGNORE_EXCEPTION__
1ee0b025691e Extended the E5Application class to set High DPI pixmap usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5767
diff changeset
43 except AttributeError:
1ee0b025691e Extended the E5Application class to set High DPI pixmap usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5767
diff changeset
44 pass
5767
e899248519e0 Added code to suppress the generation of native widget siblings.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5587
diff changeset
45
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.__objectRegistry = {}
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 self.__pluginObjectRegistry = {}
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
49 def registerObject(self, name, objectRef):
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Public method to register an object in the object registry.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 @param name name of the object (string)
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
54 @param objectRef reference to the object
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 @exception KeyError raised when the given name is already in use
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 if name in self.__objectRegistry:
410
e5d1addeb90c Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
58 raise KeyError('Object "{0}" already registered.'.format(name))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 else:
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
60 self.__objectRegistry[name] = objectRef
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 def getObject(self, name):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 Public method to get a reference to a registered object.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 @param name name of the object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 @return reference to the registered object
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 @exception KeyError raised when the given name is not known
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 if name in self.__objectRegistry:
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 return self.__objectRegistry[name]
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 else:
410
e5d1addeb90c Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
73 raise KeyError('Object "{0}" is not registered.'.format(name))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
75 def registerPluginObject(self, name, objectRef, pluginType=None):
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 Public method to register a plugin object in the object registry.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 @param name name of the plugin object (string)
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
80 @param objectRef reference to the plugin object
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 @keyparam pluginType type of the plugin object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 @exception KeyError raised when the given name is already in use
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 if name in self.__pluginObjectRegistry:
2990
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
85 raise KeyError(
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
86 'Pluginobject "{0}" already registered.'.format(name))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 else:
5587
ea526b78ee6c Started to fix code style issues detected by the extended style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
88 self.__pluginObjectRegistry[name] = (objectRef, pluginType)
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 def unregisterPluginObject(self, name):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 Public method to unregister a plugin object in the object registry.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 @param name name of the plugin object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 if name in self.__pluginObjectRegistry:
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 del self.__pluginObjectRegistry[name]
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 def getPluginObject(self, name):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 Public method to get a reference to a registered plugin object.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 @param name name of the plugin object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 @return reference to the registered plugin object
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 @exception KeyError raised when the given name is not known
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 if name in self.__pluginObjectRegistry:
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 return self.__pluginObjectRegistry[name][0]
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 else:
2990
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
110 raise KeyError(
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
111 'Pluginobject "{0}" is not registered.'.format(name))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 def getPluginObjects(self):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 Public method to get a list of (name, reference) pairs of all
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 registered plugin objects.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 @return list of (name, reference) pairs
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 objects = []
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 for name in self.__pluginObjectRegistry:
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 objects.append((name, self.__pluginObjectRegistry[name][0]))
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 return objects
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 def getPluginObjectType(self, name):
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 Public method to get the type of a registered plugin object.
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 @param name name of the plugin object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 @return type of the plugin object (string)
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 @exception KeyError raised when the given name is not known
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 """
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 if name in self.__pluginObjectRegistry:
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 return self.__pluginObjectRegistry[name][1]
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 else:
2990
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
136 raise KeyError(
583beaf0b4b8 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
137 'Pluginobject "{0}" is not registered.'.format(name))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138
410
e5d1addeb90c Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
139 e5App = QCoreApplication.instance

eric ide

mercurial