KVIrc 5.2.4
Developer APIs
Public Member Functions | Protected Attributes | List of all members
KviTextIcon Class Reference

The class that holds the icons. More...

#include <KviTextIconManager.h>

Public Member Functions

KviAnimatedPixmapanimatedPixmap () const
 Returns the animated pixmap associated to the icon.
 
const QString & filename () const
 Returns the filename of the icon.
 
KviIconManager::SmallIcon id () const
 Returns the id of the icon.
 
 KviTextIcon (const QString &szFile)
 Constructs the icon object.
 
 KviTextIcon (KviIconManager::SmallIcon eIcon)
 Constructs the icon object.
 
 KviTextIcon (KviTextIcon *pIcon)
 Constructs the icon object.
 
QPixmap * pixmap ()
 Returns the pixmap associated to the icon.
 
void setFilename (const QString &szFileName)
 Sets the filename of the icon.
 
void setId (int iIcon)
 Sets the id of the icon.
 
void setId (KviIconManager::SmallIcon eIcon)
 Sets the id of the icon.
 
void setPixmap (QPixmap *pIcon)
 
 ~KviTextIcon ()
 Destroys the icon object.
 

Protected Attributes

KviIconManager::SmallIcon m_eIcon
 
KviAnimatedPixmapm_pAnimatedPixmap = nullptr
 
QString m_szFileName
 

Detailed Description

The class that holds the icons.

Constructor & Destructor Documentation

◆ KviTextIcon() [1/3]

KviTextIcon::KviTextIcon ( KviIconManager::SmallIcon  eIcon)

Constructs the icon object.

Parameters
eIconThe id of the icon
Returns
KviTextIcon

◆ KviTextIcon() [2/3]

KviTextIcon::KviTextIcon ( const QString &  szFile)

◆ KviTextIcon() [3/3]

KviTextIcon::KviTextIcon ( KviTextIcon pIcon)

Constructs the icon object.

Parameters
pIconThe pointer to the icon
Returns
KviTextIcon

References id(), m_eIcon, m_pAnimatedPixmap, and m_szFileName.

◆ ~KviTextIcon()

KviTextIcon::~KviTextIcon ( )

Destroys the icon object.

References m_pAnimatedPixmap.

Member Function Documentation

◆ animatedPixmap()

KviAnimatedPixmap * KviTextIcon::animatedPixmap ( ) const
inline

Returns the animated pixmap associated to the icon.

Returns
KviAnimatedPixmap *

References m_pAnimatedPixmap.

Referenced by KviIrcView::getTextLine(), and KviIrcView::paintEvent().

◆ filename()

const QString & KviTextIcon::filename ( ) const
inline

Returns the filename of the icon.

Returns
QString

Referenced by texticons_kvs_fnc_get().

◆ id()

KviIconManager::SmallIcon KviTextIcon::id ( ) const
inline

◆ pixmap()

QPixmap * KviTextIcon::pixmap ( )

◆ setFilename()

void KviTextIcon::setFilename ( const QString &  szFileName)

◆ setId() [1/2]

void KviTextIcon::setId ( int  iIcon)

Sets the id of the icon.

Parameters
iIconThe id of the icon
Note
This function is provided for convenience
Returns
void

References g_pIconManager, KviIconManager::iconName(), m_eIcon, and m_szFileName.

◆ setId() [2/2]

void KviTextIcon::setId ( KviIconManager::SmallIcon  eIcon)

Sets the id of the icon.

Parameters
eIconThe id of the icon
Returns
void

References m_eIcon, and m_szFileName.

Referenced by OptionsWidget_textIcons::iconSelected(), TextIconTableItem::setId(), and texticons_kvs_cmd_set().

◆ setPixmap()

void KviTextIcon::setPixmap ( QPixmap *  pIcon)

Member Data Documentation

◆ m_eIcon

KviIconManager::SmallIcon KviTextIcon::m_eIcon
protected

◆ m_pAnimatedPixmap

KviAnimatedPixmap* KviTextIcon::m_pAnimatedPixmap = nullptr
protected

◆ m_szFileName

QString KviTextIcon::m_szFileName
protected

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