KVIrc 5.2.6
Developer APIs
KviTextIconManager Class Reference

The class that manages the icons. More...

#include <KviTextIconManager.h>

+ Inheritance diagram for KviTextIconManager:

Signals

void changed ()
 Called when the default associations change.
 

Public Member Functions

void applyOptions ()
 Applies the options.
 
void checkDefaultAssociations ()
 Checks and updates the default associations.
 
void clear ()
 Clears the dictionary.
 
void insert (const QString &szName, int iId)
 Inserts an icon in the dictionary.
 
void insert (const QString &szName, KviTextIcon &icon)
 Inserts an icon in the dictionary.
 
 KviTextIconManager ()
 Constructs the icon manager object.
 
void load ()
 Loads the dictionary.
 
KviTextIconlookupTextIcon (const QString &szName)
 Returns the text of the icon.
 
void save ()
 Saves the dictionary.
 
KviPointerHashTable< QString, KviTextIcon > * textIconDict () const
 Returns the dictionary of the icons.
 
 ~KviTextIconManager ()
 Destroys the icon manager object.
 

Protected Member Functions

int load (const QString &szFileName, bool bMerge=false)
 Loads the dictionary from a file.
 
void save (const QString &szFileName)
 Saves the dictionary to a file.
 

Private Attributes

KviPointerHashTable< QString, KviTextIcon > * m_pTextIconDict
 

Friends

class KviTextIconsOptionsWidget
 
class KviTextIconWindow
 

Detailed Description

The class that manages the icons.

Constructor & Destructor Documentation

◆ KviTextIconManager()

KviTextIconManager::KviTextIconManager ( )

Constructs the icon manager object.

Returns
KviTextIconManager

References m_pTextIconDict.

Referenced by KviTextIconsOptionsWidget.

◆ ~KviTextIconManager()

KviTextIconManager::~KviTextIconManager ( )

Destroys the icon manager object.

References m_pTextIconDict.

Member Function Documentation

◆ applyOptions()

void KviTextIconManager::applyOptions ( )

Applies the options.

Returns
void

References KVI_OPTION_BOOL, KviOption_boolEnableAnimatedSmiles, and m_pTextIconDict.

◆ changed

void KviTextIconManager::changed ( )
signal

Called when the default associations change.

Returns
void

Referenced by checkDefaultAssociations(), insert(), insert(), KviTextIconWindow::KviTextIconWindow(), and load().

◆ checkDefaultAssociations()

void KviTextIconManager::checkDefaultAssociations ( )

Checks and updates the default associations.

Returns
void

References changed(), default_associations, i, insert(), and m_pTextIconDict.

◆ clear()

void KviTextIconManager::clear ( )

Clears the dictionary.

Returns
void

References m_pTextIconDict.

◆ insert() [1/2]

void KviTextIconManager::insert ( const QString & szName,
int iId )

Inserts an icon in the dictionary.

Parameters
szNameThe name of the icon
iIdThe id of the icon
Returns
void

References changed(), g_pIconManager, and m_pTextIconDict.

Referenced by checkDefaultAssociations().

◆ insert() [2/2]

void KviTextIconManager::insert ( const QString & szName,
KviTextIcon & icon )

Inserts an icon in the dictionary.

Parameters
szNameThe name of the icon
iconThe icon
Returns
void

References changed(), and m_pTextIconDict.

◆ load() [1/2]

void KviTextIconManager::load ( )

Loads the dictionary.

Returns
void

References KviApplication::Config, g_pApp, KVI_CONFIGFILE_TEXTICONS, load(), and TEXTICONMANAGER_CURRENT_CONFIG_UPDATE.

Referenced by load().

◆ load() [2/2]

int KviTextIconManager::load ( const QString & szFileName,
bool bMerge = false )
protected

Loads the dictionary from a file.

This is the real load() function It returns the config update

Parameters
szFileNameThe filename from where to load
bMergeWhether to merge the existing dictionary with the loaded one
Returns
int

References changed(), KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), KviConfigurationFile::dict(), g_pIconManager, KviIconManager::Help, m_pTextIconDict, KviConfigurationFile::Read, KviConfigurationFile::readEntry(), KviConfigurationFile::readIntEntry(), s, and KviConfigurationFile::setGroup().

◆ lookupTextIcon()

KviTextIcon * KviTextIconManager::lookupTextIcon ( const QString & szName)
inline

Returns the text of the icon.

Parameters
szNameThe name of the icon
Returns
KviTextIcon *

References m_pTextIconDict.

◆ save() [1/2]

void KviTextIconManager::save ( )

Saves the dictionary.

Returns
void

References KviApplication::Config, g_pApp, KVI_CONFIGFILE_TEXTICONS, and save().

Referenced by save().

◆ save() [2/2]

void KviTextIconManager::save ( const QString & szFileName)
protected

◆ textIconDict()

KviPointerHashTable< QString, KviTextIcon > * KviTextIconManager::textIconDict ( ) const
inline

Returns the dictionary of the icons.

Returns
KviPointerHashTable<QString,KviTextIcon> *

References m_pTextIconDict.

Friends And Related Symbol Documentation

◆ KviTextIconsOptionsWidget

friend class KviTextIconsOptionsWidget
friend

◆ KviTextIconWindow

friend class KviTextIconWindow
friend

References KviTextIconWindow.

Referenced by KviTextIconWindow.

Member Data Documentation

◆ m_pTextIconDict


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