6.136. sibl_gui.ui.caches

caches.py

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

Others:

6.136.1. Module Attributes

sibl_gui.ui.caches.LOGGER

6.136.2. Classes

class sibl_gui.ui.caches.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.caches.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.

Returns:Cache metrics. ( Dictionary )
class sibl_gui.ui.caches.AsynchronousGraphicsItemsCache(parent=None, type=None, placeholder=None)[source]

Bases: sibl_gui.ui.caches.AbstractResourcesCache

This class provides an asynchronous graphics items cache.

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

This method is the property for self.__type attribute.

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

This method is the property for self.__placeholder attribute.

Returns:self.__placeholder. ( String )
placeholderGraphicsItem[source]

This method is the property for self.__placeholderGraphicsItem attribute.

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

This method is the property for self.__worker attribute.

Returns:self.__worker. ( QThread )
getContent(key, size=u'Default')[source]

This method reimplements the AbstractResourcesCache.getContent() method.

Parameters:
  • key – Content to retrieve. ( Object )
  • size – Size to retrieve. ( String )
Returns:

Content. ( Object )

flushContent()[source]

This method reimplements the AbstractResourcesCache.flushContent() method.

Returns:Method success. ( Boolean )
loadContent(**content)[source]

This method loads given content into the cache.

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

This method loads given content asynchronously into the cache.

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

This method reimplements the AbstractResourcesCache.getMetrics() method.

Returns:Cache metrics. ( Dictionary )

Table Of Contents

Previous topic

6.135. sibl_gui.libraries.freeImage.freeImage

Next topic

6.137. sibl_gui.ui.common

This Page