Metadata-Version: 1.1
Name: Manager
Version: 2.0.3
Summary: Manager is the Components Manager package of Umbra, sIBL_GUI and sIBL_Reporter.
Home-page: https://github.com/KelSolaar/Manager
Author: Thomas Mansencal
Author-email: thomas.mansencal@gmail.com
License: GPLv3
Description: Manager
        =======
        
        ..  image:: https://secure.travis-ci.org/KelSolaar/Manager.png?branch=master
        
        Introduction
        ------------
        
        **Manager** is the Components Manager package of `Umbra <https://github.com/KelSolaar/Umbra>`_, `sIBL_GUI <https://github.com/KelSolaar/sIBL_GUI>`_ and `sIBL_Reporter <https://github.com/KelSolaar/sIBL_Reporter>`_. Components are simple python packages extending capabilities of their host application.
        
        Installation
        ------------
        
        The following dependencies are needed:
        
        -  **Python 2.6.7** or **Python 2.7.3**: http://www.python.org/
        -  **PyQt**: http://www.riverbankcomputing.co.uk/
        
        To install **Manager** from the `Python Package Index <http://pypi.python.org/pypi/Manager>`_ you can issue this command in a shell::
        
        	pip install Manager
        
        or this alternative command::
        
        	easy_install Manager
        
        Alternatively, if you want to directly install from `Github <http://github.com/KelSolaar/Manager>`_ source repository::
        
        	git clone git://github.com/KelSolaar/Manager.git
        	cd Manager
        	python setup.py install
        
        If you want to build the documentation you will also need:
        
        -  **Tidy** http://tidy.sourceforge.net/
        
        Usage
        -----
        
        Please refer to `Manager - Api <http://thomasmansencal.com/Sharing/Manager/Support/Documentation/Api/index.html>`_ for precise usage examples.
        
        A Component package contains at least a resource **.rc** description file and a main module::
        
        	testsComponentA
        	├── __init__.py
        	├── testsComponentA.py
        	└── testsComponentA.rc
        
        The description file is a configuration style file with a structure similar to what you would find in Microsoft Windows INI files::
        
        	[Component]
        	Name = core.testsComponentA
        	Title = Tests Component A
        	Module = testsComponentA
        	Object = TestsComponentA
        	Version = 1.0
        
        	[Informations]
        	Author = Thomas Mansencal
        	Email = thomas.mansencal@gmail.com
        	Url = http://www.hdrlabs.com/
        	Description = Core tests Component A.
        
        Given the following directories structure::
        
        	core
        	├── __init__.py
        	├── testsComponentA
        	│   ├── __init__.py
        	│   ├── testsComponentA.py
        	│   └── testsComponentA.rc
        	└── testsComponentB
        		├── __init__.py
        		├── testsComponentB.py
        		└── testsComponentB.rc
        
        Instantiating the Components Manager is done the following way::
        
        
        	>>> manager = Manager(("./manager/tests/testsManager/resources/components/core",))
        	>>> manager.registerComponents()
        	True
        	>>> manager.listComponents()
        	['core.testsComponentA', 'core.testsComponentB']
        	>>> manager.instantiateComponents()
        	True
        	>>> manager.getInterface("core.testsComponentA")
        	<testsComponentA.TestsComponentA object at 0x11dd990>
        
        **manager.componentsManager.Manager.getInterface(name)** method returns the interface of given Component, in the previous example it's the object declared in the description file by this statement: **Object = TestsComponentA**.
        
        Three base Components are provided by default:
        
        -  **manager.component.Component**
        -  **manager.qobjectComponent.QObjectComponent**
        -  **manager.qwidgetComponent.QWidgetComponent**
        
        When inheriting from those Components, one have to reimplement the following methods for all the Components types:
        
        -  **activate**
        -  **deactivate**
        
        **activated** attribute has to be set accordingly in the methods implementation.
        
        When implementing a **manager.qwidgetComponent.Component** or **manager.qobjectComponent.QObjectComponent**, the following methods are also needed:
        
        -  **initialize**
        -  **uninitialize**
        
        **initialized** attribute has to be set accordingly in the methods implementation.
        
        Or alternatively, those methods when implementing a **manager.qwidgetComponent.QWidgetComponent**:
        
        -  **initializeUi**
        -  **uninitializeUi**
        
        **initializedUi** attribute has to be set accordingly in the methods implementation.
        
        Reference Component implementation example class::
        
        
        	class TestsComponentA(Component):
        
        		def __init__(self, name=None):
        			Component.__init__(self, name=name)
        			
        			self.deactivatable = True
        
        		def activate(self):
        			print("> Activating '{0}' Component.".format(self.__class__.__name__))
        
        			self.activated = True
        			return True
        
        		def deactivate(self):
        			print("> Deactivating '{0}' Component.".format(self.__class__.__name__))
        
        			self.activated = False
        			return True
        
        		def initialize(self):
        			print("> Initializing '{0}' Component.".format(self.__class__.__name__))
        
        			self.initialized = True
        			return True
        
        		def uninitialize(self):
        			print("> Uninitializing '{0}' Component.".format(self.__class__.__name__))
        
        			self.initialized = False
        			return True
        
        About
        -----
        
        | **Manager** by Thomas Mansencal – 2008 - 2012
        | Copyright© 2008 - 2012 – Thomas Mansencal – `thomas.mansencal@gmail.com <mailto:thomas.mansencal@gmail.com>`_
        | This software is released under terms of GNU GPL V3 license: http://www.gnu.org/licenses/
        | `http://www.thomasmansencal.com/ <http://www.thomasmansencal.com/>`_
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Utilities
