6.138. sibl_gui.ui.cache

cache.py

Platform:
Windows, Linux, Mac Os X.
Description:
This module defines the Application cache classes.

Others:

6.138.1. Module Attributes

sibl_gui.ui.cache.LOGGER

6.138.2. Classes

class sibl_gui.ui.cache.CacheMetrics(**kwargs)[source]

Bases: foundations.dataStructures.Structure

This class represents a storage object for cache metrics.

Parameters:kwargs – type, content. ( Key / Value pairs )
class sibl_gui.ui.cache.AbstractResourcesCache(parent=None)[source]

Bases: PyQt4.QtCore.QObject

This class is a QObject subclass used as an abstract resources cache.

Parameters:parent – Object parent. ( QObject )
contentAdded

This signal is emited by the AsynchronousGraphicsItemsCache class whenever content has been added. ( pyqtSignal )

Returns:Content added to the cache. ( List )
contentRemoved

This signal is emited by the AsynchronousGraphicsItemsCache class whenever content has been removed. ( pyqtSignal )

Returns:Content removed from the cache. ( List )
mapping[source]

This method is the property for self.__mapping attribute.

Returns:self.__mapping. ( Dictionary )
isCached(key)[source]

This method returns if given content is cached.

Parameters:key – Content to retrieve. ( Object )
Returns:Is content cached. ( Boolean )
listContent()[source]

This method lists the cache content.

Returns:Cache content. ( List )
addContent(**content)[source]

This method adds given content to the cache.

Parameters:**content – Content to add. ( ** )
Returns:Method success. ( Boolean )
removeContent(*keys)[source]

This method removes given content from the cache.

Parameters:*keys – Content to remove. ( * )
Returns:Method success. ( Boolean )
getContent(key)[source]

This method gets given content from the cache.

Parameters:key – Content to retrieve. ( Object )
Returns:Content. ( Object )
flushContent()[source]

This method flushes the cache content.

Returns:Method success. ( Boolean )
getMetrics()[source]

This method returns the cache metrics.

class sibl_gui.ui.cache.AsynchronousGraphicsItemsCache(parent=None, type=None, default=None)[source]

Bases: sibl_gui.ui.cache.AbstractResourcesCache

This class provides an asynchronous graphics items cache.

Parameters:
  • parent – Object parent. ( QObject )
  • type – Cache type. ( QImage / QPixmap / QIcon )
  • default – Default image. ( String )
type[source]

This method is the property for self.__type attribute.

Returns:self.__type. ( QObject )
default[source]

This method is the property for self.__default attribute.

Returns:self.__default. ( String )
defaultGraphicsItem[source]

This method is the property for self.__defaultGraphicsItem attribute.

Returns:self.__defaultGraphicsItem. ( QObject )
worker[source]

This method is the property for self.__worker attribute.

Returns:self.__worker. ( QThread )
addContent(**content)[source]

This method reimplements the AbstractResourcesCache.addContent() method.

Parameters:**content – Content to add. ( ** )
Returns:Method success. ( Boolean )
addDeferredContent(*content)[source]

This method adds given content to the cache.

Parameters:*content – Paths to add. ( * )
Returns:Method success. ( Boolean )
getMetrics()[source]

This method reimplements the AbstractResourcesCache.getMetrics() method.

Table Of Contents

Previous topic

6.137. sibl_gui.libraries.freeImage.freeImage

Next topic

6.139. sibl_gui.ui.common

This Page