Plugins/PluginVmListspace.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
28 pyqtApi = 2 28 pyqtApi = 2
29 # End-Of-Header 29 # End-Of-Header
30 30
31 error = "" 31 error = ""
32 32
33
33 def previewPix(): 34 def previewPix():
34 """ 35 """
35 Module function to return a preview pixmap. 36 Module function to return a preview pixmap.
36 37
37 @return preview pixmap (QPixmap) 38 @return preview pixmap (QPixmap)
38 """ 39 """
39 fname = os.path.join(os.path.dirname(__file__), 40 fname = os.path.join(os.path.dirname(__file__),
40 "ViewManagerPlugins", "Listspace", "preview.png") 41 "ViewManagerPlugins", "Listspace", "preview.png")
41 return QPixmap(fname) 42 return QPixmap(fname)
42 43
44
43 class VmListspacePlugin(QObject): 45 class VmListspacePlugin(QObject):
44 """ 46 """
45 Class implementing the Listspace view manager plugin. 47 Class implementing the Listspace view manager plugin.
46 """ 48 """
47 def __init__(self, ui): 49 def __init__(self, ui):
55 57
56 def activate(self): 58 def activate(self):
57 """ 59 """
58 Public method to activate this plugin. 60 Public method to activate this plugin.
59 61
60 @return tuple of reference to instantiated viewmanager and 62 @return tuple of reference to instantiated viewmanager and
61 activation status (boolean) 63 activation status (boolean)
62 """ 64 """
63 from ViewManagerPlugins.Listspace.Listspace import Listspace 65 from ViewManagerPlugins.Listspace.Listspace import Listspace
64 self.__object = Listspace(self.__ui) 66 self.__object = Listspace(self.__ui)
65 return self.__object, True 67 return self.__object, True

eric ide

mercurial