KVIrc 5.2.6
Developer APIs
KviUserListView Class Reference

User list view management class. More...

#include <KviUserListView.h>

+ Inheritance diagram for KviUserListView:

Public Slots

void animatedAvatarUpdated (KviUserListEntry *e)
 Called when an animated avatar is updated (every frame)
 

Public Member Functions

void appendSelectedNicknames (QString &szBuffer)
 Appends the selected nicknames to the buffer.
 
void applyOptions ()
 Applies the options.
 
bool avatarChanged (const QString &szNick)
 Returns true if the avatar of a user is changed.
 
int chanAdminCount ()
 Returns the number of chan admins.
 
int chanOwnerCount ()
 Returns the number of chan owners.
 
void completeNickBashLike (const QString &szBegin, std::vector< QString > &pList, bool bAppendMask)
 Completes the nick in Bash-like behaviour.
 
bool completeNickLastAction (const QString &szBegin, const QString &szSkipAfter, QString &szBuffer, bool bAppendMask)
 Completes the nick prioritizing last active first.
 
bool completeNickStandard (const QString &szBegin, const QString &szSkipAfter, QString &szBuffer, bool bAppendMask)
 Completes the nick in normal behaviour.
 
unsigned int count ()
 Returns the number of the entries in the userlist.
 
void emitDoubleClick ()
 Emits the double click signal.
 
void emitRightClick ()
 Emits the right click signal.
 
void enableUpdates (bool bEnable)
 Enables the updates on the view list area.
 
void ensureVisible (const QString &szNick)
 Ensures that a nickname is visible.
 
KviPointerHashTable< QString, KviUserListEntry > * entryDict ()
 Returns the entry in the list.
 
KviUserListEntryfindEntry (const QString &szNick)
 Searches an entry in the userlist.
 
KviUserListEntryfirstItem ()
 Returns the first item of the user list.
 
QString * firstSelectedNickname ()
 Returns the first selected nickname in the list.
 
int flags (const QString &szNick)
 Returns the flags of a user.
 
char getUserFlag (const QString &szNick)
 Returns the flags of a user.
 
char getUserFlag (KviUserListEntry *pEntry)
 Returns the flags of a user.
 
kvi_time_t getUserJoinTime (const QString &szNick)
 Returns the join time of a user.
 
kvi_time_t getUserLastActionTime (const QString &szNick)
 Returns the time of the last action of a user.
 
int getUserModeLevel (const QString &szNick)
 Returns the level of the user mode.
 
int halfOpCount ()
 Returns the number of half operators.
 
int ircOpCount ()
 Returns the number of ircops.
 
bool isChanAdmin (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a chan admin.
 
bool isChanOwner (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a chan owner.
 
bool isHalfOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is an half operator.
 
bool isOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is an operator.
 
bool isUserOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a user operator.
 
bool isVoice (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a voice.
 
KviUserListEntryitemAt (const QPoint &pnt, QRect *pRect=nullptr)
 Returns the item at the given position.
 
bool itemVisible (KviUserListEntry *pEntry)
 Returns true if the item in the entry is visible.
 
KviUserListEntryjoin (const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
 Called when a user joins the channel.
 
 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.
 
QString * nextSelectedNickname ()
 Returns the next selected nickname in the list.
 
bool nickChange (const QString &szOldNick, const QString &szNewNick)
 Changes a nickname.
 
int opCount ()
 Returns the number of operators.
 
bool part (const QString &szNick)
 Check if a user parts from a channel.
 
void partAll ()
 Parts from all channels.
 
void partAllButOne (const QString &szWhoNot)
 Parts from all channels but the given one.
 
void prependUserFlag (const QString &szNick, QString &szBuffer)
 Prepends the user flags before the nickname.
 
void select (const QString &szNick)
 Selects a nickname in the list.
 
int selectedCount ()
 Returns the number of selected entries in the userlist.
 
bool setChanAdmin (const QString &szNick, bool bChanAdmin)
 Sets the chan admin mode.
 
bool setChanOwner (const QString &szNick, bool bChanOwner)
 Sets the chan owner mode.
 
bool setHalfOp (const QString &szNick, bool bHalfOp)
 Sets the half operator mode.
 
void setMaskEntries (char cType, int iNum)
 Sets the mask entries number for a channel.
 
bool setOp (const QString &szNick, bool bOp)
 Sets the operator mode.
 
bool setUserOp (const QString &szNick, bool bUserOp)
 Sets the user operator mode.
 
bool setVoice (const QString &szNick, bool bVoice)
 Sets the voice mode.
 
void updateArea ()
 Updates the list view area.
 
void userAction (const QString &szNick, const QString &szUser, const QString &szHost, int iActionTemperature)
 Verifies a user action.
 
void userAction (const QString &szNick, int iActionTemperature)
 Verifies a user action.
 
void userAction (KviIrcMask *pUser, int iActionTemperature)
 Verifies a user action.
 
bool userActionVerifyMask (const QString &szNick, const QString &szUser, const QString &szHost, int iActionTemperature, QString &szOldUser, QString &szOldHost)
 Verifies the mask for a user action.
 
int userOpCount ()
 Returns the number of user operators.
 
void userStats (KviUserListViewUserStats *pStats)
 Gets the user statistics and store them in the user stats pointer.
 
int voiceCount ()
 Returns the number of voices.
 
KviWindowwindow ()
 Returns the window associated to the userlist.
 
 ~KviUserListView ()
 Destroys the user list view object.
 
- 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.
 
void maybeTip (KviUserListToolTip *pTip, const QPoint &pnt)
 Checks if user activated tooltips over the userlist.
 
bool partInternal (const QString &szNick, bool bRemove=true)
 Called when a user parts a channel.
 
void removeAllEntries ()
 Clears all channels entries.
 
void resizeEvent (QResizeEvent *e) override
 
void setUserDataBase (KviIrcUserDataBase *pDb)
 Sets the user database.
 
void triggerUpdate ()
 Updates the view list.
 
void updateScrollBarRange ()
 Updates the scrollbar range.
 
void updateUsersLabel ()
 Updates the users label.
 

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
 
KviUserListEntrym_pHeadItem
 
KviIrcUserDataBasem_pIrcUserDataBase
 
KviUserListEntrym_pIterator
 
KviWindowm_pKviWindow
 
KviUserListEntrym_pTailItem
 
KviUserListToolTipm_pToolTip
 
KviUserListEntrym_pTopItem
 
QLabel * m_pUsersLabel
 
KviUserListViewAream_pViewArea
 
- Protected Attributes inherited from KviWindowToolWidget
KviWindowToolPageButtonm_pButton
 

Friends

class KviChannelWindow
 
class KviConsoleWindow
 
class KviQueryWindow
 
class KviUserListEntry
 
class KviUserListToolTip
 
class KviUserListViewArea
 

Detailed Description

User list view management class.

Constructor & Destructor Documentation

◆ KviUserListView()

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.

Parameters
pParentThe parent widget
pButtonThe tool page button
pDbThe irc users database
pWndThe window associated to the userlist
iDictSizeThe size of the internal database
szTextLabelThe label for the tooltip
pNameThe name of the users list
Returns
KviUserListView

References KviTalToolTip::add(), applyOptions(), KviUserListToolTip, KviUserListViewArea, KviWindowToolWidget::KviWindowToolWidget(), 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, and m_pViewArea.

Referenced by firstSelectedNickname(), and KviQueryWindow.

◆ ~KviUserListView()

KviUserListView::~KviUserListView ( )

Destroys the user list view object.

References m_pEntryDict, m_pToolTip, m_pUsersLabel, m_pViewArea, and removeAllEntries().

Member Function Documentation

◆ animatedAvatarUpdated

◆ appendSelectedNicknames()

void KviUserListView::appendSelectedNicknames ( QString & szBuffer)

Appends the selected nicknames to the buffer.

Parameters
szBufferThe buffer to use
Returns
void

References KviUserListEntry, KviUserListEntry::m_bSelected, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListEntry::m_szNick, and szBuffer.

Referenced by emitDoubleClick(), and emitRightClick().

◆ applyOptions()

◆ avatarChanged()

bool KviUserListView::avatarChanged ( const QString & szNick)

Returns true if the avatar of a user is changed.

Parameters
szNickThe nickname of the user
Returns
bool

References KviUserListEntry, KviUserListEntry::m_iHeight, m_iTotalHeight, m_pEntryDict, m_pHeadItem, KviUserListEntry::m_pNext, m_pTopItem, m_pViewArea, KviUserListEntry::recalcSize(), KviUserListEntry::updateAvatarData(), and updateScrollBarRange().

Referenced by nickChange(), and setUserOp().

◆ chanAdminCount()

int KviUserListView::chanAdminCount ( )
inline

Returns the number of chan admins.

Returns
int

References m_iChanAdminCount.

◆ chanOwnerCount()

int KviUserListView::chanOwnerCount ( )
inline

Returns the number of chan owners.

Returns
int

References m_iChanOwnerCount.

◆ completeNickBashLike()

void KviUserListView::completeNickBashLike ( const QString & szBegin,
std::vector< 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

Parameters
szBeginThe starting of the nick
pListThe list of nicknames
bAppendMaskWhether to append the complete mask
Returns
void

References KviQString::equalCIN(), KviIrcUserEntry::host(), KVI_OPTION_BOOL, KviOption_boolIgnoreSpecialCharactersInNickCompletion, KviUserListEntry, KviUserListEntry::m_pGlobalData, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListEntry::m_szNick, and KviIrcUserEntry::user().

Referenced by setUserOp().

◆ completeNickLastAction()

bool KviUserListView::completeNickLastAction ( const QString & szBegin,
const QString & szSkipAfter,
QString & szBuffer,
bool bAppendMask )

◆ completeNickStandard()

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

Parameters
szBeginThe starting of the nick
szSkipAfterThe string to skip after the nick is completed
szBufferThe buffer where to store the data
bAppendMaskWhether to append the complete mask
Returns
bool

References completeNickLastAction(), KviQString::equalCI(), KviQString::equalCIN(), KviIrcUserEntry::host(), KVI_OPTION_BOOL, KviOption_boolIgnoreSpecialCharactersInNickCompletion, KviOption_boolPrioritizeLastActionTime, KviUserListEntry, KviUserListEntry::m_pGlobalData, m_pHeadItem, KviUserListEntry::m_pNext, KviUserListEntry::m_szNick, szBuffer, and KviIrcUserEntry::user().

Referenced by setUserOp().

◆ count()

unsigned int KviUserListView::count ( )
inline

Returns the number of the entries in the userlist.

Returns
unsigned int

References m_pEntryDict.

◆ emitDoubleClick()

◆ emitRightClick()

◆ enableUpdates()

void KviUserListView::enableUpdates ( bool bEnable)

Enables the updates on the view list area.

Parameters
bEnableWhether or not to enable updates
Returns
void

References m_pViewArea, and triggerUpdate().

Referenced by setUserOp().

◆ ensureVisible()

void KviUserListView::ensureVisible ( const QString & szNick)

Ensures that a nickname is visible.

Parameters
szNickThe nickname
Returns
void

References KviUserListEntry, KviUserListEntry::m_iHeight, m_pEntryDict, m_pHeadItem, KviUserListEntry::m_pNext, m_pTopItem, and m_pViewArea.

◆ entryDict()

KviPointerHashTable< QString, KviUserListEntry > * KviUserListView::entryDict ( )
inline

Returns the entry in the list.

Returns
KviPointerHashTable<QString,KviUserListEntry> *

References m_pEntryDict.

◆ findEntry()

KviUserListEntry * KviUserListView::findEntry ( const QString & szNick)
inline

Searches an entry in the userlist.

If the nick is not found, it returns 0

Parameters
szNickThe nickname to find
Returns
KviUserListEntry *

References KviUserListEntry, and m_pEntryDict.

Referenced by completeNickLastAction(), and KviApplication::notifierMessage().

◆ firstItem()

KviUserListEntry * KviUserListView::firstItem ( )
inline

Returns the first item of the user list.

Returns
KviUserListEntry *

References KviUserListEntry, and m_pHeadItem.

Referenced by chan_kvs_fnc_users().

◆ firstSelectedNickname()

QString * KviUserListView::firstSelectedNickname ( )

Returns the first selected nickname in the list.

Returns
QString *

References firstSelectedNickname(), KviUserListView(), m_pHeadItem, and m_pIterator.

Referenced by firstSelectedNickname().

◆ flags()

int KviUserListView::flags ( const QString & szNick)

Returns the flags of a user.

Parameters
szNickThe nickname of the user
Returns
int

References KviUserListEntry, KviUserListEntry::m_iFlags, and m_pEntryDict.

◆ getUserFlag() [1/2]

char KviUserListView::getUserFlag ( const QString & szNick)
inline

Returns the flags of a user.

Parameters
szNickThe nickname of the user
Returns
char

References getUserFlag(), and m_pEntryDict.

Referenced by getUserFlag().

◆ getUserFlag() [2/2]

char KviUserListView::getUserFlag ( KviUserListEntry * pEntry)

Returns the flags of a user.

Parameters
pEntryThe user in the userlist
Returns
char

References KviUserListEntry, KviUserListEntry::m_iFlags, and m_pKviWindow.

Referenced by chan_kvs_fnc_getflag(), and prependUserFlag().

◆ getUserJoinTime()

kvi_time_t KviUserListView::getUserJoinTime ( const QString & szNick)

Returns the join time of a user.

Parameters
szNickThe nickname of the user
Returns
kvi_time_t

References kvi_time_t, KviUserListEntry, KviUserListEntry::m_joinTime, and m_pEntryDict.

Referenced by chan_kvs_fnc_userjointime().

◆ getUserLastActionTime()

kvi_time_t KviUserListView::getUserLastActionTime ( const QString & szNick)

Returns the time of the last action of a user.

Parameters
szNickThe nickname of the user
Returns
kvi_time_t

References kvi_time_t, KviUserListEntry, KviUserListEntry::m_lastActionTime, and m_pEntryDict.

Referenced by chan_kvs_fnc_userlastactiontime().

◆ getUserModeLevel()

int KviUserListView::getUserModeLevel ( const QString & szNick)

Returns the level of the user mode.

Levels:

  • chanowner: 60
  • chanadmin: 50
  • op: 40
  • halfop: 30
  • voice: 20
  • userop: 10
    Parameters
    szNickThe nickname of the user to get level
    Returns
    int

References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviIrcUserEntry::HalfOp, KviUserListEntry, KviUserListEntry::m_iFlags, m_pEntryDict, KviIrcUserEntry::ModeMask, KviIrcUserEntry::Op, KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.

Referenced by chan_kvs_fnc_usermodelevel().

◆ halfOpCount()

int KviUserListView::halfOpCount ( )
inline

Returns the number of half operators.

Returns
int

References m_iHalfOpCount.

◆ insertUserEntry()

◆ ircOpCount()

int KviUserListView::ircOpCount ( )
inline

Returns the number of ircops.

Returns
int

References m_iIrcOpCount.

◆ isChanAdmin()

bool KviUserListView::isChanAdmin ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is a chan admin.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least a chan admin
Returns
bool

◆ isChanOwner()

bool KviUserListView::isChanOwner ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is a chan owner.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least a chan owner
Returns
bool

◆ isHalfOp()

bool KviUserListView::isHalfOp ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is an half operator.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least an half operator
Returns
bool

◆ isOp()

bool KviUserListView::isOp ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is an operator.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least an operator
Returns
bool

◆ isUserOp()

bool KviUserListView::isUserOp ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is a user operator.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least a user operator
Returns
bool

◆ isVoice()

bool KviUserListView::isVoice ( const QString & szNick,
bool bAtLeast = false )

Returns true if the user is a voice.

Parameters
szNickThe nick to moderate
bAtLeastWhether the user is at least a voice
Returns
bool

◆ itemAt()

KviUserListEntry * KviUserListView::itemAt ( const QPoint & pnt,
QRect * pRect = nullptr )

Returns the item at the given position.

Parameters
pntThe point where to search
pRectThe rectangle where to search
Returns
KviUserListEntry *

References KVI_USERLIST_BORDER_WIDTH, KviUserListEntry, KviUserListEntry::m_iHeight, KviUserListEntry::m_pNext, m_pTopItem, and m_pViewArea.

Referenced by maybeTip().

◆ itemVisible()

bool KviUserListView::itemVisible ( KviUserListEntry * pEntry)

Returns true if the item in the entry is visible.

Parameters
pEntryThe entry in the user list
Returns
bool

References e, KVI_USERLIST_BORDER_WIDTH, KviUserListEntry, KviUserListEntry::m_iHeight, KviUserListEntry::m_pNext, m_pTopItem, and m_pViewArea.

Referenced by userAction(), userAction(), userAction(), and userActionVerifyMask().

◆ join()

KviUserListEntry * KviUserListView::join ( const QString & szNick,
const QString & szUser = QString(),
const QString & szHost = QString(),
int iFlags = 0 )

Called when a user joins the channel.

Parameters
szNickThe nickname of the user
szUserThe username of the user
szHostThe hostname of the user
iFlagsThe flags of the user
Returns
KviUserListEntry *

References KviIrcUserEntry::ChanAdmin, KviIrcUserEntry::ChanOwner, KviIrcUserEntry::HalfOp, insertUserEntry(), KviUserListEntry, KviUserListEntry::m_iFlags, m_pEntryDict, m_pIrcUserDataBase, KviIrcUserEntry::Op, setChanAdmin(), setChanOwner(), setHalfOp(), setOp(), setUserOp(), setVoice(), szHost, KviIrcUserEntry::UserOp, and KviIrcUserEntry::Voice.

Referenced by nickChange(), and setUserOp().

◆ maybeTip()

void KviUserListView::maybeTip ( KviUserListToolTip * pTip,
const QPoint & pnt )
protected

◆ nextSelectedNickname()

QString * KviUserListView::nextSelectedNickname ( )

Returns the next selected nickname in the list.

Returns
QString *

References m_pIterator.

◆ nickChange()

◆ opCount()

int KviUserListView::opCount ( )
inline

Returns the number of operators.

Returns
int

References m_iOpCount.

◆ part()

bool KviUserListView::part ( const QString & szNick)
inline

Check if a user parts from a channel.

Parameters
szNickThe nickname to check
Returns
bool

References partInternal().

Referenced by nickChange(), and partAllButOne().

◆ partAll()

void KviUserListView::partAll ( )

Parts from all channels.

Returns
void

References removeAllEntries(), and triggerUpdate().

◆ partAllButOne()

void KviUserListView::partAllButOne ( const QString & szWhoNot)

Parts from all channels but the given one.

Parameters
szWhoNotThe channel to not part
Returns
void

References KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), KviQString::equalCI(), m_pEntryDict, and part().

◆ partInternal()

◆ prependUserFlag()

void KviUserListView::prependUserFlag ( const QString & szNick,
QString & szBuffer )

Prepends the user flags before the nickname.

Parameters
szNickThe nickname of the user
szBufferThe buffer where to store the data
Returns
void

References getUserFlag(), and szBuffer.

◆ removeAllEntries()

◆ resizeEvent()

void KviUserListView::resizeEvent ( QResizeEvent * e)
overrideprotected

◆ select()

void KviUserListView::select ( const QString & szNick)

Selects a nickname in the list.

Parameters
szNickThe nickname selected
Returns
void

References KviPointerHashTableIterator< Key, T >::current(), g_pMainWindow, KviUserListEntry, KviUserListEntry::m_bSelected, m_iSelectedCount, m_pEntryDict, m_pKviWindow, and m_pViewArea.

◆ selectedCount()

int KviUserListView::selectedCount ( )
inline

Returns the number of selected entries in the userlist.

Returns
int

References m_iSelectedCount.

◆ setChanAdmin()

bool KviUserListView::setChanAdmin ( const QString & szNick,
bool bChanAdmin )

Sets the chan admin mode.

Parameters
szNickThe nick to moderate
bChanAdminWhether to moderate the user
Returns
bool

Referenced by join().

◆ setChanOwner()

bool KviUserListView::setChanOwner ( const QString & szNick,
bool bChanOwner )

Sets the chan owner mode.

Parameters
szNickThe nick to moderate
bChanOwnerWhether to moderate the user
Returns
bool

Referenced by join().

◆ setHalfOp()

bool KviUserListView::setHalfOp ( const QString & szNick,
bool bHalfOp )

Sets the half operator mode.

Parameters
szNickThe nick to moderate
bHalfOpWhether to moderate the user
Returns
bool

Referenced by join().

◆ setMaskEntries()

void KviUserListView::setMaskEntries ( char cType,
int iNum )

Sets the mask entries number for a channel.

The mask types can be:

  • +b: ban
  • +e: exception; a user can join a +b channel (ban) if there's a +e exception on a mask which the user matches
  • +I: invite; a user can join a +i channel (invite) if there's a +I

exception on a mask which the user matches

Parameters
cTypeThe type of the mask
iNumThe number of the masks
Returns
void

References m_ibEntries, m_ieEntries, m_iIEntries, and updateUsersLabel().

Referenced by setUserOp().

◆ setOp()

bool KviUserListView::setOp ( const QString & szNick,
bool bOp )

Sets the operator mode.

Parameters
szNickThe nick to moderate
bOpWhether to moderate the user
Returns
bool

Referenced by join().

◆ setUserDataBase()

void KviUserListView::setUserDataBase ( KviIrcUserDataBase * pDb)
inlineprotected

Sets the user database.

Parameters
pDbThe source user database
Returns
void

References m_pIrcUserDataBase.

◆ setUserOp()

bool KviUserListView::setUserOp ( const QString & szNick,
bool bUserOp )

◆ setVoice()

bool KviUserListView::setVoice ( const QString & szNick,
bool bVoice )

Sets the voice mode.

Parameters
szNickThe nick to moderate
bVoiceWhether to moderate the user
Returns
bool

Referenced by join().

◆ triggerUpdate()

void KviUserListView::triggerUpdate ( )
protected

Updates the view list.

This function will updates the scrollbar range, the users label, and the view area

Returns
void

References m_pViewArea, updateScrollBarRange(), and updateUsersLabel().

Referenced by enableUpdates(), insertUserEntry(), partAll(), partInternal(), setUserOp(), updateArea(), userAction(), userAction(), userAction(), and userActionVerifyMask().

◆ updateArea()

void KviUserListView::updateArea ( )

Updates the list view area.

Returns
void

References m_pViewArea, and triggerUpdate().

Referenced by KviIrcServerParser::parseNumericEndOfWho().

◆ updateScrollBarRange()

void KviUserListView::updateScrollBarRange ( )
protected

◆ updateUsersLabel()

◆ userAction() [1/3]

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.

Parameters
szNickThe nickname of the user
szUserThe username of the user
szHostThe hostname of the user
iActionTemperatureThe temperature of the action performed
Returns
void

References KviQString::equalCS(), itemVisible(), kvi_unixTime, KviUserListEntry, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), szHost, and triggerUpdate().

◆ userAction() [2/3]

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.

Parameters
szNickThe nickname of the user
iActionTemperatureThe temperature of the action performed
Returns
void

References itemVisible(), kvi_unixTime, KviUserListEntry, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, and triggerUpdate().

◆ userAction() [3/3]

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.

Parameters
pUserThe user by the irc mask
iActionTemperatureThe temperature of the action performed
Returns
void

References KviIrcMask::hasHost(), KviIrcMask::hasUser(), KviIrcMask::host(), itemVisible(), kvi_unixTime, KviUserListEntry, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcMask::nick(), KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), triggerUpdate(), and KviIrcMask::user().

Referenced by setUserOp().

◆ userActionVerifyMask()

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.

Parameters
szNickThe nickname of the user
szUserThe username of the user
szHostThe hostname of the user
iActionTemperatureThe temperature of the action performed
szOldUserThe old username of the user
szOldHostThe old hostname of the user
Returns
bool

References KviQString::equalCI(), KviQString::equalCS(), KviIrcUserEntry::host(), itemVisible(), kvi_unixTime, KviUserListEntry, KviUserListEntry::m_iTemperature, KviUserListEntry::m_lastActionTime, m_pEntryDict, KviUserListEntry::m_pGlobalData, KviIrcUserEntry::setHost(), KviIrcUserEntry::setUser(), szHost, triggerUpdate(), and KviIrcUserEntry::user().

Referenced by setUserOp().

◆ userOpCount()

int KviUserListView::userOpCount ( )
inline

Returns the number of user operators.

Returns
int

References m_iUserOpCount.

◆ userStats()

◆ voiceCount()

int KviUserListView::voiceCount ( )
inline

Returns the number of voices.

Returns
int

References m_iVoiceCount.

◆ window()

KviWindow * KviUserListView::window ( )
inline

Returns the window associated to the userlist.

Returns
KviWindow *

References m_pKviWindow.

Friends And Related Symbol Documentation

◆ KviChannelWindow

friend class KviChannelWindow
friend

References KviChannelWindow.

Referenced by KviChannelWindow.

◆ KviConsoleWindow

friend class KviConsoleWindow
friend

References KviConsoleWindow.

Referenced by KviConsoleWindow.

◆ KviQueryWindow

friend class KviQueryWindow
friend

References KviQueryWindow, and KviUserListView().

Referenced by KviQueryWindow.

◆ KviUserListEntry

◆ KviUserListToolTip

◆ KviUserListViewArea

friend class KviUserListViewArea
friend

Member Data Documentation

◆ m_ibEntries

int KviUserListView::m_ibEntries
protected

◆ m_iChanAdminCount

int KviUserListView::m_iChanAdminCount
protected

◆ m_iChanOwnerCount

int KviUserListView::m_iChanOwnerCount
protected

◆ m_ieEntries

int KviUserListView::m_ieEntries
protected

◆ m_iFontHeight

int KviUserListView::m_iFontHeight
protected

Referenced by applyOptions().

◆ m_iHalfOpCount

int KviUserListView::m_iHalfOpCount
protected

◆ m_iIEntries

int KviUserListView::m_iIEntries
protected

◆ m_iIrcOpCount

int KviUserListView::m_iIrcOpCount
protected

◆ m_iOpCount

int KviUserListView::m_iOpCount
protected

◆ m_iSelectedCount

int KviUserListView::m_iSelectedCount
protected

◆ m_iTotalHeight

int KviUserListView::m_iTotalHeight
protected

◆ m_iUserOpCount

int KviUserListView::m_iUserOpCount
protected

◆ m_iVoiceCount

int KviUserListView::m_iVoiceCount
protected

◆ m_pEntryDict

◆ m_pHeadItem

◆ m_pIrcUserDataBase

KviIrcUserDataBase* KviUserListView::m_pIrcUserDataBase
protected

◆ m_pIterator

KviUserListEntry* KviUserListView::m_pIterator
protected

◆ m_pKviWindow

◆ m_pTailItem

KviUserListEntry* KviUserListView::m_pTailItem
protected

◆ m_pToolTip

KviUserListToolTip* KviUserListView::m_pToolTip
protected

◆ m_pTopItem

◆ m_pUsersLabel

QLabel* KviUserListView::m_pUsersLabel
protected

◆ m_pViewArea


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