eric6/Plugins/PluginVmListspace.py

changeset 6942
2602857055c5
parent 6645
ad476851d7e0
child 7199
c71bd6f21748
diff -r f99d60d6b59b -r 2602857055c5 eric6/Plugins/PluginVmListspace.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eric6/Plugins/PluginVmListspace.py	Sun Apr 14 15:09:21 2019 +0200
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2007 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing the Tabview view manager plugin.
+"""
+
+from __future__ import unicode_literals
+
+import os
+
+from PyQt5.QtCore import QT_TRANSLATE_NOOP, QObject
+from PyQt5.QtGui import QPixmap
+
+import UI.Info
+
+# Start-Of-Header
+name = "Listspace Plugin"
+author = "Detlev Offenbach <detlev@die-offenbachs.de>"
+autoactivate = False
+deactivateable = False
+version = UI.Info.VersionOnly
+pluginType = "viewmanager"
+pluginTypename = "listspace"
+displayString = QT_TRANSLATE_NOOP('VmListspacePlugin', 'Listspace')
+className = "VmListspacePlugin"
+packageName = "__core__"
+shortDescription = "Implements the Listspace view manager."
+longDescription = """This plugin provides the listspace view manager."""
+pyqtApi = 2
+python2Compatible = True
+# End-Of-Header
+
+error = ""
+
+
+def previewPix():
+    """
+    Module function to return a preview pixmap.
+    
+    @return preview pixmap (QPixmap)
+    """
+    fname = os.path.join(os.path.dirname(__file__),
+                         "ViewManagerPlugins", "Listspace", "preview.png")
+    return QPixmap(fname)
+    
+
+class VmListspacePlugin(QObject):
+    """
+    Class implementing the Listspace view manager plugin.
+    """
+    def __init__(self, ui):
+        """
+        Constructor
+        
+        @param ui reference to the user interface object (UI.UserInterface)
+        """
+        super(VmListspacePlugin, self).__init__(ui)
+        self.__ui = ui
+
+    def activate(self):
+        """
+        Public method to activate this plugin.
+        
+        @return tuple of reference to instantiated viewmanager and
+            activation status (boolean)
+        """
+        from ViewManagerPlugins.Listspace.Listspace import Listspace
+        self.__object = Listspace(self.__ui)
+        return self.__object, True
+
+    def deactivate(self):
+        """
+        Public method to deactivate this plugin.
+        """
+        # do nothing for the moment
+        pass

eric ide

mercurial