Plugins/PluginVmListspace.py

Wed, 02 Jan 2013 10:31:48 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 02 Jan 2013 10:31:48 +0100
changeset 2302
f29e9405c851
parent 1509
c0b5e693b0eb
child 2525
8b507a9a2d40
child 2712
4354ab0b67c7
child 2713
a90b27b36d1c
permissions
-rw-r--r--

Updated copyright for 2013.

# -*- coding: utf-8 -*-

# Copyright (c) 2007 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing the Tabview view manager plugin.
"""

import os

from PyQt4.QtCore import QT_TRANSLATE_NOOP, QObject
from PyQt4.QtGui import QPixmap

# Start-Of-Header
name = "Listspace Plugin"
author = "Detlev Offenbach <detlev@die-offenbachs.de>"
autoactivate = False
deactivateable = False
version = "5.1.0"
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
# 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().__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