Source Code (Use browser search to find items of interest.)

Class Index

kdat'ImageCache (./kdeadmin/kdat/ImageCache.h:26)

class ImageCache {
    static ImageCache* _instance;

    QPixmap* _archive;
    QPixmap* _backup;
    QPixmap* _file;
    QPixmap* _folderClosed;
    QPixmap* _folderOpen;
    QPixmap* _restore;
    QPixmap* _selectAll;
    QPixmap* _selectNone;
    QPixmap* _selectSome;
    QPixmap* _tape;
    QPixmap* _tapeMounted;
    QPixmap* _tapeUnmounted;
    QPixmap* _verify;

    ImageCache();
public:
    /**
     * Destroy the image cache and free the icons.
     */
    ~ImageCache();

    /**
     * This method is an accessor for the single instance of the image cache.
     *
     * @return A pointer to the single instance of the image cache.
     */
    static ImageCache* instance();

    /**
     * Get the tree-node icon used for archives.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getArchive();

    /**
     * Get the toolbar icon used for the backup action.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getBackup();

    /**
     * Get the tree-node icon used for files.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getFile();

    /**
     * Get the tree-node icon used for a closed folder.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getFolderClosed();

    /**
     * Get the tree-node icon used for an open folder.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getFolderOpen();

    /**
     * Get the toolbar icon used for the restore action.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getRestore();

    /**
     * Get the tree-node icon used when all subnodes are selected.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getSelectAll();

    /**
     * Get the tree-node icon used when no subnodes are selected.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getSelectNone();
    
    /**
     * Get the tree-node icon used when some subnodes are selected.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getSelectSome();

    /**
     * Get the tree-node icon used for tape indexes.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getTape();

    /**
     * Get the tree-node/toolbar icon used for a mounted tape drive.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getTapeMounted();

    /**
     * Get the tree-node/toolbar icon used for an unmounted tape drive.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getTapeUnmounted();

    /**
     * Get the toolbar icon used for the verify action.
     *
     * @return A pointer to the icon.
     */
    const QPixmap* getVerify();
};

kdat'ImageCache::ImageCache() (./kdeadmin/kdat/ImageCache.cpp:24)

ImageCache::ImageCache()
{
    KIconLoader *l = KGlobal::iconLoader();
    _archive       = new QPixmap(l->iconPath("package", KIcon::Toolbar));
    _backup        = new QPixmap(l->iconPath("kdat_backup", KIcon::Toolbar));
    _file          = new QPixmap(l->iconPath("kdat_file", KIcon::Toolbar));
    _folderClosed  = new QPixmap(l->iconPath("closed", KIcon::Toolbar));
    _folderOpen    = new QPixmap(l->iconPath("open", KIcon::Toolbar));
    _restore       = new QPixmap(l->iconPath("kdat_restore", KIcon::Toolbar));
    _selectAll     = new QPixmap(l->iconPath("kdat_select_all", KIcon::Toolbar));
    _selectNone    = new QPixmap(l->iconPath("kdat_select_none", KIcon::Toolbar));
    _selectSome    = new QPixmap(l->iconPath("kdat_select_some", KIcon::Toolbar));
    _tape          = new QPixmap(l->iconPath("kdat_archive", KIcon::Toolbar));
    _tapeMounted   = new QPixmap(l->iconPath("kdat_mounted", KIcon::Toolbar));
    _tapeUnmounted = new QPixmap(l->iconPath("kdat_unmounted", KIcon::Toolbar));
    _verify        = new QPixmap(l->iconPath("kdat_verify", KIcon::Toolbar));
}


kdat'ImageCache::~ImageCache() (./kdeadmin/kdat/ImageCache.cpp:42)

ImageCache::~ImageCache()
{
    delete _archive;
    delete _backup;
    delete _file;
    delete _folderClosed;
    delete _folderOpen;
    delete _restore;
    delete _tape;
    delete _tapeMounted;
    delete _tapeUnmounted;
    delete _verify;
}


kdat'ImageCache::instance() (./kdeadmin/kdat/ImageCache.cpp:58)

ImageCache* ImageCache::instance()
{
    if ( _instance == 0 ) {
        _instance = new ImageCache();
    }

    return _instance;
}


kdat'ImageCache::getArchive() (./kdeadmin/kdat/ImageCache.cpp:67)

const QPixmap* ImageCache::getArchive()
{
    return _archive;
}


kdat'ImageCache::getBackup() (./kdeadmin/kdat/ImageCache.cpp:72)

const QPixmap* ImageCache::getBackup()
{
    return _backup;
}


kdat'ImageCache::getFile() (./kdeadmin/kdat/ImageCache.cpp:77)

const QPixmap* ImageCache::getFile()
{
    return _file;
}


kdat'ImageCache::getFolderClosed() (./kdeadmin/kdat/ImageCache.cpp:82)

const QPixmap* ImageCache::getFolderClosed()
{
    return _folderClosed;
}


kdat'ImageCache::getFolderOpen() (./kdeadmin/kdat/ImageCache.cpp:87)

const QPixmap* ImageCache::getFolderOpen()
{
    return _folderOpen;
}


kdat'ImageCache::getRestore() (./kdeadmin/kdat/ImageCache.cpp:92)

const QPixmap* ImageCache::getRestore()
{
    return _restore;
}


kdat'ImageCache::getSelectAll() (./kdeadmin/kdat/ImageCache.cpp:97)

const QPixmap* ImageCache::getSelectAll()
{
    return _selectAll;
}


kdat'ImageCache::getSelectNone() (./kdeadmin/kdat/ImageCache.cpp:102)

const QPixmap* ImageCache::getSelectNone()
{
    return _selectNone;
}


kdat'ImageCache::getSelectSome() (./kdeadmin/kdat/ImageCache.cpp:107)

const QPixmap* ImageCache::getSelectSome()
{
    return _selectSome;
}


kdat'ImageCache::getTape() (./kdeadmin/kdat/ImageCache.cpp:112)

const QPixmap* ImageCache::getTape()
{
    return _tape;
}


kdat'ImageCache::getTapeMounted() (./kdeadmin/kdat/ImageCache.cpp:117)

const QPixmap* ImageCache::getTapeMounted()
{
    return _tapeMounted;
}


kdat'ImageCache::getTapeUnmounted() (./kdeadmin/kdat/ImageCache.cpp:122)

const QPixmap* ImageCache::getTapeUnmounted()
{
    return _tapeUnmounted;
}


kdat'ImageCache::getVerify() (./kdeadmin/kdat/ImageCache.cpp:127)

const QPixmap* ImageCache::getVerify()
{
    return _verify;
}