本文整理汇总了C++中Status::description方法的典型用法代码示例。如果您正苦于以下问题:C++ Status::description方法的具体用法?C++ Status::description怎么用?C++ Status::description使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::description方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendStatusToServer
void GaduProtocol::sendStatusToServer()
{
if (!isConnected() && !isDisconnecting())
return;
if (!GaduSession)
return;
// some services have per-status configuration
configureServices();
Status newStatus = status();
int friends = account().privateStatus() ? GG_STATUS_FRIENDS_MASK : 0;
int type = GaduProtocolHelper::gaduStatusFromStatus(newStatus);
bool hasDescription = !newStatus.description().isEmpty();
setStatusFlags();
m_lastSentStatus = newStatus;
auto writableSessionToken = Connection->writableSessionToken();
if (hasDescription)
gg_change_status_descr(
writableSessionToken.rawSession(), type | friends, newStatus.description().toUtf8().constData());
else
gg_change_status(writableSessionToken.rawSession(), type | friends);
account().accountContact().setCurrentStatus(status());
}
示例2: statusesEqual
bool statusesEqual(Status status1, Status status2)
{
if (status1.description() != status2.description())
return false;
if (status1.type() == status2.type())
return true;
if (status1.type() == "Invisible" && status2.type() == "DoNotDisturb")
return true;
if (status1.type() == "DoNotDisturb" && status2.type() == "Invisible")
return true;
return false;
}
示例3: storeStatus
void BaseStatusContainer::storeStatus(Status status)
{
if (!MyStorableObject->isValidStorage())
return;
MyStorableObject->storeValue("LastStatusDescription", status.description());
MyStorableObject->storeValue("LastStatusName", status.type());
}
示例4: statusIcon
KaduIcon StatusTypeManager::statusIcon(const QString &protocol, const Status &status)
{
const StatusTypeData & statusTypeData = this->statusTypeData(status.type());
QString iconName = QString("protocols/%1/%2%3")
.arg(protocol)
.arg(statusTypeData.iconName())
.arg(status.description().isEmpty() ? QString() : QLatin1String("_d"));
return KaduIcon(iconName, "16x16");
}
示例5: acceptBuddy
bool OnlineAndDescriptionBuddyFilter::acceptBuddy(const Buddy &buddy)
{
if (!Enabled)
return true;
Contact preferredContact = BuddyPreferredManager::instance()->preferredContact(buddy, false);
if (preferredContact.isNull())
return false;
Status status = preferredContact.currentStatus();
return !status.isDisconnected() || !status.description().isEmpty();
}
示例6: appendStatus
void HistorySqlStorage::appendStatus(const Contact &contact, const Status &status, const QDateTime &time)
{
kdebugf();
DatabaseMutex.lock();
AppendStatusQuery.bindValue(":contact", contact.uuid().toString());
AppendStatusQuery.bindValue(":status", status.type());
AppendStatusQuery.bindValue(":set_time", time);
AppendStatusQuery.bindValue(":description", status.description());
executeQuery(AppendStatusQuery);
DatabaseMutex.unlock();
kdebugf2();
}
示例7: gaduStatusFromStatus
unsigned int GaduProtocolHelper::gaduStatusFromStatus(const Status &status)
{
bool hasDescription = !status.description().isEmpty();
StatusType type = status.type();
if (StatusTypeFreeForChat == type)
return hasDescription ? GG_STATUS_FFC_DESCR : GG_STATUS_FFC;
if (StatusTypeOnline == type)
return hasDescription ? GG_STATUS_AVAIL_DESCR : GG_STATUS_AVAIL;
if (StatusTypeAway == type || StatusTypeNotAvailable == type)
return hasDescription ? GG_STATUS_BUSY_DESCR : GG_STATUS_BUSY;
if (StatusTypeDoNotDisturb == type)
return hasDescription ? GG_STATUS_DND_DESCR : GG_STATUS_DND;
if (StatusTypeInvisible == type)
return hasDescription ? GG_STATUS_INVISIBLE_DESCR : GG_STATUS_INVISIBLE;
return hasDescription ? GG_STATUS_NOT_AVAIL_DESCR : GG_STATUS_NOT_AVAIL;
}
示例8: toIrisStatus
XMPP::Status toIrisStatus(Status status)
{
XMPP::Status s = XMPP::Status();
const QString &type = status.type();
if ("Online" == type)
s.setType(XMPP::Status::Online);
else if ("FreeForChat" == type)
s.setType(XMPP::Status::FFC);
else if ("DoNotDisturb" == type)
s.setType(XMPP::Status::DND);
else if ("NotAvailable" == type)
s.setType(XMPP::Status::XA);
else if ("Away" == type)
s.setType(XMPP::Status::Away);
else if ("Invisible" == type)
s.setType(XMPP::Status::DND);
else
s.setType(XMPP::Status::Offline);
s.setStatus(status.description());
return s;
}
示例9: getStatusIconPath
static QString getStatusIconPath(BuddyOrContact buddyOrContact)
{
Buddy buddy = buddyOrContact.buddy();
Contact contact = buddyOrContact.contact();
if (buddy.isBlocked())
return webKitPath(IconsManager::instance()->iconPath("kadu_icons", "16x16", "blocked"));
if (contact.isBlocking())
return webKitPath(IconsManager::instance()->iconPath("kadu_icons", "16x16", "blocking"));
if (contact.contactAccount())
{
Protocol *protocol = contact.contactAccount().protocolHandler();
if (protocol)
{
StatusTypeManager* statustypemanager = StatusTypeManager::instance();
if (statustypemanager)
{
Status status = contact.currentStatus();
QString iconpath = statustypemanager->statusIconFullPath(protocol->statusPixmapPath(), status.type(), !status.description().isEmpty(), false);
if (!iconpath.isEmpty())
return webKitPath(iconpath);
}
}
}
return QString();
}