KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Private Attributes | List of all members
KviCachedPixmap Class Reference

Class for holding a cached pixmap. More...

#include <KviIconManager.h>

Public Member Functions

 KviCachedPixmap (QPixmap *pPix, const QString &szPath)
 Constructs the KviCachedPixmap object. More...
 
kvi_time_t lastAccessTime ()
 Returns the time the image was last accessed. More...
 
const QString & path ()
 Returns the path of the image. More...
 
QPixmap * pixmap ()
 Returns the image. More...
 
unsigned int size ()
 Returns the size of the image. More...
 
void updateLastAccessTime ()
 Updates the time the image was last accessed. More...
 
 ~KviCachedPixmap ()
 Destroys the KviCachedPixmap object. More...
 

Private Attributes

QPixmap * m_pPixmap
 
QString m_szPath
 
kvi_time_t m_tLastAccess
 
unsigned int m_uSize
 

Detailed Description

Class for holding a cached pixmap.

Constructor & Destructor Documentation

KviCachedPixmap::KviCachedPixmap ( QPixmap *  pPix,
const QString &  szPath 
)

Constructs the KviCachedPixmap object.

Parameters
pPixThe image object
szPathThe path of the image
Warning
The pixmap MUST be allocated with new QPixmap(). This class takes the ownership
Returns
KviCachedPixmap

References kvi_unixTime, m_pPixmap, m_szPath, m_tLastAccess, and m_uSize.

KviCachedPixmap::~KviCachedPixmap ( )

Destroys the KviCachedPixmap object.

References m_pPixmap.

Member Function Documentation

kvi_time_t KviCachedPixmap::lastAccessTime ( )
inline

Returns the time the image was last accessed.

Returns
kvi_time_t
const QString& KviCachedPixmap::path ( )
inline

Returns the path of the image.

Returns
const QString &

Referenced by KviIconManager::getImage(), and KviTheme::save().

QPixmap* KviCachedPixmap::pixmap ( )
inline

Returns the image.

Returns
QPixmap *

References m_pPixmap.

Referenced by KviIconManager::getBigIcon(), KviIconManager::getImage(), and KviIconManager::getPixmap().

unsigned int KviCachedPixmap::size ( )
inline

Returns the size of the image.

Returns
unsigned int

Referenced by KviIconManager::addToCache().

void KviCachedPixmap::updateLastAccessTime ( )

Updates the time the image was last accessed.

Returns
void

References kvi_unixTime, and m_tLastAccess.

Referenced by KviIconManager::getPixmapWithCache(), and KviIconManager::getPixmapWithCacheScaleOnLoad().

Member Data Documentation

QPixmap* KviCachedPixmap::m_pPixmap
private
QString KviCachedPixmap::m_szPath
private

Referenced by KviCachedPixmap().

kvi_time_t KviCachedPixmap::m_tLastAccess
private
unsigned int KviCachedPixmap::m_uSize
private

Referenced by KviCachedPixmap().


The documentation for this class was generated from the following files: