本文整理汇总了C++中GuildMember::publicNote方法的典型用法代码示例。如果您正苦于以下问题:C++ GuildMember::publicNote方法的具体用法?C++ GuildMember::publicNote怎么用?C++ GuildMember::publicNote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuildMember
的用法示例。
在下文中一共展示了GuildMember::publicNote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpMembers
void GuildShell::dumpMembers(QTextStream& out)
{
QDateTime dt;
GuildMemberDictIterator it(m_members);
GuildMember* member;
QString format("%1 %2 %3 %4%5%6%7 %8 %9");
QString dateFormat("ddd MMM dd hh:mm:ss yyyy");
// calculate the maximum class name width
size_t maxClassNameLength = 0;
for (uint8_t i = 1; i <= PLAYER_CLASSES; i++)
if (classString(i).length() > maxClassNameLength)
maxClassNameLength = classString(i).length();
out << "Guild has " << m_members.count() << " members: " << endl;
int nameFieldWidth = - m_maxNameLength;
int classFieldWidth = - maxClassNameLength;
out << format.arg("Members", nameFieldWidth)
.arg("Lv", 2).arg("Class", classFieldWidth)
.arg("R", 1)
.arg("B", 1)
.arg("A", 1)
.arg("P", 1)
.arg("Last On", -24)
.arg("Zone", -18);
out << " Public Note" << endl;
QString zone;
while ((member = it.current()))
{
dt.setTime_t(member->lastOn());
zone = zoneString(member->zoneId());
if (member->zoneInstance())
zone += ":" + QString::number(member->zoneInstance());
out << format.arg(member->name(), nameFieldWidth)
.arg(member->level(), 2).arg(member->classString(), classFieldWidth)
.arg(member->guildRankString(), 1)
.arg(member->bankRankString(), 1)
.arg(member->altRankString(), 1)
.arg(member->memberRankString(), 1)
.arg(dt.toString(dateFormat), -24)
.arg(zone, -18);
out << " " << member->publicNote() << endl;
++it;
}
}
示例2: guildMemberList
void GuildShell::guildMemberList(const uint8_t* data, size_t len)
{
// clear out any existing member data
emit cleared();
m_members.clear();
m_maxNameLength = 0;
// construct a netstream object on the data
NetStream gml(data, len);
// read the player name from the front of the stream
QString player = gml.readText();
// read the player count from the stream
uint32_t count;
count = gml.readUInt32();
#ifdef GUILDSHELL_DIAG
seqDebug("Guild has %d members:", count);
#endif
GuildMember* member;
#ifdef GUILDSHELL_DIAG
QDateTime dt;
#endif // GUILDSHELL_DIAG
// iterate over the data until we reach the end of it
while (!gml.end())
{
// create a new guildmember initializing it from the NetStream
member = new GuildMember(gml);
// insert the new member into the dictionary
m_members.insert(member->name(), member);
// check for new longest member name
if (member->name().length() > m_maxNameLength)
m_maxNameLength = member->name().length();
emit added(member);
#ifdef GUILDSHELL_DIAG
dt.setTime_t(member->lastOn());
seqDebug("%-64s\t%d\t%s\t%d\t%s\t'%s'\t%s:%d",
(const char*)member->name(),
member->level(),
(const char*)classString(member->classVal()),
member->guildRank(),
(const char*)dt.toString(),
(const char*)member->publicNote(),
(const char*)m_zoneMgr->zoneNameFromID(member->zoneId()),
member->zoneInstance());
#endif
}
emit loaded();
#ifdef GUILDSHELL_DIAG
seqDebug("Finished processing %d guildmates. %d chars in longest name.",
m_members.count(), m_maxNameLength);
#endif //
}