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


C++ LLControlVariable::getValue方法代码示例

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


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

示例1: getLLSD

LLSD LLControlGroup::getLLSD(const std::string& name)
{
	LLControlVariable* control = getControl(name);
	
	if (control && control->isType(TYPE_LLSD))
		return control->getValue();
	CONTROL_ERRS << "Invalid LLSD control " << name << llendl;
	return LLSD();
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:9,代码来源:llcontrol.cpp

示例2: getLoginURIs

void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const
{
	// return the login uri set on the command line.
	LLControlVariable* c = gSavedSettings.getControl("CmdLineLoginURI");
	if(c && !LLStartUp::shouldAutoLogin())
	{
		LLSD v = c->getValue();
		if(v.isArray())
		{
			for(LLSD::array_const_iterator itr = v.beginArray();
				itr != v.endArray(); ++itr)
			{
				std::string uri = itr->asString();
				if(!uri.empty())
				{
					uris.push_back(uri);
				}
			}
		}
		else
		{
			std::string uri = v.asString();
			if(!uri.empty())
			{
				uris.push_back(uri);
			}
		}
	}
	
	// If there was no command line uri...
	if(uris.empty())
	{
		uris.push_back(gHippoGridManager->getConnectedGrid()->getLoginUri());
		/*
		// If its a known grid choice, get the uri from the table,
		// else try the grid name.
		if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER)
		{
			uris.push_back(gGridInfo[mGridChoice].mLoginURI);
		}
		else
		{
			uris.push_back(mGridName);
		} */
	}
}
开发者ID:lilly,项目名称:imprudence,代码行数:46,代码来源:llviewernetwork.cpp

示例3: saveSettings

void LLPanelPreference::saveSettings()
{
	// Save the value of all controls in the hierarchy
	mSavedValues.clear();
	std::list<LLView*> view_stack;
	view_stack.push_back(this);
	while(!view_stack.empty())
	{
		// Process view on top of the stack
		LLView* curview = view_stack.front();
		view_stack.pop_front();

		LLColorSwatchCtrl* color_swatch = dynamic_cast<LLColorSwatchCtrl *>(curview);
		if (color_swatch)
		{
			mSavedColors[color_swatch->getName()] = color_swatch->get();
		}
		else
		{
			LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
			if (ctrl)
			{
				LLControlVariable* control = ctrl->getControlVariable();
				if (control)
				{
					mSavedValues[control] = control->getValue();
				}
			}
		}
			
		// Push children onto the end of the work stack
		for (child_list_t::const_iterator iter = curview->getChildList()->begin();
			 iter != curview->getChildList()->end(); ++iter)
		{
			view_stack.push_back(*iter);
		}
	}	
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:38,代码来源:llfloaterpreference.cpp


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