src/eric7/Plugins/PluginVmTabview.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 = "tabview" 24 pluginTypename = "tabview"
25 displayString = QT_TRANSLATE_NOOP('VmTabviewPlugin', 'Tabbed View') 25 displayString = QT_TRANSLATE_NOOP("VmTabviewPlugin", "Tabbed View")
26 className = "VmTabviewPlugin" 26 className = "VmTabviewPlugin"
27 packageName = "__core__" 27 packageName = "__core__"
28 shortDescription = "Implements the Tabview view manager." 28 shortDescription = "Implements the Tabview view manager."
29 longDescription = """This plugin provides the tabbed view view manager.""" 29 longDescription = """This plugin provides the tabbed view 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", "Tabview", "preview.png") 43 os.path.dirname(__file__), "ViewManagerPlugins", "Tabview", "preview.png"
44 )
44 return QPixmap(fname) 45 return QPixmap(fname)
45 46
46 47
47 class VmTabviewPlugin(QObject): 48 class VmTabviewPlugin(QObject):
48 """ 49 """
49 Class implementing the Tabview view manager plugin. 50 Class implementing the Tabview 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.Tabview.Tabview import Tabview 69 from ViewManagerPlugins.Tabview.Tabview import Tabview
70
68 self.__object = Tabview(self.__ui) 71 self.__object = Tabview(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