当前位置: 首页>>代码示例>>C++>>正文


C++ Status::description方法代码示例

本文整理汇总了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());
}
开发者ID:vogel,项目名称:kadu,代码行数:30,代码来源:gadu-protocol.cpp

示例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;
	}
开发者ID:partition,项目名称:kadu,代码行数:16,代码来源:iris-status-adapter.cpp

示例3: storeStatus

void BaseStatusContainer::storeStatus(Status status)
{
    if (!MyStorableObject->isValidStorage())
        return;

    MyStorableObject->storeValue("LastStatusDescription", status.description());
    MyStorableObject->storeValue("LastStatusName", status.type());
}
开发者ID:partition,项目名称:kadu,代码行数:8,代码来源:base-status-container.cpp

示例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");
}
开发者ID:leewood,项目名称:kadu,代码行数:11,代码来源:status-type-manager.cpp

示例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();
}
开发者ID:partition,项目名称:kadu,代码行数:12,代码来源:online-and-description-buddy-filter.cpp

示例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();
}
开发者ID:partition,项目名称:kadu,代码行数:17,代码来源:history-sql-storage.cpp

示例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;
}
开发者ID:leewood,项目名称:kadu,代码行数:22,代码来源:gadu-protocol-helper.cpp

示例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;
	}
开发者ID:partition,项目名称:kadu,代码行数:23,代码来源:iris-status-adapter.cpp

示例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();
}
开发者ID:partition,项目名称:kadu,代码行数:29,代码来源:contact-parser-tags.cpp


注:本文中的Status::description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。