eric6/Plugins/PluginVmListspace.py

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

eric ide

mercurial