• QCImagePool
  • QCImagePool Class

    Header: #include <QCImagePool>

    Public Functions

    int byteCount() const
    void clear()
    bool contains(const QString & key) const
    int count() const
    QImage image(const QString & key) const
    void insert(const QString & key, const QImage & image)

    Static Public Members

    QCImagePool * instance()
    QString normalizeKey(const QString & key)

    Protected Functions

    QCImagePool(QObject * parent = 0)

    Detailed Description

    QCImagePool is a singleton component for holding image data.

    You may insert images to this object manually, or uses QCImageLoader to load a batch of images from a folder.

    Then the load images can be used by component like QCImageProvider.

    All the functions within QCImagePool are thread safe.

    Member Function Documentation

    [protected] QCImagePool::QCImagePool(QObject * parent = 0)

    int QCImagePool::byteCount() const

    void QCImagePool::clear()

    Remove all the images

    bool QCImagePool::contains(const QString & key) const

    Return TRUE if the image pool contains the image with key.

    int QCImagePool::count() const

    Return number of images in QCImagePool

    QImage QCImagePool::image(const QString & key) const

    Get the image with key. If it is not existed, it will return an empty image.

    void QCImagePool::insert(const QString & key, const QImage & image)

    Insert the image with key into the image pool.

    [static] QCImagePool * QCImagePool::instance()

    Returns the global QCImagePool instance.

    [static] QString QCImagePool::normalizeKey(const QString & key)

    Remove suffix and convert to lowercase.