src/eric7/Plugins/PluginVmListspace.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
20 autoactivate = False 20 autoactivate = False
21 deactivateable = False 21 deactivateable = False
22 version = UI.Info.VersionOnly 22 version = UI.Info.VersionOnly
23 pluginType = "viewmanager" 23 pluginType = "viewmanager"
24 pluginTypename = "listspace" 24 pluginTypename = "listspace"
25 displayString = QT_TRANSLATE_NOOP('VmListspacePlugin', 'Listspace') 25 displayString = QT_TRANSLATE_NOOP("VmListspacePlugin", "Listspace")
26 className = "VmListspacePlugin" 26 className = "VmListspacePlugin"
27 packageName = "__core__" 27 packageName = "__core__"
28 shortDescription = "Implements the Listspace view manager." 28 shortDescription = "Implements the Listspace view manager."
29 longDescription = """This plugin provides the listspace view manager.""" 29 longDescription = """This plugin provides the listspace view manager."""
30 pyqtApi = 2 30 pyqtApi = 2
34 34
35 35
36 def previewPix(): 36 def previewPix():
37 """ 37 """
38 Module function to return a preview pixmap. 38 Module function to return a preview pixmap.
39 39
40 @return preview pixmap (QPixmap) 40 @return preview pixmap (QPixmap)
41 """ 41 """
42 fname = os.path.join(os.path.dirname(__file__), 42 fname = os.path.join(
43 "ViewManagerPlugins", "Listspace", "preview.png") 43 os.path.dirname(__file__), "ViewManagerPlugins", "Listspace", "preview.png"
44 )
44 return QPixmap(fname) 45 return QPixmap(fname)
45 46
46 47
47 class VmListspacePlugin(QObject): 48 class VmListspacePlugin(QObject):
48 """ 49 """
49 Class implementing the Listspace view manager plugin. 50 Class implementing the Listspace view manager plugin.
50 """ 51 """
52
51 def __init__(self, ui): 53 def __init__(self, ui):
52 """ 54 """
53 Constructor 55 Constructor
54 56
55 @param ui reference to the user interface object (UI.UserInterface) 57 @param ui reference to the user interface object (UI.UserInterface)
56 """ 58 """
57 super().__init__(ui) 59 super().__init__(ui)
58 self.__ui = ui 60 self.__ui = ui
59 61
60 def activate(self): 62 def activate(self):
61 """ 63 """
62 Public method to activate this plugin. 64 Public method to activate this plugin.
63 65
64 @return tuple of reference to instantiated viewmanager and 66 @return tuple of reference to instantiated viewmanager and
65 activation status (boolean) 67 activation status (boolean)
66 """ 68 """
67 from ViewManagerPlugins.Listspace.Listspace import Listspace 69 from ViewManagerPlugins.Listspace.Listspace import Listspace
70
68 self.__object = Listspace(self.__ui) 71 self.__object = Listspace(self.__ui)
69 return self.__object, True 72 return self.__object, True
70 73
71 def deactivate(self): 74 def deactivate(self):
72 """ 75 """

eric ide

mercurial