KVIrc 5.2.4
Developer APIs
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.
 
kvi_time_t lastAccessTime () const
 Returns the time the image was last accessed.
 
const QString & path () const
 Returns the path of the image.
 
QPixmap * pixmap () const
 Returns the image.
 
unsigned int size () const
 Returns the size of the image.
 
void updateLastAccessTime ()
 Updates the time the image was last accessed.
 
 ~KviCachedPixmap ()
 Destroys the KviCachedPixmap object.
 

Private Attributes

QPixmap * m_pPixmap = nullptr
 
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::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::~KviCachedPixmap ( )

Destroys the KviCachedPixmap object.

References m_pPixmap.

Member Function Documentation

◆ lastAccessTime()

kvi_time_t KviCachedPixmap::lastAccessTime ( ) const
inline

Returns the time the image was last accessed.

Returns
kvi_time_t

◆ path()

const QString & KviCachedPixmap::path ( ) const
inline

Returns the path of the image.

Returns
const QString &

Referenced by KviIconManager::getImage().

◆ pixmap()

QPixmap * KviCachedPixmap::pixmap ( ) const
inline

Returns the image.

Returns
QPixmap *

References m_pPixmap.

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

◆ size()

unsigned int KviCachedPixmap::size ( ) const
inline

Returns the size of the image.

Returns
unsigned int

Referenced by KviIconManager::addToCache().

◆ updateLastAccessTime()

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

◆ m_pPixmap

QPixmap* KviCachedPixmap::m_pPixmap = nullptr
private

◆ m_szPath

QString KviCachedPixmap::m_szPath
private

Referenced by KviCachedPixmap().

◆ m_tLastAccess

kvi_time_t KviCachedPixmap::m_tLastAccess
private

◆ m_uSize

unsigned int KviCachedPixmap::m_uSize
private

Referenced by KviCachedPixmap().


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