KVIrc
4.9.2
DeveloperAPIs
|
User list view management class. More...
#include <KviUserListView.h>
Public Slots | |
void | animatedAvatarUpdated (KviUserListEntry *e) |
Called when an animated avatar is updated (every frame) More... | |
Public Member Functions | |
void | appendSelectedNicknames (QString &szBuffer) |
Appends the selected nicknames to the buffer. More... | |
void | applyOptions () |
Applies the options. More... | |
bool | avatarChanged (const QString &szNick) |
Returns true if the avatar of a user is changed. More... | |
int | chanAdminCount () |
Returns the number of chan admins. More... | |
int | chanOwnerCount () |
Returns the number of chan owners. More... | |
void | completeNickBashLike (const QString &szBegin, KviPointerList< QString > *pList, bool bAppendMask) |
Completes the nick in Bash-like behaviour. More... | |
bool | completeNickStandard (const QString &szBegin, const QString &szSkipAfter, QString &szBuffer, bool bAppendMask) |
Completes the nick in normal behaviour. More... | |
unsigned int | count () |
Returns the number of the entries in the userlist. More... | |
void | emitDoubleClick () |
Emits the double click signal. More... | |
void | emitRightClick () |
Emits the right click signal. More... | |
void | enableUpdates (bool bEnable) |
Enables the updates on the view list area. More... | |
void | ensureVisible (const QString &szNick) |
Ensures that a nickname is visible. More... | |
KviPointerHashTable< QString, KviUserListEntry > * | entryDict () |
Returns the entry in the list. More... | |
KviUserListEntry * | findEntry (const QString &szNick) |
Searches an entry in the userlist. More... | |
KviUserListEntry * | firstItem () |
Returns the first item of the user list. More... | |
QString * | firstSelectedNickname () |
Returns the first selected nickname in the list. More... | |
int | flags (const QString &szNick) |
Returns the flags of a user. More... | |
char | getUserFlag (KviUserListEntry *pEntry) |
Returns the flags of a user. More... | |
char | getUserFlag (const QString &szNick) |
Returns the flags of a user. More... | |
kvi_time_t | getUserJoinTime (const QString &szNick) |
Returns the join time of a user. More... | |
kvi_time_t | getUserLastActionTime (const QString &szNick) |
Returns the time of the last action of a user. More... | |
int | getUserModeLevel (const QString &szNick) |
Returns the level of the user mode. More... | |
int | halfOpCount () |
Returns the number of half operators. More... | |
int | ircOpCount () |
Returns the number of ircops. More... | |
bool | isChanAdmin (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is a chan admin. More... | |
bool | isChanOwner (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is a chan owner. More... | |
bool | isHalfOp (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is an half operator. More... | |
bool | isOp (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is an operator. More... | |
bool | isUserOp (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is a user operator. More... | |
bool | isVoice (const QString &szNick, bool bAtLeast=false) |
Returns true if the user is a voice. More... | |
KviUserListEntry * | itemAt (const QPoint &pnt, QRect *pRect=0) |
Returns the item at the given position. More... | |
bool | itemVisible (KviUserListEntry *pEntry) |
Returns true if the item in the entry is visible. More... | |
KviUserListEntry * | join (const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0) |
Called when a user joins the channel. More... | |
KviUserListView (QWidget *pParent, KviWindowToolPageButton *pButton, KviIrcUserDataBase *pDb, KviWindow *pWnd, int iDictSize=5, const QString &szTextLabel=QString(), const char *pName="userslistview") | |
Constructs the user list view object. More... | |
QString * | nextSelectedNickname () |
Returns the next selected nickname in the list. More... | |
bool | nickChange (const QString &szOldNick, const QString &szNewNick) |
Changes a nickname. More... | |
int | opCount () |
Returns the number of operators. More... | |
bool | part (const QString &szNick) |
Check if a user parts from a channel. More... | |
void | partAll () |
Parts from all channels. More... | |
void | partAllButOne (const QString &szWhoNot) |
Parts from all channels but the given one. More... | |
void | prependUserFlag (const QString &szNick, QString &szBuffer) |
Prepends the user flags before the nickname. More... | |
void | select (const QString &szNick) |
Selects a nickname in the list. More... | |
int | selectedCount () |
Returns the number of selected entries in the userlist. More... | |
bool | setChanAdmin (const QString &szNick, bool bChanAdmin) |
Sets the chan admin mode. More... | |
bool | setChanOwner (const QString &szNick, bool bChanOwner) |
Sets the chan owner mode. More... | |
bool | setHalfOp (const QString &szNick, bool bHalfOp) |
Sets the half operator mode. More... | |
void | setMaskEntries (char cType, int iNum) |
Sets the mask entries number for a channel. More... | |
bool | setOp (const QString &szNick, bool bOp) |
Sets the operator mode. More... | |
bool | setUserOp (const QString &szNick, bool bUserOp) |
Sets the user operator mode. More... | |
bool | setVoice (const QString &szNick, bool bVoice) |
Sets the voice mode. More... | |
void | updateArea () |
Updates the list view area. More... | |
void | userAction (KviIrcMask *pUser, int iActionTemperature) |
Verifies a user action. More... | |
void | userAction (const QString &szNick, const QString &szUser, const QString &szHost, int iActionTemperature) |
Verifies a user action. More... | |
void | userAction (const QString &szNick, int iActionTemperature) |
Verifies a user action. More... | |
bool | userActionVerifyMask (const QString &szNick, const QString &szUser, const QString &szHost, int iActionTemperature, QString &szOldUser, QString &szOldHost) |
Verifies the mask for a user action. More... | |
int | userOpCount () |
Returns the number of user operators. More... | |
void | userStats (KviUserListViewUserStats *pStats) |
Gets the user statistics and store them in the user stats pointer. More... | |
int | voiceCount () |
Returns the number of voices. More... | |
KviWindow * | window () |
Returns the window associated to the userlist. More... | |
~KviUserListView () | |
Destroys the user list view object. More... | |
Public Member Functions inherited from KviWindowToolWidget | |
KviWindowToolWidget (QWidget *pParent, KviWindowToolPageButton *pButton) | |
~KviWindowToolWidget () | |
Protected Member Functions | |
void | insertUserEntry (const QString &szNick, KviUserListEntry *pEntry) |
Inserts a user into the users list. More... | |
void | maybeTip (KviUserListToolTip *pTip, const QPoint &pnt) |
Checks if user activated tooltips over the userlist. More... | |
bool | partInternal (const QString &szNick, bool bRemove=true) |
Called when a user parts a channel. More... | |
void | removeAllEntries () |
Clears all channels entries. More... | |
virtual void | resizeEvent (QResizeEvent *e) |
void | setUserDataBase (KviIrcUserDataBase *pDb) |
Sets the user database. More... | |
void | triggerUpdate () |
Updates the view list. More... | |
void | updateScrollBarRange () |
Updates the scrollbar range. More... | |
void | updateUsersLabel () |
Updates the users label. More... | |
Protected Attributes | |
int | m_ibEntries |
int | m_iChanAdminCount |
int | m_iChanOwnerCount |
int | m_ieEntries |
int | m_iFontHeight |
int | m_iHalfOpCount |
int | m_iIEntries |
int | m_iIrcOpCount |
int | m_iOpCount |
int | m_iSelectedCount |
int | m_iTotalHeight |
int | m_iUserOpCount |
int | m_iVoiceCount |
KviPointerHashTable< QString, KviUserListEntry > * | m_pEntryDict |
KviUserListEntry * | m_pHeadItem |
KviIrcUserDataBase * | m_pIrcUserDataBase |
KviUserListEntry * | m_pIterator |
KviWindow * | m_pKviWindow |
KviUserListEntry * | m_pTailItem |
KviUserListToolTip * | m_pToolTip |
KviUserListEntry * | m_pTopItem |
QLabel * | m_pUsersLabel |
KviUserListViewArea * | m_pViewArea |
Protected Attributes inherited from KviWindowToolWidget | |
KviWindowToolPageButton * | m_pButton |
Friends | |
class | KviChannelWindow |
class | KviConsoleWindow |
class | KviQueryWindow |
class | KviUserListEntry |
class | KviUserListToolTip |
class | KviUserListViewArea |
User list view management class.
KviUserListView::KviUserListView | ( | QWidget * | pParent, |
KviWindowToolPageButton * | pButton, | ||
KviIrcUserDataBase * | pDb, | ||
KviWindow * | pWnd, | ||
int | iDictSize = 5 , |
||
const QString & | szTextLabel = QString() , |
||
const char * | pName = "userslistview" |
||
) |
Constructs the user list view object.
pParent | The parent widget |
pButton | The tool page button |
pDb | The irc users database |
pWnd | The window associated to the userlist |
iDictSize | The size of the internal database |
szTextLabel | The label for the tooltip |
pName | The name of the users list |
References KviTalToolTip::add(), applyOptions(), KviUserListToolTip, KviUserListViewArea, m_ibEntries, m_iChanAdminCount, m_iChanOwnerCount, m_ieEntries, m_iHalfOpCount, m_iIEntries, m_iOpCount, m_iSelectedCount, m_iTotalHeight, m_iUserOpCount, m_iVoiceCount, m_pEntryDict, m_pHeadItem, m_pIrcUserDataBase, m_pKviWindow, m_pTailItem, m_pToolTip, m_pTopItem, m_pUsersLabel, m_pViewArea, and KviPointerHashTable< Key, T >::setAutoDelete().
KviUserListView::~KviUserListView | ( | ) |
Destroys the user list view object.
References m_pEntryDict, m_pToolTip, m_pUsersLabel, m_pViewArea, and removeAllEntries().
|
slot |
Called when an animated avatar is updated (every frame)
References KVI_OPTION_BOOL, KVI_OPTION_UINT, KVI_USERLIST_BORDER_WIDTH, KVI_USERLIST_ICON_MARGIN, KVI_USERLIST_ICON_STATE_WIDTH, KVI_USERLIST_ICON_WIDTH, KVI_USERLISTVIEW_GRIDTYPE_DOTGRID, KVI_USERLISTVIEW_GRIDTYPE_PLAINGRID, KviOption_boolDrawGenderIcons, KviOption_boolShowAvatarsInUserlist, KviOption_boolShowUserChannelIcons, KviOption_boolShowUserChannelState, KviOption_boolUserListViewDrawGrid, KviOption_uintUserListViewGridType, KviUserListEntry::m_bSelected, KviUserListEntry::m_iHeight, KviUserListViewArea::m_iTopItemOffset, KviUserListEntry::m_pAvatarPixmap, KviUserListEntry::m_pNext, m_pTopItem, m_pViewArea, and KviAnimatedPixmap::pixmap().
Referenced by KviUserListEntry::avatarFrameChanged().
void KviUserListView::appendSelectedNicknames | ( | QString & | szBuffer | ) |
Appends the selected nicknames to the buffer.
szBuffer | The buffer to use |
References KviUserListEntry::m_bSelected, m_pHeadItem, KviUserListEntry::m_pNext, and KviUserListEntry::m_szNick.
Referenced by emitDoubleClick(), and emitRightClick().
void KviUserListView::applyOptions | ( | ) |
Applies the options.
References KVI_OPTION_FONT, KviOption_fontUserListView, m_iFontHeight, KviUserListEntry::m_iHeight, m_iTotalHeight, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListViewArea::m_pScrollBar, m_pTopItem, m_pUsersLabel, m_pViewArea, KviUserListEntry::recalcSize(), resizeEvent(), KviUserListEntry::updateAvatarData(), and updateScrollBarRange().
Referenced by KviConsoleWindow::applyOptions(), KviQueryWindow::applyOptions(), KviChannelWindow::applyOptions(), and KviUserListView().
bool KviUserListView::avatarChanged | ( | const QString & | szNick | ) |
Returns true if the avatar of a user is changed.
szNick | The nickname of the user |
References KviPointerHashTable< Key, T >::find(), KviUserListViewArea::m_bIgnoreScrollBar, KviUserListEntry::m_iHeight, KviUserListViewArea::m_iLastScrollBarVal, m_iTotalHeight, m_pEntryDict, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListViewArea::m_pScrollBar, m_pTopItem, m_pViewArea, KviUserListEntry::recalcSize(), KviUserListEntry::updateAvatarData(), and updateScrollBarRange().
Referenced by KviChannelWindow::avatarChanged(), KviConsoleWindow::avatarChangedUpdateWindows(), KviIrcConnection::loginToIrcServer(), and nickChange().
|
inline |
|
inline |
void KviUserListView::completeNickBashLike | ( | const QString & | szBegin, |
KviPointerList< QString > * | pList, | ||
bool | bAppendMask | ||
) |
Completes the nick in Bash-like behaviour.
It looks for the letters typed, if it found only a result, it completes the nickname; if it found more than a result, it will wrap will all the possible results
szBegin | The starting of the nick |
pList | The list of nicknames |
bAppendMask | Whether to append the complete mask |
References KviPointerList< T >::append(), KviQString::equalCIN(), KviIrcUserEntry::host(), KviUserListEntry::m_pGlobalData, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListEntry::m_szNick, and KviIrcUserEntry::user().
Referenced by KviInputEditor::completion().
bool KviUserListView::completeNickStandard | ( | const QString & | szBegin, |
const QString & | szSkipAfter, | ||
QString & | szBuffer, | ||
bool | bAppendMask | ||
) |
Completes the nick in normal behaviour.
It looks for the letters typed, if it found at least a result, it cycles through the completed nicknames
szBegin | The starting of the nick |
szSkipAfter | The string to skip after the nick is completed |
szBuffer | The buffer where to store the data |
bAppendMask | Whether to append the complete mask |
References KviQString::cmpCIN(), KviQString::equalCI(), KviIrcUserEntry::host(), KviUserListEntry::m_pGlobalData, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListEntry::m_szNick, and KviIrcUserEntry::user().
Referenced by KviInputEditor::standardNickCompletion().
|
inline |
Returns the number of the entries in the userlist.
Referenced by KviChannelWindow::count().
void KviUserListView::emitDoubleClick | ( | ) |
Emits the double click signal.
References KviKvsVariantList::append(), appendSelectedNicknames(), KviWindow::Channel, KviApplication::checkSuggestRestoreDefaultScript(), KviWindow::Console, g_pApp, KviKvsEventManager::hasAppHandlers(), KviKvsEventManager::instance(), KviEvent_OnChannelNickDefaultActionRequest, KviEvent_OnNickLinkDefaultActionRequest, KviEvent_OnNotifyListDefaultActionRequest, KviEvent_OnQueryNickDefaultActionRequest, m_pKviWindow, KviWindow::Query, KviKvsEventManager::trigger(), and KviWindow::type().
Referenced by KviUserListViewArea::mouseDoubleClickEvent().
void KviUserListView::emitRightClick | ( | ) |
Emits the right click signal.
References KviKvsVariantList::append(), appendSelectedNicknames(), KviWindow::Channel, KviApplication::checkSuggestRestoreDefaultScript(), KviWindow::Console, g_pApp, KviKvsEventManager::hasAppHandlers(), KviKvsEventManager::instance(), KviEvent_OnChannelNickPopupRequest, KviEvent_OnNickLinkPopupRequest, KviEvent_OnNotifyListPopupRequest, KviEvent_OnQueryNickPopupRequest, m_pKviWindow, KviWindow::Query, KviKvsEventManager::trigger(), and KviWindow::type().
Referenced by KviUserListViewArea::mousePressEvent().
void KviUserListView::enableUpdates | ( | bool | bEnable | ) |
Enables the updates on the view list area.
bEnable | Whether or not to enable updates |
References m_pViewArea, and triggerUpdate().
Referenced by KviChannelWindow::enableUserListUpdates(), KviChannelWindow::setDeadChan(), KviQueryWindow::setDeadQuery(), and KviChannelWindow::~KviChannelWindow().
void KviUserListView::ensureVisible | ( | const QString & | szNick | ) |
Ensures that a nickname is visible.
szNick | The nickname |
References KviPointerHashTable< Key, T >::find(), KviUserListEntry::m_iHeight, KviUserListViewArea::m_iLastScrollBarVal, m_pEntryDict, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListViewArea::m_pScrollBar, m_pTopItem, and m_pViewArea.
Referenced by KviUserListViewArea::keyPressEvent().
|
inline |
Returns the entry in the list.
|
inline |
Searches an entry in the userlist.
If the nick is not found, it returns 0
szNick | The nickname to find |
Referenced by KviChannelWindow::addHighlightedUser(), KviIsOnNotifyListManager::doMatchUser(), KviWatchNotifyListManager::doMatchUser(), KviChannelWindow::findEntry(), KviIsOnNotifyListManager::handleIsOn(), KviStupidNotifyListManager::handleIsOn(), KviWatchNotifyListManager::handleWatchReply(), KviChannelWindow::isOn(), and KviApplication::notifierMessage().
|
inline |
Returns the first item of the user list.
Referenced by chan_kvs_fnc_users().
QString * KviUserListView::firstSelectedNickname | ( | ) |
Returns the first selected nickname in the list.
Referenced by KviChannelWindow::firstSelectedNickname().
int KviUserListView::flags | ( | const QString & | szNick | ) |
Returns the flags of a user.
szNick | The nickname of the user |
References KviPointerHashTable< Key, T >::find(), KviUserListEntry::m_iFlags, and m_pEntryDict.
char KviUserListView::getUserFlag | ( | KviUserListEntry * | pEntry | ) |
Returns the flags of a user.
pEntry | The user in the userlist |
References KviWindow::connection(), KviUserListEntry::m_iFlags, m_pKviWindow, KviIrcConnectionServerInfo::modePrefixChar(), and KviIrcConnection::serverInfo().
Referenced by chan_kvs_fnc_getflag(), KviChannelWindow::getUserFlag(), KviUserListViewArea::paintEvent(), and prependUserFlag().
|
inline |
Returns the flags of a user.
szNick | The nickname of the user |
References getUserFlag().
Referenced by getUserFlag().
kvi_time_t KviUserListView::getUserJoinTime | ( | const QString & | szNick | ) |
Returns the join time of a user.
szNick | The nickname of the user |
References KviPointerHashTable< Key, T >::find(), kvi_time_t, KviUserListEntry::m_joinTime, and m_pEntryDict.
Referenced by chan_kvs_fnc_userjointime().
kvi_time_t KviUserListView::getUserLastActionTime | ( | const QString & | szNick | ) |
Returns the time of the last action of a user.
szNick | The nickname of the user |
References KviPointerHashTable< Key, T >::find(), kvi_time_t, KviUserListEntry::m_lastActionTime, and m_pEntryDict.
Referenced by chan_kvs_fnc_userlastactiontime().
int KviUserListView::getUserModeLevel | ( | const QString & | szNick | ) |
Returns the level of the user mode.
Levels:
szNick | The nickname of the user to get level |
References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviPointerHashTable< Key, T >::find(), KviIrcUserEntry::HalfOp, KviUserListEntry::m_iFlags, m_pEntryDict, KviIrcUserEntry::ModeMask, KviIrcUserEntry::Op, KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.
Referenced by chan_kvs_fnc_usermodelevel().
|
inline |
|
protected |
Inserts a user into the users list.
szNick | The nickname of the user |
pEntry | The entry in the users list |
References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviMainWindow::childWindowSelectionStateChange(), KviQString::cmpCI(), KviWindow::connection(), g_pMainWindow, KviUserListEntry::globalData(), KviIrcUserEntry::HalfOp, KviPointerHashTable< Key, T >::insert(), KviIrcUserEntry::isIrcOp(), KviIrcConnectionServerInfo::isSupportedModeFlag(), KVI_OPTION_BOOL, KviOption_boolPlaceNickWithNonAlphaCharsAtEnd, KviUserListViewArea::m_bIgnoreScrollBar, KviUserListEntry::m_bSelected, m_iChanAdminCount, m_iChanOwnerCount, KviUserListEntry::m_iFlags, m_iHalfOpCount, KviUserListEntry::m_iHeight, m_iIrcOpCount, KviUserListViewArea::m_iLastScrollBarVal, m_iOpCount, m_iSelectedCount, KviUserListViewArea::m_iTopItemOffset, m_iTotalHeight, m_iUserOpCount, m_iVoiceCount, m_pEntryDict, m_pHeadItem, m_pKviWindow, KviUserListEntry::m_pNext, KviUserListEntry::m_pPrev, KviUserListViewArea::m_pScrollBar, m_pTailItem, m_pTopItem, m_pViewArea, KviUserListEntry::m_szNick, KviIrcUserEntry::Op, KviIrcConnection::serverInfo(), triggerUpdate(), updateScrollBarRange(), updateUsersLabel(), KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.
Referenced by join().
|
inline |
Returns the number of ircops.
bool KviUserListView::isChanAdmin | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is a chan admin.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least a chan admin |
Referenced by KviChannelWindow::isChanAdmin().
bool KviUserListView::isChanOwner | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is a chan owner.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least a chan owner |
Referenced by KviChannelWindow::isChanOwner().
bool KviUserListView::isHalfOp | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is an half operator.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least an half operator |
Referenced by KviChannelWindow::isHalfOp().
bool KviUserListView::isOp | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is an operator.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least an operator |
Referenced by KviChannelWindow::isOp().
bool KviUserListView::isUserOp | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is a user operator.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least a user operator |
Referenced by KviChannelWindow::isUserOp().
bool KviUserListView::isVoice | ( | const QString & | szNick, |
bool | bAtLeast = false |
||
) |
Returns true if the user is a voice.
szNick | The nick to moderate |
bAtLeast | Whether the user is at least a voice |
Referenced by KviChannelWindow::isVoice().
KviUserListEntry * KviUserListView::itemAt | ( | const QPoint & | pnt, |
QRect * | pRect = 0 |
||
) |
Returns the item at the given position.
pnt | The point where to search |
pRect | The rectangle where to search |
References KVI_USERLIST_BORDER_WIDTH, KviUserListEntry::m_iHeight, KviUserListViewArea::m_iTopItemOffset, KviUserListEntry::m_pNext, m_pTopItem, and m_pViewArea.
Referenced by maybeTip(), KviUserListViewArea::mouseMoveEvent(), and KviUserListViewArea::mousePressEvent().
bool KviUserListView::itemVisible | ( | KviUserListEntry * | pEntry | ) |
Returns true if the item in the entry is visible.
pEntry | The entry in the user list |
References KVI_USERLIST_BORDER_WIDTH, KviUserListEntry::m_iHeight, KviUserListViewArea::m_iTopItemOffset, KviUserListEntry::m_pNext, m_pTopItem, and m_pViewArea.
Referenced by userAction(), and userActionVerifyMask().
KviUserListEntry * KviUserListView::join | ( | const QString & | szNick, |
const QString & | szUser = QString() , |
||
const QString & | szHost = QString() , |
||
int | iFlags = 0 |
||
) |
Called when a user joins the channel.
szNick | The nickname of the user |
szUser | The username of the user |
szHost | The hostname of the user |
iFlags | The flags of the user |
References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviPointerHashTable< Key, T >::find(), KviIrcUserEntry::HalfOp, KviIrcUserDataBase::insertUser(), insertUserEntry(), KviUserListEntry, KviUserListEntry::m_iFlags, m_pEntryDict, m_pIrcUserDataBase, KviIrcUserEntry::Op, setChanAdmin(), setChanOwner(), setHalfOp(), setOp(), setUserOp(), setVoice(), KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.
Referenced by KviChannelWindow::join(), KviIrcConnection::loginToIrcServer(), nickChange(), KviNotifyListManager::notifyOnLine(), and KviQueryWindow::setTarget().
|
protected |
Checks if user activated tooltips over the userlist.
pTip | The source tooltip to show |
pnt | The point where the mouse is |
References __tr2qs, KviWindow::console(), KviUserListToolTip::doTip(), KviConsoleWindow::getUserTipText(), KviIrcUserEntry::isIrcOp(), itemAt(), KVI_OPTION_BOOL, KVI_OPTION_UINT, kvi_unixTime, KviOption_boolShowUserListViewToolTips, KviOption_uintOutputDatetimeFormat, KviUserListEntry::m_joinTime, KviUserListEntry::m_lastActionTime, KviUserListEntry::m_pGlobalData, m_pKviWindow, KviUserListEntry::m_szNick, and szBuffer.
Referenced by KviUserListToolTip::maybeTip().
QString * KviUserListView::nextSelectedNickname | ( | ) |
Returns the next selected nickname in the list.
References KviUserListEntry::m_bSelected, m_pIterator, KviUserListEntry::m_pNext, and KviUserListEntry::m_szNick.
Referenced by KviChannelWindow::nextSelectedNickname().
bool KviUserListView::nickChange | ( | const QString & | szOldNick, |
const QString & | szNewNick | ||
) |
Changes a nickname.
szOldNick | The old nickname to change |
szNewNick | The new nickname |
References KviIrcUserEntry::accountName(), avatarChanged(), KviPointerHashTable< Key, T >::find(), KviIrcUserEntry::forgetAvatar(), KviIrcUserEntry::gender(), KviIrcUserEntry::hops(), KviIrcUserEntry::host(), KviIrcUserEntry::isBot(), KviIrcUserEntry::isIrcOp(), join(), KVI_ASSERT, kvi_time_t, kvi_unixTime, KVI_USERACTION_NICK, KviUserListEntry::m_bSelected, KviUserListEntry::m_iFlags, KviUserListEntry::m_joinTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviMemory::move(), part(), KviIrcUserEntry::realName(), KviIrcUserEntry::server(), szHost, and KviIrcUserEntry::user().
Referenced by KviIrcConnection::loginComplete(), KviQueryWindow::nickChange(), KviChannelWindow::nickChange(), KviIrcConnection::nickChange(), and KviIrcServerParser::parseLoginNicknameProblem().
|
inline |
|
inline |
Check if a user parts from a channel.
szNick | The nickname to check |
Referenced by nickChange(), KviNotifyListManager::notifyOffLine(), KviChannelWindow::part(), and partAllButOne().
void KviUserListView::partAll | ( | ) |
Parts from all channels.
References removeAllEntries(), and triggerUpdate().
Referenced by KviConsoleWindow::connectionDetached(), KviChannelWindow::setDeadChan(), KviQueryWindow::setDeadQuery(), KviChannelWindow::~KviChannelWindow(), and KviQueryWindow::~KviQueryWindow().
void KviUserListView::partAllButOne | ( | const QString & | szWhoNot | ) |
Parts from all channels but the given one.
szWhoNot | The channel to not part |
References KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), KviQString::equalCI(), m_pEntryDict, and part().
Referenced by KviIsOnNotifyListManager::start(), KviStupidNotifyListManager::start(), KviWatchNotifyListManager::start(), KviIsOnNotifyListManager::stop(), KviStupidNotifyListManager::stop(), and KviWatchNotifyListManager::stop().
|
protected |
Called when a user parts a channel.
szNick | The nickname of the user |
bRemove | Whether to remove the user from the irc user db |
References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviMainWindow::childWindowSelectionStateChange(), KviUserListEntry::detachAvatarData(), KviPointerHashTable< Key, T >::find(), g_pMainWindow, KviIrcUserEntry::HalfOp, KviIrcUserEntry::isIrcOp(), KviUserListViewArea::m_bIgnoreScrollBar, KviUserListEntry::m_bSelected, m_iChanAdminCount, m_iChanOwnerCount, KviUserListEntry::m_iFlags, m_iHalfOpCount, KviUserListEntry::m_iHeight, m_iIrcOpCount, KviUserListViewArea::m_iLastScrollBarVal, m_iOpCount, m_iSelectedCount, m_iTotalHeight, m_iUserOpCount, m_iVoiceCount, m_pEntryDict, KviUserListEntry::m_pGlobalData, m_pHeadItem, m_pIrcUserDataBase, m_pKviWindow, KviUserListEntry::m_pNext, KviUserListEntry::m_pPrev, KviUserListViewArea::m_pScrollBar, m_pTailItem, m_pTopItem, m_pViewArea, KviIrcUserEntry::Op, KviPointerHashTable< Key, T >::remove(), KviIrcUserDataBase::removeUser(), triggerUpdate(), updateScrollBarRange(), updateUsersLabel(), KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.
void KviUserListView::prependUserFlag | ( | const QString & | szNick, |
QString & | szBuffer | ||
) |
Prepends the user flags before the nickname.
szNick | The nickname of the user |
szBuffer | The buffer where to store the data |
References getUserFlag().
Referenced by KviChannelWindow::prependUserFlag().
|
protected |
Clears all channels entries.
All counters will be reset
References KviMainWindow::childWindowSelectionStateChange(), KviPointerHashTable< Key, T >::clear(), KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), g_pMainWindow, KviUserListViewArea::m_bIgnoreScrollBar, m_iChanAdminCount, m_iChanOwnerCount, m_iHalfOpCount, KviUserListViewArea::m_iLastScrollBarVal, m_iOpCount, m_iSelectedCount, KviUserListViewArea::m_iTopItemOffset, m_iTotalHeight, m_iUserOpCount, m_iVoiceCount, m_pEntryDict, m_pHeadItem, m_pIrcUserDataBase, m_pKviWindow, KviUserListViewArea::m_pScrollBar, m_pTopItem, m_pViewArea, KviIrcUserDataBase::removeUser(), and updateScrollBarRange().
Referenced by partAll(), and ~KviUserListView().
|
protectedvirtual |
References KVI_OPTION_BOOL, KviOption_boolShowUserListStatisticLabel, m_pUsersLabel, m_pViewArea, and updateScrollBarRange().
Referenced by applyOptions().
void KviUserListView::select | ( | const QString & | szNick | ) |
Selects a nickname in the list.
szNick | The nickname selected |
References KviMainWindow::childWindowSelectionStateChange(), KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTable< Key, T >::find(), g_pMainWindow, KviUserListEntry::m_bSelected, m_iSelectedCount, m_pEntryDict, m_pKviWindow, and m_pViewArea.
Referenced by KviUserListViewArea::keyPressEvent().
|
inline |
Returns the number of selected entries in the userlist.
Referenced by KviUserListViewArea::keyPressEvent(), KviConsoleWindow::selectedCount(), and KviChannelWindow::selectedCount().
bool KviUserListView::setChanAdmin | ( | const QString & | szNick, |
bool | bChanAdmin | ||
) |
Sets the chan admin mode.
szNick | The nick to moderate |
bChanAdmin | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setChanAdmin().
bool KviUserListView::setChanOwner | ( | const QString & | szNick, |
bool | bChanOwner | ||
) |
Sets the chan owner mode.
szNick | The nick to moderate |
bChanOwner | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setChanOwner().
bool KviUserListView::setHalfOp | ( | const QString & | szNick, |
bool | bHalfOp | ||
) |
Sets the half operator mode.
szNick | The nick to moderate |
bHalfOp | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setHalfOp().
void KviUserListView::setMaskEntries | ( | char | cType, |
int | iNum | ||
) |
Sets the mask entries number for a channel.
The mask types can be:
exception on a mask which the user matches
cType | The type of the mask |
iNum | The number of the masks |
References m_ibEntries, m_ieEntries, m_iIEntries, and updateUsersLabel().
Referenced by KviChannelWindow::setModeInList().
bool KviUserListView::setOp | ( | const QString & | szNick, |
bool | bOp | ||
) |
Sets the operator mode.
szNick | The nick to moderate |
bOp | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setOp().
|
inlineprotected |
Sets the user database.
pDb | The source user database |
Referenced by KviConsoleWindow::connectionAttached(), KviConsoleWindow::connectionDetached(), KviChannelWindow::setAliveChan(), KviQueryWindow::setAliveQuery(), KviChannelWindow::setDeadChan(), and KviQueryWindow::setDeadQuery().
bool KviUserListView::setUserOp | ( | const QString & | szNick, |
bool | bUserOp | ||
) |
Sets the user operator mode.
szNick | The nick to moderate |
bUserOp | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setUserOp().
bool KviUserListView::setVoice | ( | const QString & | szNick, |
bool | bVoice | ||
) |
Sets the voice mode.
szNick | The nick to moderate |
bVoice | Whether to moderate the user |
Referenced by join(), and KviChannelWindow::setVoice().
|
protected |
Updates the view list.
This function will updates the scrollbar range, the users label, and the view area
References m_pViewArea, updateScrollBarRange(), and updateUsersLabel().
Referenced by enableUpdates(), insertUserEntry(), partAll(), partInternal(), updateArea(), userAction(), and userActionVerifyMask().
void KviUserListView::updateArea | ( | ) |
Updates the list view area.
References m_pViewArea, and triggerUpdate().
Referenced by KviIrcServerParser::parseNumericEndOfWho().
|
protected |
Updates the scrollbar range.
References KVI_USERLIST_BORDER_WIDTH, m_iTotalHeight, KviUserListViewArea::m_pScrollBar, and m_pViewArea.
Referenced by applyOptions(), avatarChanged(), insertUserEntry(), partInternal(), removeAllEntries(), resizeEvent(), and triggerUpdate().
|
protected |
Updates the users label.
References KviCString::append(), KviPointerHashTable< Key, T >::count(), KviCString::Format, KVI_OPTION_BOOL, KviOption_boolShowUserListStatisticLabel, m_ibEntries, m_iChanAdminCount, m_iChanOwnerCount, m_ieEntries, m_iHalfOpCount, m_iIEntries, m_iOpCount, m_iUserOpCount, m_iVoiceCount, m_pEntryDict, m_pUsersLabel, KviCString::ptr(), and KviCString::sprintf().
Referenced by insertUserEntry(), partInternal(), setMaskEntries(), and triggerUpdate().
void KviUserListView::userAction | ( | KviIrcMask * | pUser, |
int | iActionTemperature | ||
) |
Verifies a user action.
This is called when a user "acts" in some visible way on the channel In this way we can keep track of his channeel idle time. This will also update the username and hostname if needed.
pUser | The user by the irc mask |
iActionTemperature | The temperature of the action performed |
References KviPointerHashTable< Key, T >::find(), KviIrcMask::hasHost(), KviIrcMask::hasUser(), KviIrcMask::host(), itemVisible(), kvi_unixTime, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcMask::nick(), KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), triggerUpdate(), and KviIrcMask::user().
Referenced by KviQueryWindow::ownAction(), KviQueryWindow::userAction(), and KviChannelWindow::userAction().
void KviUserListView::userAction | ( | const QString & | szNick, |
const QString & | szUser, | ||
const QString & | szHost, | ||
int | iActionTemperature | ||
) |
Verifies a user action.
This is called when a user "acts" in some visible way on the channel In this way we can keep track of his channeel idle time. This will also update the username and hostname if needed.
szNick | The nickname of the user |
szUser | The username of the user |
szHost | The hostname of the user |
iActionTemperature | The temperature of the action performed |
References KviQString::equalCS(), KviPointerHashTable< Key, T >::find(), itemVisible(), kvi_unixTime, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), and triggerUpdate().
void KviUserListView::userAction | ( | const QString & | szNick, |
int | iActionTemperature | ||
) |
Verifies a user action.
This is called when a user "acts" in some visible way on the channel In this way we can keep track of his channeel idle time. This will also update the username and hostname if needed.
szNick | The nickname of the user |
iActionTemperature | The temperature of the action performed |
References KviPointerHashTable< Key, T >::find(), itemVisible(), kvi_unixTime, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, and triggerUpdate().
bool KviUserListView::userActionVerifyMask | ( | const QString & | szNick, |
const QString & | szUser, | ||
const QString & | szHost, | ||
int | iActionTemperature, | ||
QString & | szOldUser, | ||
QString & | szOldHost | ||
) |
Verifies the mask for a user action.
This is called when a user "acts" in some visible way on the channel, so we can keep track of his channel idle time. This particular function version of userAction will return false if there was a user or hostname change (unless they were not known at all) This will also update the username and hostname if needed.
szNick | The nickname of the user |
szUser | The username of the user |
szHost | The hostname of the user |
iActionTemperature | The temperature of the action performed |
szOldUser | The old username of the user |
szOldHost | The old hostname of the user |
References KviQString::equalCI(), KviQString::equalCS(), KviPointerHashTable< Key, T >::find(), KviIrcUserEntry::host(), itemVisible(), kvi_unixTime, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), szHost, triggerUpdate(), and KviIrcUserEntry::user().
Referenced by KviQueryWindow::userAction().
|
inline |
void KviUserListView::userStats | ( | KviUserListViewUserStats * | pStats | ) |
Gets the user statistics and store them in the user stats pointer.
pStats | The pointer of the user statistics |
References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviPointerHashTable< Key, T >::count(), KviIrcUserEntry::HalfOp, _KviUserListViewUserStats::iAvgTemperature, KviIrcUserEntry::isIrcOp(), kvi_time_t, kvi_unixTime, KviUserListEntry::m_iFlags, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, m_pHeadItem, KviUserListEntry::m_pNext, KviIrcUserEntry::Op, _KviUserListViewUserStats::uActive, _KviUserListViewUserStats::uActiveOp, _KviUserListViewUserStats::uChanAdmin, _KviUserListViewUserStats::uChanOwner, _KviUserListViewUserStats::uHalfOp, _KviUserListViewUserStats::uHot, _KviUserListViewUserStats::uHotOp, _KviUserListViewUserStats::uIrcOp, _KviUserListViewUserStats::uOp, KviIrcUserEntry::UserOp, _KviUserListViewUserStats::uTotal, _KviUserListViewUserStats::uUserOp, _KviUserListViewUserStats::uVoiced, and KviIrcUserEntry::Voice.
Referenced by KviChannelWindow::getWindowListTipText().
|
inline |
|
inline |
Returns the window associated to the userlist.
Referenced by KviUserListViewArea::paintEvent().
|
friend |
|
friend |
|
friend |
|
friend |
Referenced by join().
|
friend |
Referenced by KviUserListView().
|
friend |
Referenced by KviUserListView().
|
protected |
Referenced by KviUserListView(), setMaskEntries(), and updateUsersLabel().
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
Referenced by KviUserListView(), setMaskEntries(), and updateUsersLabel().
|
protected |
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
Referenced by KviUserListView(), setMaskEntries(), and updateUsersLabel().
|
protected |
Referenced by insertUserEntry(), and partInternal().
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
|
protected |
Referenced by applyOptions(), avatarChanged(), insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateScrollBarRange().
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
Referenced by insertUserEntry(), KviUserListView(), partInternal(), removeAllEntries(), and updateUsersLabel().
|
protected |
Referenced by avatarChanged(), ensureVisible(), flags(), getUserJoinTime(), getUserLastActionTime(), getUserModeLevel(), insertUserEntry(), join(), KviUserListView(), KviUserListViewArea::mousePressEvent(), nickChange(), partAllButOne(), partInternal(), removeAllEntries(), select(), updateUsersLabel(), userAction(), userActionVerifyMask(), userStats(), and ~KviUserListView().
|
protected |
Referenced by appendSelectedNicknames(), applyOptions(), avatarChanged(), completeNickBashLike(), completeNickStandard(), ensureVisible(), insertUserEntry(), KviUserListViewArea::keyPressEvent(), KviUserListView(), KviUserListViewArea::mouseMoveEvent(), KviUserListViewArea::mousePressEvent(), partInternal(), removeAllEntries(), and userStats().
|
protected |
Referenced by join(), KviUserListView(), partInternal(), and removeAllEntries().
|
protected |
Referenced by nextSelectedNickname().
|
protected |
Referenced by KviUserListEntry::color(), emitDoubleClick(), emitRightClick(), getUserFlag(), insertUserEntry(), KviUserListViewArea::keyPressEvent(), KviUserListView(), maybeTip(), KviUserListViewArea::mouseMoveEvent(), KviUserListViewArea::mousePressEvent(), KviUserListViewArea::paintEvent(), partInternal(), removeAllEntries(), and select().
|
protected |
|
protected |
Referenced by KviUserListView(), and ~KviUserListView().
|
protected |
Referenced by animatedAvatarUpdated(), applyOptions(), avatarChanged(), ensureVisible(), insertUserEntry(), itemAt(), itemVisible(), KviUserListView(), KviUserListViewArea::mouseMoveEvent(), KviUserListViewArea::paintEvent(), partInternal(), removeAllEntries(), and KviUserListViewArea::scrollBarMoved().
|
protected |
Referenced by applyOptions(), KviUserListView(), resizeEvent(), updateUsersLabel(), and ~KviUserListView().
|
protected |
Referenced by animatedAvatarUpdated(), applyOptions(), avatarChanged(), enableUpdates(), ensureVisible(), insertUserEntry(), itemAt(), itemVisible(), KviUserListView(), partInternal(), removeAllEntries(), resizeEvent(), select(), triggerUpdate(), updateArea(), updateScrollBarRange(), and ~KviUserListView().