Plugins/PluginVmListspace.py

changeset 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
-1:000000000000 0:de9c2efb9d02
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2007 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the Tabview view manager plugin.
8 """
9
10 import os
11
12 from PyQt4.QtCore import QT_TRANSLATE_NOOP
13 from PyQt4.QtGui import QPixmap
14
15 # Start-Of-Header
16 name = "Listspace Plugin"
17 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
18 autoactivate = False
19 deactivateable = False
20 version = "5.0.0"
21 pluginType = "viewmanager"
22 pluginTypename = "listspace"
23 displayString = QT_TRANSLATE_NOOP('VmListspacePlugin', 'Listspace')
24 className = "VmListspacePlugin"
25 packageName = "__core__"
26 shortDescription = "Implements the Listspace view manager."
27 longDescription = """This plugin provides the listspace view manager."""
28 pyqtApi = 2
29 # End-Of-Header
30
31 error = ""
32
33 def previewPix():
34 """
35 Module function to return a preview pixmap.
36
37 @return preview pixmap (QPixmap)
38 """
39 fname = os.path.join(os.path.dirname(__file__),
40 "ViewManagerPlugins", "Listspace", "preview.png")
41 return QPixmap(fname)
42
43 class VmListspacePlugin(object):
44 """
45 Class implementing the Listspace view manager plugin.
46 """
47 def __init__(self, ui):
48 """
49 Constructor
50
51 @param ui reference to the user interface object (UI.UserInterface)
52 """
53 self.__ui = ui
54
55 def activate(self):
56 """
57 Public method to activate this plugin.
58
59 @return tuple of reference to instantiated viewmanager and
60 activation status (boolean)
61 """
62 from ViewManagerPlugins.Listspace.Listspace import Listspace
63 self.__object = Listspace(self.__ui)
64 return self.__object, True
65
66 def deactivate(self):
67 """
68 Public method to deactivate this plugin.
69 """
70 # do nothing for the moment
71 pass

eric ide

mercurial