![]() |
KVIrc 5.2.6
Developer APIs
|
The class that manages the icons. More...
#include <KviTextIconManager.h>
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. | |
KviTextIcon * | lookupTextIcon (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 |
The class that manages the icons.
KviTextIconManager::KviTextIconManager | ( | ) |
Constructs the icon manager object.
References m_pTextIconDict.
Referenced by KviTextIconsOptionsWidget.
KviTextIconManager::~KviTextIconManager | ( | ) |
Destroys the icon manager object.
References m_pTextIconDict.
void KviTextIconManager::applyOptions | ( | ) |
Applies the options.
References KVI_OPTION_BOOL, KviOption_boolEnableAnimatedSmiles, and m_pTextIconDict.
|
signal |
Called when the default associations change.
Referenced by checkDefaultAssociations(), insert(), insert(), KviTextIconWindow::KviTextIconWindow(), and load().
void KviTextIconManager::checkDefaultAssociations | ( | ) |
Checks and updates the default associations.
References changed(), default_associations, i, insert(), and m_pTextIconDict.
void KviTextIconManager::clear | ( | ) |
void KviTextIconManager::insert | ( | const QString & | szName, |
int | iId ) |
Inserts an icon in the dictionary.
szName | The name of the icon |
iId | The id of the icon |
References changed(), g_pIconManager, and m_pTextIconDict.
Referenced by checkDefaultAssociations().
void KviTextIconManager::insert | ( | const QString & | szName, |
KviTextIcon & | icon ) |
Inserts an icon in the dictionary.
szName | The name of the icon |
icon | The icon |
References changed(), and m_pTextIconDict.
void KviTextIconManager::load | ( | ) |
Loads the dictionary.
References KviApplication::Config, g_pApp, KVI_CONFIGFILE_TEXTICONS, load(), and TEXTICONMANAGER_CURRENT_CONFIG_UPDATE.
Referenced by load().
|
protected |
Loads the dictionary from a file.
This is the real load() function It returns the config update
szFileName | The filename from where to load |
bMerge | Whether to merge the existing dictionary with the loaded one |
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().
|
inline |
Returns the text of the icon.
szName | The name of the icon |
References m_pTextIconDict.
void KviTextIconManager::save | ( | ) |
Saves the dictionary.
References KviApplication::Config, g_pApp, KVI_CONFIGFILE_TEXTICONS, and save().
Referenced by save().
|
protected |
Saves the dictionary to a file.
This is the real save() function
szFileName | The filename where to save |
References KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), m_pTextIconDict, KviConfigurationFile::setGroup(), TEXTICONMANAGER_CURRENT_CONFIG_UPDATE, KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
|
inline |
Returns the dictionary of the icons.
References m_pTextIconDict.
|
friend |
References KviTextIconManager(), and KviTextIconsOptionsWidget.
Referenced by KviTextIconsOptionsWidget.
|
friend |
References KviTextIconWindow.
Referenced by KviTextIconWindow.
|
private |
Referenced by applyOptions(), checkDefaultAssociations(), clear(), insert(), insert(), KviTextIconManager(), load(), lookupTextIcon(), save(), textIconDict(), and ~KviTextIconManager().