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


C++ LLInventoryPanel::setVisible方法代码示例

本文整理汇总了C++中LLInventoryPanel::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ LLInventoryPanel::setVisible方法的具体用法?C++ LLInventoryPanel::setVisible怎么用?C++ LLInventoryPanel::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLInventoryPanel的用法示例。


在下文中一共展示了LLInventoryPanel::setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateView

void LLFloaterOutbox::updateView()
{
	//updateView() is called twice the first time.
	updateFolderCount();
	LLInventoryPanel* panel = mOutboxInventoryPanel.get();

	if (mOutboxItemCount > 0)
	{
		panel->setVisible(TRUE);
		mInventoryPlaceholder->setVisible(FALSE);
		mOutboxTopLevelDropZone->setVisible(TRUE);
	}
	else
	{
		if (panel)
		{
			panel->setVisible(FALSE);
		}

		// Show the drop zone if there is an outbox folder
		mOutboxTopLevelDropZone->setVisible(mOutboxId.notNull());

		mInventoryPlaceholder->setVisible(TRUE);

		std::string outbox_text;
		std::string outbox_text2;
		std::string outbox_title;
		std::string outbox_tooltip;

		const LLSD& subs = getMarketplaceStringSubstitutions();
		U32 mkt_status = LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus();

		// Text styles for marketplace hyperlinks
		std::string subs_link;
		std::string subs_text;

		if (mOutboxId.notNull())
		{
			// Does the outbox needs recreation?
			if ((mOutboxInventoryPanel.get() == NULL) || !gInventory.getCategory(mOutboxId))
			{
				setupOutbox();
			}
			// "Outbox is empty!" message strings
			outbox_text = LLTrans::getString("InventoryOutboxNoItems");
			subs_link = "[MARKETPLACE_DASHBOARD_URL]";
			subs_text = " " + LLTrans::getString("InventoryOutboxNoItemsSubs");
			outbox_text2 = LLTrans::getString("InventoryOutboxNoItems2");
			outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle");
			outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip");
		}
		else if (mkt_status <= MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING)
		{
			// "Initializing!" message strings
			outbox_text = LLTrans::getString("InventoryOutboxInitializing");
			subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
			subs_text = " " + LLTrans::getString("InventoryOutboxInitializingSubs");
			outbox_text2 = LLTrans::getString("InventoryOutboxInitializing2");
			outbox_title = LLTrans::getString("InventoryOutboxInitializingTitle");
			outbox_tooltip = LLTrans::getString("InventoryOutboxInitializingTooltip");
		}
		else if (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_NOT_MERCHANT)
		{
			// "Not a merchant!" message strings
			outbox_text = LLTrans::getString("InventoryOutboxNotMerchant");
			subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
			subs_text = " " + LLTrans::getString("InventoryOutboxNotMerchantSubs");
			outbox_text2 = LLTrans::getString("InventoryOutboxNotMerchant2");
			outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle");
			outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip");
		}
		else
		{
			// "Errors!" message strings
			outbox_text = LLTrans::getString("InventoryOutboxError");
			subs_link = "[MARKETPLACE_CREATE_STORE_URL]";
			subs_text = " " + LLTrans::getString("InventoryOutboxErrorSubs");
			outbox_text2 = " " + LLTrans::getString("InventoryOutboxError2");
			outbox_title = LLTrans::getString("InventoryOutboxErrorTitle");
			outbox_tooltip = LLTrans::getString("InventoryOutboxErrorTooltip");
		}

		mInventoryText->clear();
		const LLColor4 color = gColors.getColor("TextFgReadOnlyColor");
		mInventoryText->appendColoredText(outbox_text, false, false, color);
		LLStringUtil::format(subs_link, subs);
		LLStyleSP subs_link_style(new LLStyle);
		subs_link_style->setLinkHREF(subs_link);
		subs_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
		mInventoryText->appendStyledText(subs_text, false, false, subs_link_style);
		mInventoryText->appendColoredText(outbox_text2, false, false, color);
		mInventoryTitle->setValue(outbox_title);
		mInventoryPlaceholder->getParent()->setToolTip(outbox_tooltip);
	}
}
开发者ID:hades187,项目名称:singu,代码行数:95,代码来源:llfloateroutbox.cpp


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