![]() |
KVIrc 5.2.6
Developer APIs
|
#include <KviKvsEventManager.h>
Signals | |
void | eventHandlerDisabled (const QString &) |
Public Member Functions | |
bool | addAppHandler (unsigned int uEvIdx, KviKvsEventHandler *h) |
bool | addRawHandler (unsigned int uRawIdx, const KviKvsEventHandler &h) |
bool | addRawHandler (unsigned int uRawIdx, KviKvsEventHandler *h) |
KviKvsEvent * | appEvent (unsigned int uEvIdx) |
KviPointerList< KviKvsEventHandler > * | appHandlers (unsigned int uEvIdx) |
void | cleanHandlerName (QString &szHandlerName) |
void | clear () |
void | clearAppEvents () |
void | clearRawEvents () |
bool | enableScriptAppHandler (unsigned int uEvIdx, const QString &szName, bool bEnable) |
bool | enableScriptRawHandler (unsigned int uEvIdx, const QString &szName, bool bEnable) |
KviKvsEvent * | findAppEventByName (const QString &szName) |
unsigned int | findAppEventIndexByName (const QString &szName) |
KviKvsScriptEventHandler * | findScriptAppHandler (unsigned int uEvIdx, const QString &szName) |
KviKvsScriptEventHandler * | findScriptRawHandler (unsigned int uEvIdx, const QString &szName) |
bool | hasAppHandlers (unsigned int uEvIdx) |
bool | hasRawHandlers (unsigned int uEvIdx) |
bool | isValidAppEvent (unsigned int uEvIdx) |
bool | isValidRawEvent (unsigned int uEvIdx) |
void | loadAppEvents (const QString &szFileName) |
void | loadRawEvents (const QString &szFileName) |
KviPointerList< KviKvsEventHandler > * | rawHandlers (unsigned int uEvIdx) |
void | removeAllModuleAppHandlers (KviKvsModuleInterface *i) |
void | removeAllModuleHandlers (KviKvsModuleInterface *i) |
void | removeAllModuleRawHandlers (KviKvsModuleInterface *i) |
void | removeAllScriptAppHandlers () |
void | removeAllScriptRawHandlers () |
bool | removeModuleAppHandler (unsigned int uEvIdx, KviKvsModuleInterface *i) |
bool | removeModuleRawHandler (unsigned int uRawIdx, KviKvsModuleInterface *i) |
bool | removeScriptAppHandler (unsigned int uEvIdx, const QString &szName) |
bool | removeScriptRawHandler (unsigned int uEvIdx, const QString &szName) |
void | saveAppEvents (const QString &szFileName) |
void | saveRawEvents (const QString &szFileName) |
bool | trigger (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
bool | triggerDeleteParams (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
bool | triggerHandlers (KviPointerList< KviKvsEventHandler > *pHandlers, KviWindow *pWnd, KviKvsVariantList *pParams) |
bool | triggerRaw (unsigned int uEvIdx, KviWindow *pWnd, KviKvsVariantList *pParams) |
Static Public Member Functions | |
static void | done () |
static void | init () |
static KviKvsEventManager * | instance () |
Protected Member Functions | |
KviKvsEventManager () | |
~KviKvsEventManager () | |
Protected Attributes | |
KviPointerList< KviKvsEventHandler > * | m_rawEventTable [KVI_KVS_NUM_RAW_EVENTS] |
Static Protected Attributes | |
static KviKvsEvent | m_appEventTable [KVI_KVS_NUM_APP_EVENTS] |
static KviKvsEventManager * | m_pInstance = nullptr |
Friends | |
class | KviModule |
|
protected |
References i, m_pInstance, and m_rawEventTable.
Referenced by init(), instance(), and KviModule.
|
protected |
References clear().
bool KviKvsEventManager::addAppHandler | ( | unsigned int | uEvIdx, |
KviKvsEventHandler * | h ) |
References h, KVI_KVS_NUM_APP_EVENTS, and m_appEventTable.
Referenced by EventEditor::commit(), and KviKvsCoreCallbackCommands::KVSCCC().
bool KviKvsEventManager::addRawHandler | ( | unsigned int | uRawIdx, |
const KviKvsEventHandler & | h ) |
References addRawHandler(), h, and KVI_KVS_NUM_RAW_EVENTS.
bool KviKvsEventManager::addRawHandler | ( | unsigned int | uRawIdx, |
KviKvsEventHandler * | h ) |
References h, KVI_KVS_NUM_RAW_EVENTS, and m_rawEventTable.
Referenced by addRawHandler(), and KviKvsCoreCallbackCommands::KVSCCC().
|
inline |
References m_appEventTable.
Referenced by EventEditor::oneTimeSetup().
|
inline |
References m_appEventTable.
void KviKvsEventManager::cleanHandlerName | ( | QString & | szHandlerName | ) |
void KviKvsEventManager::clear | ( | ) |
References clearAppEvents(), and clearRawEvents().
Referenced by ~KviKvsEventManager().
void KviKvsEventManager::clearAppEvents | ( | ) |
References i, and m_appEventTable.
Referenced by clear().
void KviKvsEventManager::clearRawEvents | ( | ) |
References i, and m_rawEventTable.
Referenced by clear().
|
static |
References instance().
Referenced by KviKvs::done().
bool KviKvsEventManager::enableScriptAppHandler | ( | unsigned int | uEvIdx, |
const QString & | szName, | ||
bool | bEnable ) |
References findScriptAppHandler(), and h.
bool KviKvsEventManager::enableScriptRawHandler | ( | unsigned int | uEvIdx, |
const QString & | szName, | ||
bool | bEnable ) |
References findScriptRawHandler(), and h.
|
signal |
Referenced by triggerHandlers().
KviKvsEvent * KviKvsEventManager::findAppEventByName | ( | const QString & | szName | ) |
References KviQString::equalCI(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, and u.
unsigned int KviKvsEventManager::findAppEventIndexByName | ( | const QString & | szName | ) |
References KviQString::equalCI(), KVI_KVS_NUM_APP_EVENTS, m_appEventTable, and u.
Referenced by KviKvsCoreCallbackCommands::KVSCCC(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
KviKvsScriptEventHandler * KviKvsEventManager::findScriptAppHandler | ( | unsigned int | uEvIdx, |
const QString & | szName ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, and KviKvsEventHandler::Script.
Referenced by enableScriptAppHandler(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
KviKvsScriptEventHandler * KviKvsEventManager::findScriptRawHandler | ( | unsigned int | uEvIdx, |
const QString & | szName ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, and KviKvsEventHandler::Script.
Referenced by enableScriptRawHandler(), KviKvsCoreFunctions::KVSCF(), and KviKvsCoreSimpleCommands::KVSCSC().
|
inline |
References m_appEventTable.
|
inline |
References m_rawEventTable.
|
static |
References instance(), and KviKvsEventManager().
Referenced by KviKvs::init().
|
inlinestatic |
References KviKvsEventManager(), and m_pInstance.
Referenced by KviApplication::checkSuggestRestoreDefaultScript(), KviKvs::clearAppEvents(), KviKvs::clearRawEvents(), EventEditor::commit(), RawEditorWidget::commit(), done(), KviUserListView::emitDoubleClick(), KviUserListView::emitRightClick(), init(), KviKvsCoreCallbackCommands::KVSCCC(), KviKvsCoreFunctions::KVSCF(), KviKvsCoreSimpleCommands::KVSCSC(), KviKvsModuleInterface::kvsRegisterAppEventHandler(), KviKvsModuleInterface::kvsRegisterRawEventHandler(), KviKvsModuleInterface::kvsUnregisterAllAppEventHandlers(), KviKvsModuleInterface::kvsUnregisterAllRawEventHandlers(), KviKvsModuleInterface::kvsUnregisterAppEventHandler(), KviKvsModuleInterface::kvsUnregisterRawEventHandler(), KviKvs::loadAppEvents(), KviKvs::loadRawEvents(), EventEditor::oneTimeSetup(), RawEditorWidget::oneTimeSetup(), KviIrcServerParser::parseLiteralQuit(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseUserMode(), KviKvs::saveAppEvents(), EventEditor::saveLastEditedItem(), and KviKvs::saveRawEvents().
|
inline |
References KVI_KVS_NUM_APP_EVENTS.
|
inline |
References KVI_KVS_NUM_RAW_EVENTS.
void KviKvsEventManager::loadAppEvents | ( | const QString & | szFileName | ) |
References KviConfigurationFile::hasGroup(), i, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, KviConfigurationFile::Read, KviConfigurationFile::readBoolEntry(), KviConfigurationFile::readEntry(), KviConfigurationFile::readUIntEntry(), removeAllScriptAppHandlers(), and KviConfigurationFile::setGroup().
Referenced by KviKvs::loadAppEvents().
void KviKvsEventManager::loadRawEvents | ( | const QString & | szFileName | ) |
References KviConfigurationFile::hasGroup(), i, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, KviConfigurationFile::Read, KviConfigurationFile::readBoolEntry(), KviConfigurationFile::readEntry(), KviConfigurationFile::readUIntEntry(), removeAllScriptRawHandlers(), KviKvsScriptEventHandler::setEnabled(), and KviConfigurationFile::setGroup().
Referenced by KviKvs::loadRawEvents().
|
inline |
References m_rawEventTable.
Referenced by RawEditorWidget::oneTimeSetup().
void KviKvsEventManager::removeAllModuleAppHandlers | ( | KviKvsModuleInterface * | i | ) |
References h, i, l, m_appEventTable, and KviKvsEventHandler::Module.
Referenced by KviKvsModuleInterface::kvsUnregisterAllAppEventHandlers(), and removeAllModuleHandlers().
void KviKvsEventManager::removeAllModuleHandlers | ( | KviKvsModuleInterface * | i | ) |
References removeAllModuleAppHandlers(), and removeAllModuleRawHandlers().
void KviKvsEventManager::removeAllModuleRawHandlers | ( | KviKvsModuleInterface * | i | ) |
References h, i, l, m_rawEventTable, and KviKvsEventHandler::Module.
Referenced by KviKvsModuleInterface::kvsUnregisterAllRawEventHandlers(), and removeAllModuleHandlers().
void KviKvsEventManager::removeAllScriptAppHandlers | ( | ) |
References i, and m_appEventTable.
Referenced by KviKvs::clearAppEvents(), EventEditor::commit(), and loadAppEvents().
void KviKvsEventManager::removeAllScriptRawHandlers | ( | ) |
bool KviKvsEventManager::removeModuleAppHandler | ( | unsigned int | uEvIdx, |
KviKvsModuleInterface * | i ) |
References first(), h, i, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, and KviKvsEventHandler::Module.
Referenced by KviKvsModuleInterface::kvsUnregisterAppEventHandler().
bool KviKvsEventManager::removeModuleRawHandler | ( | unsigned int | uRawIdx, |
KviKvsModuleInterface * | i ) |
References first(), h, i, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, and KviKvsEventHandler::Module.
Referenced by KviKvsModuleInterface::kvsUnregisterRawEventHandler().
bool KviKvsEventManager::removeScriptAppHandler | ( | unsigned int | uEvIdx, |
const QString & | szName ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_APP_EVENTS, m_appEventTable, and KviKvsEventHandler::Script.
Referenced by KviKvsCoreCallbackCommands::KVSCCC().
bool KviKvsEventManager::removeScriptRawHandler | ( | unsigned int | uEvIdx, |
const QString & | szName ) |
References KviQString::equalCI(), first(), h, KVI_KVS_NUM_RAW_EVENTS, m_rawEventTable, and KviKvsEventHandler::Script.
Referenced by KviKvsCoreCallbackCommands::KVSCCC().
void KviKvsEventManager::saveAppEvents | ( | const QString & | szFileName | ) |
void KviKvsEventManager::saveRawEvents | ( | const QString & | szFileName | ) |
|
inline |
References m_appEventTable, and triggerHandlers().
Referenced by KviUserListView::emitDoubleClick(), KviUserListView::emitRightClick(), and KviIrcServerParser::parseUserMode().
|
inline |
References m_appEventTable, and triggerHandlers().
bool KviKvsEventManager::triggerHandlers | ( | KviPointerList< KviKvsEventHandler > * | pHandlers, |
KviWindow * | pWnd, | ||
KviKvsVariantList * | pParams ) |
References __tr2qs_ctx, eventHandlerDisabled(), KviPointerList< T >::first(), h, KviKvsScript::HaltEncountered, KVI_OPTION_BOOL, KVI_OUT_PARSERERROR, KviModule, KviOption_boolDisableBrokenEventHandlers, m, KviKvsEventHandler::Module, KviPointerList< T >::next(), KviWindow::output(), KviKvsScript::PreserveParams, s, and KviKvsEventHandler::Script.
Referenced by trigger(), triggerDeleteParams(), and triggerRaw().
|
inline |
References m_rawEventTable, and triggerHandlers().
|
friend |
References KviKvsEventManager(), and KviModule.
Referenced by KviModule, and triggerHandlers().
|
staticprotected |
Referenced by addAppHandler(), appEvent(), appHandlers(), clearAppEvents(), findAppEventByName(), findAppEventIndexByName(), findScriptAppHandler(), hasAppHandlers(), loadAppEvents(), removeAllModuleAppHandlers(), removeAllScriptAppHandlers(), removeModuleAppHandler(), removeScriptAppHandler(), saveAppEvents(), trigger(), and triggerDeleteParams().
|
staticprotected |
Referenced by instance(), and KviKvsEventManager().
|
protected |