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


C++ LLParcel类代码示例

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


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

示例1: onClickSellToAnyone

// static - 'Sell to Anyone' clicked, throw up a confirmation dialog
void LLFloaterAuction::onClickSellToAnyone(void* data)
{
	LLFloaterAuction* self = (LLFloaterAuction*)(data);
	if (self)
	{
		LLParcel* parcelp = self->mParcelp->getParcel();

		// Do a confirmation
		S32 sale_price = parcelp->getArea();	// Selling for L$1 per meter
		S32 area = parcelp->getArea();

		LLSD args;
		args["LAND_SIZE"] = llformat("%d", area);
		args["SALE_PRICE"] = llformat("%d", sale_price);
		args["NAME"] = LLTrans::getString("Anyone");

		LLNotification::Params params("ConfirmLandSaleChange");	// Re-use existing dialog
		params.substitutions(args)
			.functor.function(boost::bind(&LLFloaterAuction::onSellToAnyoneConfirmed, self, _1, _2));

		params.name("ConfirmLandSaleToAnyoneChange");
		
		// ask away
		LLNotifications::instance().add(params);
	}
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:27,代码来源:llfloaterauction.cpp

示例2: initNewClassified

// Fill in some reasonable defaults for a new classified.
void LLPanelClassified::initNewClassified()
{
	// TODO:  Don't generate this on the client.
	mClassifiedID.generate();

	mCreatorID = gAgent.getID();

	mPosGlobal = gAgent.getPositionGlobal();

	mPaidFor = FALSE;

	// Try to fill in the current parcel
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (parcel)
	{
		mNameEditor->setText(parcel->getName());
		//mDescEditor->setText(parcel->getDesc());
		mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
		//mPriceEditor->setText("0");
		mCategoryCombo->setCurrentByIndex(0);
	}

	mUpdateBtn->setLabel(getString("publish_txt"));
	
	// simulate clicking the "location" button
	LLPanelClassified::onClickSet(this);
}
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:28,代码来源:llpanelclassified.cpp

示例3: initialize

void LLFloaterAuction::initialize()
{
	mParcelp = gParcelMgr->getParcelSelection();
	LLViewerRegion* region = gParcelMgr->getSelectionRegion();
	LLParcel* parcelp = mParcelp->getParcel();
	if(parcelp && region && !parcelp->getForSale())
	{
		mParcelHost = region->getHost();
		mParcelID = parcelp->getLocalID();

		childSetText("parcel_text", parcelp->getName());
		childEnable("snapshot_btn");
		childEnable("ok_btn");
	}
	else
	{
		mParcelHost.invalidate();
		if(parcelp && parcelp->getForSale())
		{
			childSetText("parcel_text", childGetText("already for sale"));
		}
		else
		{
			childSetText("parcel_text", LLString::null);
		}
		mParcelID = -1;
		childSetEnabled("snapshot_btn", false);
		childSetEnabled("ok_btn", false);
	}
	mImageID.setNull();
	mImage = NULL;
}
开发者ID:Boy,项目名称:netbook,代码行数:32,代码来源:llfloaterauction.cpp

示例4: updateNames

void LLFloaterBuyLandUI::updateNames()
{
	LLParcel* parcelp = mParcel->getParcel();

	if (!parcelp)
	{
		mParcelSellerName = LLStringUtil::null;
		return;
	}
	
	if (mIsClaim)
	{
		mParcelSellerName = "Linden Lab";
	}
	else if (parcelp->getIsGroupOwned())
	{
		mParcelSellerName = "(Loading...)";
		gCacheName->getGroup(parcelp->getGroupID(),
			boost::bind(&LLFloaterBuyLandUI::updateName, this,
				_1, _2, _3));
	}
	else
	{
		mParcelSellerName = "(Loading...)";
		gCacheName->get(parcelp->getOwnerID(), false,
			boost::bind(&LLFloaterBuyLandUI::updateName, this,
				_1, _2, _3));
	}
}
开发者ID:Nekrofage,项目名称:SingularityViewer,代码行数:29,代码来源:llfloaterbuyland.cpp

示例5: onClickWLStatusButton

void KCWindlightInterface::onClickWLStatusButton()
{
	//clear the last notification if its still open
	if (mClearWLNotification && !mClearWLNotification->isRespondedTo())
	{
		LLSD response = mClearWLNotification->getResponseTemplate();
		response["Ignore"] = true;
		mClearWLNotification->respond(response);
	}

	if (WLset)
	{
		LLParcel *parcel = NULL;
 		parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
 		if (parcel)
		{
			//TODO: this could be better
			LLSD payload;
			payload["local_id"] = parcel->getLocalID();
			payload["land_owner"] = getOwnerID(parcel);

			LLSD args;
			args["PARCEL_NAME"] = parcel->getName();
			
			mClearWLNotification = LLNotifications::instance().add("PhoenixWLClear", args, payload, boost::bind(&KCWindlightInterface::callbackParcelWLClear, this, _1, _2));
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:28,代码来源:kcwlinterface.cpp

示例6: onForSaleBannerClick

void LLPanelPlaceProfile::onForSaleBannerClick()
{
	LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance();
	LLParcel* parcel = mgr->getFloatingParcelSelection()->getParcel();
	LLViewerRegion* selected_region =  mgr->getSelectionRegion();
	if(parcel && selected_region)
	{
		if(parcel->getLocalID() == mSelectedParcelID &&
				mLastSelectedRegionID ==selected_region->getRegionID())
		{
			S32 price = parcel->getSalePrice();

			if(price - gStatusBar->getBalance() > 0)
			{
				LLStringUtil::format_map_t args;
				args["AMOUNT"] = llformat("%d", price);
				LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("buying_selected_land", args), price );
			}
			else
			{
				LLViewerParcelMgr::getInstance()->startBuyLand();
			}
		}
		else
		{
			LL_WARNS("Places") << "User  is trying  to buy remote parcel.Operation is not supported"<< LL_ENDL;
		}

	}
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:30,代码来源:llpanelplaceprofile.cpp

示例7: setPosGlobal

void LLPanelPickEdit::onClickSetLocation()
{
	// Save location for later use.
	setPosGlobal(gAgent.getPositionGlobal());

	std::string parcel_name, region_name;

	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (parcel)
	{
		mParcelId = parcel->getID();
		parcel_name = parcel->getName();
	}

	LLViewerRegion* region = gAgent.getRegion();
	if(region)
	{
		region_name = region->getName();
	}

	setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal()));

	mLocationChanged = true;
	enableSaveButton(TRUE);
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:25,代码来源:llpanelpick.cpp

示例8: handle_click_action_open_media

static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp)
{
	//FIXME: how do we handle object in different parcel than us?
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (!parcel) return;

	// did we hit an object?
	if (objectp.isNull()) return;

	// did we hit a valid face on the object?
	S32 face = LLToolPie::getInstance()->getPick().mObjectFace;
	if( face < 0 || face >= objectp->getNumTEs() ) return;
		
	// is media playing on this face?
	if (LLViewerMedia::getMediaImplFromTextureID(objectp->getTE(face)->getID()) != NULL)
	{
		handle_click_action_play();
		return;
	}

	std::string media_url = std::string ( parcel->getMediaURL () );
	std::string media_type = std::string ( parcel->getMediaType() );
	LLStringUtil::trim(media_url);

	LLWeb::loadURL(media_url);
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:26,代码来源:lltoolpie.cpp

示例9: cursor_from_parcel_media

static ECursorType cursor_from_parcel_media(U8 click_action)
{
	// HACK: This is directly referencing an impl name.  BAD!
	// This can be removed when we have a truly generic media browser that only 
	// builds an impl based on the type of url it is passed.
	
	//FIXME: how do we handle object in different parcel than us?
	ECursorType open_cursor = UI_CURSOR_ARROW;
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (!parcel) return open_cursor;

	std::string media_url = std::string ( parcel->getMediaURL () );
	std::string media_type = std::string ( parcel->getMediaType() );
	LLStringUtil::trim(media_url);

	open_cursor = UI_CURSOR_TOOLMEDIAOPEN;

	LLViewerMediaImpl::EMediaStatus status = LLViewerParcelMedia::getStatus();
	switch(status)
	{
		case LLViewerMediaImpl::MEDIA_PLAYING:
			return click_action == CLICK_ACTION_PLAY ? UI_CURSOR_TOOLPAUSE : open_cursor;
		default:
			return UI_CURSOR_TOOLPLAY;
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:26,代码来源:lltoolpie.cpp

示例10: handle_click_action_open_media

static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp)
{
	//FIXME: how do we handle object in different parcel than us?
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (!parcel) return;

	// did we hit an object?
	if (objectp.isNull()) return;

	// did we hit a valid face on the object?
	S32 face = LLToolPie::getInstance()->getPick().mObjectFace;
	if( face < 0 || face >= objectp->getNumTEs() ) return;
		
	// is media playing on this face?
	if (LLViewerMedia::getMediaImplFromTextureID(objectp->getTE(face)->getID()) != NULL)
	{
		handle_click_action_play();
		return;
	}

	std::string media_url = std::string ( parcel->getMediaURL () );
	std::string media_type = std::string ( parcel->getMediaType() );
	LLStringUtil::trim(media_url);

	// Get the scheme, see if that is handled as well.
	LLURI uri(media_url);
	std::string media_scheme = uri.scheme() != "" ? uri.scheme() : "http";

	// HACK: This is directly referencing an impl name.  BAD!
	// This can be removed when we have a truly generic media browser that only 
	// builds an impl based on the type of url it is passed.

	LLWeb::loadURL(media_url);
}
开发者ID:Beeks,项目名称:Ascent,代码行数:34,代码来源:lltoolpie.cpp

示例11: cursor_from_parcel_media

static ECursorType cursor_from_parcel_media(U8 click_action)
{
	// HACK: This is directly referencing an impl name.  BAD!
	// This can be removed when we have a truly generic media browser that only 
	// builds an impl based on the type of url it is passed.
	
	//FIXME: how do we handle object in different parcel than us?
	ECursorType open_cursor = UI_CURSOR_ARROW;
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	if (!parcel) return open_cursor;

	std::string media_url = std::string ( parcel->getMediaURL () );
	std::string media_type = std::string ( parcel->getMediaType() );
	LLStringUtil::trim(media_url);

	// Get the scheme, see if that is handled as well.
	LLURI uri(media_url);
	std::string media_scheme = uri.scheme() != "" ? uri.scheme() : "http";

	if(	LLMediaManager::getInstance()->supportsMediaType( "LLMediaImplLLMozLib", media_scheme, media_type ) )
	{
		open_cursor = UI_CURSOR_TOOLMEDIAOPEN;
	}

	LLMediaBase::EStatus status = LLViewerParcelMedia::getStatus();
	switch(status)
	{
		case LLMediaBase::STATUS_STARTED:
			return click_action == CLICK_ACTION_PLAY ? UI_CURSOR_TOOLPAUSE : open_cursor;
		default:
			return UI_CURSOR_TOOLPLAY;
	}
}
开发者ID:,项目名称:,代码行数:33,代码来源:

示例12: updateNames

void LLFloaterBuyLandUI::updateNames()
{
	LLParcel* parcelp = mParcel->getParcel();

	if (!parcelp)
	{
		mParcelSellerName = LLStringUtil::null;
		return;
	}
	
	if (mIsClaim)
	{
		mParcelSellerName = "Linden Lab";
	}
	else if (parcelp->getIsGroupOwned())
	{
		gCacheName->getGroup(parcelp->getGroupID(),
			boost::bind(&LLFloaterBuyLandUI::updateGroupName, this,
				_1, _2, _3));
	}
	else
	{
		mParcelSellerName = LLSLURL("agent", parcelp->getOwnerID(), "completename").getSLURLString();
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:25,代码来源:llfloaterbuyland.cpp

示例13: onClickRemoveURLFilter

// static
void LLPanelLandMedia::onClickRemoveURLFilter(void *data)
{
	LLPanelLandMedia* panelp = (LLPanelLandMedia*)data;
	if (panelp && panelp->mURLFilterList)
	{
		LLParcel* parcel = panelp->mParcel->getParcel();
		if (parcel)
		{
			LLSD list = parcel->getMediaURLFilterList();
			
			std::vector<LLScrollListItem*> domains = panelp->mURLFilterList->getAllSelected();
			for (std::vector<LLScrollListItem*>::iterator iter = domains.begin(); iter != domains.end(); iter++)
			{
				LLScrollListItem* item = *iter;
				const std::string domain = item->getValue().asString();

				for(S32 i = 0; i < list.size(); i++)
				{
					if (list[i].asString() == domain)
					{
						list.erase(i);
						break;
					}
				}
			}
			
			parcel->setMediaURLFilterList(list);
			LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );

			panelp->refresh();
		}
	}
	
}
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:35,代码来源:llpanellandmedia.cpp

示例14: doSellLand

// static
void LLFloaterSellLandUI::doSellLand(void *userdata)
{
	LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata;

	LLParcel* parcel = self->mParcelSelection->getParcel();

	// Do a confirmation
	S32 sale_price = self->getChild<LLUICtrl>("price")->getValue();
	S32 area = parcel->getArea();
	std::string authorizedBuyerName = LLTrans::getString("Anyone");
	bool sell_to_anyone = true;
	if ("user" == self->getChild<LLUICtrl>("sell_to")->getValue().asString())
	{
		authorizedBuyerName = self->getChild<LLUICtrl>("sell_to_agent")->getValue().asString();
		sell_to_anyone = false;
	}

	// must sell to someone if indicating sale to anyone
	if (!parcel->getForSale() 
		&& (sale_price == 0) 
		&& sell_to_anyone)
	{
		LLSD args;
		std::string type_currency = LLGridManager::getInstance()->getCurrency();
		args["CUR"] = type_currency;
		LLNotificationsUtil::add("SalePriceRestriction", args);
		return;
	}

	std::string type_currency = LLGridManager::getInstance()->getCurrency();
	LLSD args;
	args["LAND_SIZE"] = llformat("%d",area);
	args["SALE_PRICE"] = llformat("%d",sale_price);
	args["NAME"] = authorizedBuyerName;
	args["CUR"] = type_currency;

	LLNotification::Params params("ConfirmLandSaleChange");
	params.substitutions(args)
		.functor.function(boost::bind(&LLFloaterSellLandUI::onConfirmSale, self, _1, _2));

	if (sell_to_anyone)
	{
		params.name("ConfirmLandSaleToAnyoneChange");
	}
	
	if (parcel->getForSale())
	{
		// parcel already for sale, so ignore this question
		LLNotifications::instance().forceResponse(params, -1);
	}
	else
	{
		// ask away
		LLNotifications::instance().add(params);
	}

}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:58,代码来源:llfloatersellland.cpp

示例15: setMediaType

void LLPanelLandMedia::setMediaType(const std::string& mime_type)
{
	LLParcel *parcel = mParcel->getParcel();
	if(parcel)
		parcel->setMediaType(mime_type);

	std::string media_key = LLMIMETypes::widgetType(mime_type);
	mMediaTypeCombo->setValue(media_key);
	childSetText("mime_type", mime_type);
}
开发者ID:Apelsin,项目名称:EffervescenceViewer,代码行数:10,代码来源:llpanellandmedia.cpp


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