![]() |
KVIrc 5.2.6
Developer APIs
|
A class to handle the entries of the user database. More...
#include <KviIrcUserEntry.h>
Public Types | |
enum | Gender { Male = 0 , Female = 1 , Unknown = 3 } |
Defines the gender of the user. More... | |
enum | UserMode { UserOp = 1 , Voice = 2 , HalfOp = 4 , Op = 8 , ChanAdmin = 16 , ChanOwner = 32 , ModeMask = UserOp | Voice | HalfOp | Op | ChanAdmin | ChanOwner } |
Defines the user mode in a channel. More... | |
Public Member Functions | |
const QString & | accountName () |
Returns the account name (if any) | |
KviAvatar * | avatar () |
Returns the avatar of the user. | |
bool | avatarRequested () const |
Returns true if kvirc already made an attempt to download user's avatar. | |
std::unique_ptr< KviAvatar > | forgetAvatar () |
Removes the avatar associated to the user. | |
Gender | gender () |
Returns the gender of the user. | |
bool | hasAccountName () |
Returns true if the user has an account name. | |
bool | hasHops () |
Returns true if the user has hops set. | |
bool | hasHost () |
Returns true if the user has the hostname set. | |
bool | hasRealName () |
Returns true if the user has the realname set. | |
bool | hasServer () |
Returns true if the user has the server set. | |
bool | hasUser () |
Returns true if the user has the username set. | |
int | hops () |
Returns the number of hops. | |
const QString & | host () |
Returns the hostname of the user. | |
bool | isAway () const |
Returns true if the user is in away mode. | |
bool | isBot () |
Returns true if the user is marked as a bot. | |
bool | isIrcOp () const |
Returns true if the user is an irc operator. | |
KviIrcUserEntry (const QString &user, const QString &host) | |
Constructs the entry object. | |
int | nRefs () |
Returns the number of references of the user in the database. | |
const QString & | realName () |
Returns the realname of the user. | |
const QString & | server () |
Returns the server of the user. | |
void | setAccountName (const QString &szAccountName) |
Sets the account name for the user. | |
void | setAvatar (KviAvatar *upAvatar=nullptr) |
Sets the avatar of the user. | |
void | setAvatar (std::unique_ptr< KviAvatar > upAvatar=nullptr) |
Sets the avatar of the user. | |
void | setAvatarRequested () |
Mark that kvirc is trying (already tried) to get user's avatar. | |
void | setAway (bool bAway) |
Sets the away state of the user. | |
void | setBot (bool bIsBot) |
Sets the user as a bot. | |
void | setGender (Gender g) |
Sets the gender of the user. | |
void | setHops (int iHops) |
Sets the number of hops of the user. | |
void | setHost (const QString &szHost) |
Sets the hostname of the user. | |
void | setIrcOp (bool bIrcOp) |
Sets the irc operator state of the user. | |
void | setRealName (const QString &szReal) |
Sets the realname of the user. | |
void | setServer (const QString &szServ) |
Sets the server of the user. | |
void | setSmartNickColor (const int iColor) |
Sets the ircview smart nick color of the user. | |
void | setUser (const QString &szUser) |
Sets the username of the user. | |
void | setUserFlags (const QString &szFlags) |
Sets the user global flags (eg: "G*") | |
int | smartNickColor () |
Returns the ircview smart nick color of the user. | |
const QString & | user () |
Returns the username of the user. | |
const QString & | userFlags () |
Returns the user flags. | |
Protected Attributes | |
bool | m_bAvatarRequested |
bool | m_bAway |
bool | m_bBot |
bool | m_bIrcOp |
bool | m_bNotFoundRegUserLookup |
bool | m_bUseCustomColor |
QColor | m_cachedColor |
Gender | m_eGender |
int | m_iHops |
int | m_iSmartNickColor |
int | m_nRefs |
QString | m_szAccountName |
QString | m_szHost |
QString | m_szLastRegisteredMatchNick |
QString | m_szRealName |
QString | m_szRegisteredUserName |
QString | m_szServer |
QString | m_szUser |
QString | m_szUserFlags |
std::unique_ptr< KviAvatar > | m_upAvatar |
Friends | |
class | KviIrcUserDataBase |
A class to handle the entries of the user database.
Defines the user mode in a channel.
KviIrcUserEntry::KviIrcUserEntry | ( | const QString & | user, |
const QString & | host ) |
Constructs the entry object.
user | The user to add |
host | The host of the user |
References m_bAvatarRequested, m_bAway, m_bBot, m_bIrcOp, m_bNotFoundRegUserLookup, m_bUseCustomColor, m_eGender, m_iHops, m_iSmartNickColor, m_nRefs, m_szAccountName, m_szHost, m_szUser, szHost, and Unknown.
|
inline |
Returns the account name (if any)
References m_szAccountName.
Referenced by KviQueryWindow::getInfoLabelText(), and KviUserListView::nickChange().
|
inline |
Returns the avatar of the user.
References m_upAvatar.
Referenced by KviApplication::notifierMessage(), KviIrcServerParser::parseLiteralJoin(), and KviQueryWindow::setTarget().
|
inline |
Returns true if kvirc already made an attempt to download user's avatar.
References m_bAvatarRequested.
std::unique_ptr< KviAvatar > KviIrcUserEntry::forgetAvatar | ( | ) |
Removes the avatar associated to the user.
References m_upAvatar.
Referenced by KviUserListView::nickChange().
|
inline |
Returns the gender of the user.
References m_eGender.
Referenced by KviUserListView::nickChange(), and KviUserListViewArea::paintEvent().
|
inline |
Returns true if the user has an account name.
References m_szAccountName.
Referenced by KviQueryWindow::getInfoLabelText().
|
inline |
Returns true if the user has hops set.
References m_iHops.
Referenced by KviQueryWindow::getInfoLabelText().
|
inline |
Returns true if the user has the hostname set.
References m_szHost.
Referenced by KviQueryWindow::getInfoLabelText(), and KviIrcUserDataBase::registeredUser().
|
inline |
Returns true if the user has the realname set.
References m_szRealName.
Referenced by KviQueryWindow::getInfoLabelText().
|
inline |
Returns true if the user has the server set.
References m_szServer.
Referenced by KviQueryWindow::getInfoLabelText().
|
inline |
Returns true if the user has the username set.
References m_szUser.
Referenced by KviQueryWindow::getInfoLabelText(), and KviIrcUserDataBase::registeredUser().
|
inline |
Returns the number of hops.
References m_iHops.
Referenced by KviQueryWindow::getInfoLabelText(), and KviUserListView::nickChange().
|
inline |
Returns the hostname of the user.
References m_szHost.
Referenced by KviUserListView::completeNickBashLike(), KviUserListView::completeNickLastAction(), KviUserListView::completeNickStandard(), KviQueryWindow::getInfoLabelText(), KviUserListView::nickChange(), KviIrcUserDataBase::registeredUser(), KviIrcUserDataBase::registeredUser(), KviQueryWindow::setAliveQuery(), and KviUserListView::userActionVerifyMask().
|
inline |
Returns true if the user is in away mode.
References m_bAway.
Referenced by KviQueryWindow::getInfoLabelText(), and KviUserListViewArea::paintEvent().
|
inline |
Returns true if the user is marked as a bot.
References m_bBot.
Referenced by KviUserListView::nickChange(), and KviUserListViewArea::paintEvent().
|
inline |
Returns true if the user is an irc operator.
References m_bIrcOp.
Referenced by KviUserListView::insertUserEntry(), KviUserListView::maybeTip(), KviUserListView::nickChange(), KviUserListViewArea::paintEvent(), KviUserListView::partInternal(), and KviUserListView::userStats().
|
inline |
|
inline |
Returns the realname of the user.
References m_szRealName.
Referenced by KviQueryWindow::getInfoLabelText(), and KviUserListView::nickChange().
|
inline |
Returns the server of the user.
References m_szServer.
Referenced by KviQueryWindow::getInfoLabelText(), and KviUserListView::nickChange().
|
inline |
Sets the account name for the user.
References m_szAccountName.
Referenced by KviUserListView::nickChange().
Sets the avatar of the user.
pAvatar | The avatar |
References m_upAvatar.
Sets the avatar of the user.
upAvatar | The avatar |
References m_upAvatar.
Referenced by KviUserListView::nickChange(), and KviIrcServerParser::parseLiteralJoin().
|
inline |
Mark that kvirc is trying (already tried) to get user's avatar.
References m_bAvatarRequested.
|
inline |
|
inline |
Sets the user as a bot.
bIsBot | If the user is a bot |
References m_bBot.
Referenced by KviUserListView::nickChange(), and setRealName().
|
inline |
Sets the gender of the user.
g | The gender |
Referenced by KviUserListView::nickChange(), and setRealName().
|
inline |
Sets the number of hops of the user.
iHops | The number of hops |
References m_iHops.
Referenced by KviUserListView::nickChange().
|
inline |
Sets the hostname of the user.
szHost | The hostname |
References m_szHost, and szHost.
Referenced by KviUserListView::userAction(), KviUserListView::userAction(), and KviUserListView::userActionVerifyMask().
|
inline |
Sets the irc operator state of the user.
bIrcOp | The ircop state |
References m_bIrcOp.
Referenced by KviUserListView::nickChange().
void KviIrcUserEntry::setRealName | ( | const QString & | szReal | ) |
Sets the realname of the user.
szReal | The realname |
References Female, KviNickColors::getSmartColorIntByMircColor(), KviControlCodes::getUnicodeColorBytes(), m_szRealName, Male, KviControlCodes::Reset, setBot(), setGender(), and setSmartNickColor().
Referenced by KviUserListView::nickChange().
|
inline |
Sets the server of the user.
szServ | The server |
References m_szServer.
Referenced by KviUserListView::nickChange().
|
inline |
Sets the ircview smart nick color of the user.
iColor | The color value |
References m_iSmartNickColor.
Referenced by KviConsoleWindow::outputPrivmsg(), KviIrcServerParser::parseLiteralNick(), and setRealName().
|
inline |
Sets the username of the user.
szUser | The username |
References m_szUser.
Referenced by KviUserListView::userAction(), KviUserListView::userAction(), and KviUserListView::userActionVerifyMask().
|
inline |
|
inline |
Returns the ircview smart nick color of the user.
References m_iSmartNickColor.
Referenced by KviConsoleWindow::outputPrivmsg().
|
inline |
Returns the username of the user.
References m_szUser.
Referenced by KviUserListView::completeNickBashLike(), KviUserListView::completeNickLastAction(), KviUserListView::completeNickStandard(), KviQueryWindow::getInfoLabelText(), KviUserListView::nickChange(), KviIrcUserDataBase::registeredUser(), KviIrcUserDataBase::registeredUser(), KviQueryWindow::setAliveQuery(), and KviUserListView::userActionVerifyMask().
|
inline |
|
friend |
References KviIrcUserDataBase.
Referenced by KviIrcUserDataBase.
|
protected |
Referenced by avatarRequested(), KviIrcUserEntry(), and setAvatarRequested().
|
protected |
Referenced by isAway(), KviIrcUserEntry(), and setAway().
|
protected |
Referenced by isBot(), KviIrcUserEntry(), and setBot().
|
protected |
Referenced by isIrcOp(), KviIrcUserEntry(), and setIrcOp().
|
protected |
|
protected |
Referenced by KviIrcUserDataBase::haveCustomColor(), KviIrcUserEntry(), and KviIrcUserDataBase::registeredUser().
|
protected |
Referenced by KviIrcUserDataBase::customColor(), and KviIrcUserDataBase::registeredUser().
|
protected |
Referenced by gender(), KviIrcUserEntry(), and setGender().
|
protected |
Referenced by hasHops(), hops(), KviIrcUserEntry(), and setHops().
|
protected |
Referenced by KviIrcUserEntry(), setSmartNickColor(), and smartNickColor().
|
protected |
Referenced by KviIrcUserDataBase::insertUser(), KviIrcUserEntry(), nRefs(), and KviIrcUserDataBase::removeUser().
|
protected |
Referenced by accountName(), hasAccountName(), KviIrcUserEntry(), and setAccountName().
|
protected |
Referenced by hasHost(), host(), KviIrcUserDataBase::insertUser(), KviIrcUserEntry(), and setHost().
|
protected |
|
protected |
Referenced by hasRealName(), realName(), and setRealName().
|
protected |
Referenced by KviIrcUserDataBase::registeredUser().
|
protected |
Referenced by hasServer(), server(), and setServer().
|
protected |
Referenced by hasUser(), KviIrcUserDataBase::insertUser(), KviIrcUserEntry(), setUser(), and user().
|
protected |
Referenced by setUserFlags(), and userFlags().
|
protected |
Referenced by avatar(), forgetAvatar(), setAvatar(), and setAvatar().