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


C++ LLRadioGroup::setEnabled方法代码示例

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


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

示例1: refreshEnabledState

void LLFloaterPreference::refreshEnabledState()
{	
	LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
	LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
	
	// Reflections
	BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable") 
		&& gGLManager.mHasCubeMap
		&& LLCubeMap::sUseCubeMaps;
	ctrl_reflections->setEnabled(reflections);
	
	// Bump & Shiny	
	bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
	getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE);
	
	radio_reflection_detail->setEnabled(ctrl_reflections->get() && reflections);
	
	// Avatar Mode
	// Enable Avatar Shaders
	LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
	// Avatar Render Mode
	LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");

	S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
	ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE);
	
	if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE || 
		gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
	{
		ctrl_avatar_cloth->setEnabled(false);
	} 
	else
	{
		ctrl_avatar_cloth->setEnabled(true);
	}
	
	// Vertex Shaders
	// Global Shader Enable
	LLCheckBoxCtrl* ctrl_shader_enable   = getChild<LLCheckBoxCtrl>("BasicShaders");
	// radio set for terrain detail mode
	LLRadioGroup*   mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio");   // can be linked with control var

	ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
	
	BOOL shaders = ctrl_shader_enable->get();
	if (shaders)
	{
		mRadioTerrainDetail->setValue(1);
		mRadioTerrainDetail->setEnabled(FALSE);
	}
	else
	{
		mRadioTerrainDetail->setEnabled(TRUE);		
	}
	
	// WindLight
	LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
	
	// *HACK just checks to see if we can use shaders... 
	// maybe some cards that use shaders, but don't support windlight
	ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
	// now turn off any features that are unavailable
	disableUnavailableSettings();
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:64,代码来源:llfloaterpreference.cpp

示例2: refresh


//.........这里部分代码省略.........

		childSetEnabled("Permissions:",false);
		
		childSetValue("checkbox share with group",FALSE);
		childSetEnabled("checkbox share with group",false);
		childSetEnabled("button deed",false);

		childSetValue("checkbox allow everyone move",FALSE);
		childSetEnabled("checkbox allow everyone move",false);
		childSetValue("checkbox allow everyone copy",FALSE);
		childSetEnabled("checkbox allow everyone copy",false);

		//Next owner can:
		childSetEnabled("Next owner can:",false);
		childSetValue("checkbox next owner can modify",FALSE);
		childSetEnabled("checkbox next owner can modify",false);
		childSetValue("checkbox next owner can copy",FALSE);
		childSetEnabled("checkbox next owner can copy",false);
		childSetValue("checkbox next owner can transfer",FALSE);
		childSetEnabled("checkbox next owner can transfer",false);

		//checkbox for sale
		childSetValue("checkbox for sale",FALSE);
		childSetEnabled("checkbox for sale",false);

		//checkbox include in search
		childSetValue("search_check", FALSE);
		childSetEnabled("search_check", false);
		
		LLRadioGroup*	RadioSaleType = getChild<LLRadioGroup>("sale type");
		if(RadioSaleType)
		{
			RadioSaleType->setSelectedIndex(-1);
			RadioSaleType->setEnabled(FALSE);
		}
		
		childSetEnabled("Cost",false);
		childSetText("Cost", getString("Cost Default", argsCurrency));
		childSetText("Edit Cost",LLStringUtil::null);
		childSetEnabled("Edit Cost",false);
		
		childSetEnabled("label click action",false);
		LLComboBox*	ComboClickAction = getChild<LLComboBox>("clickaction");
		if(ComboClickAction)
		{
			ComboClickAction->setEnabled(FALSE);
			ComboClickAction->clear();
		}
		childSetVisible("B:",false);
		childSetVisible("O:",false);
		childSetVisible("G:",false);
		childSetVisible("E:",false);
		childSetVisible("N:",false);
		childSetVisible("F:",false);

		return;
	}

	// figure out a few variables
	BOOL is_one_object = (object_count == 1);

	// BUG: fails if a root and non-root are both single-selected.
	BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() 
							&& LLSelectMgr::getInstance()->selectGetRootsModify()) 
							|| LLSelectMgr::getInstance()->selectGetModify();
	const LLView* keyboard_focus_view = gFocusMgr.getKeyboardFocus();
开发者ID:PhoenixDesmoulins,项目名称:imprudence,代码行数:67,代码来源:llpanelpermissions.cpp

示例3: disableAll

void LLPanelPermissions::disableAll()
{
	getChildView("perm_modify")->setEnabled(FALSE);
	getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null);

	getChildView("pathfinding_attributes_value")->setEnabled(FALSE);
	getChild<LLUICtrl>("pathfinding_attributes_value")->setValue(LLStringUtil::null);

	getChildView("Creator:")->setEnabled(FALSE);
	getChild<LLUICtrl>("Creator Name")->setValue(LLStringUtil::null);
	getChildView("Creator Name")->setEnabled(FALSE);
	getChildView("button creator profile")->setEnabled(FALSE);

	getChildView("Owner:")->setEnabled(FALSE);
	getChild<LLUICtrl>("Owner Name")->setValue(LLStringUtil::null);
	getChildView("Owner Name")->setEnabled(FALSE);
	getChildView("button owner profile")->setEnabled(FALSE);

	getChildView("Last Owner:")->setEnabled(FALSE);
	getChild<LLUICtrl>("Last Owner Name")->setValue(LLStringUtil::null);
	getChildView("Last Owner Name")->setEnabled(FALSE);
	getChildView("button last owner profile")->setEnabled(FALSE);
	
	getChildView("Group:")->setEnabled(FALSE);
	getChild<LLUICtrl>("Group Name Proxy")->setValue(LLStringUtil::null);
	getChildView("Group Name Proxy")->setEnabled(FALSE);
	getChildView("button set group")->setEnabled(FALSE);
	getChildView("button open group")->setEnabled(FALSE);

	LLLineEditor* ed = getChild<LLLineEditor>("Object Name");
	ed->setValue(LLStringUtil::null);
	ed->setEnabled(FALSE);
	ed->setLabel(LLStringUtil::null);
	getChildView("Name:")->setEnabled(FALSE);
	//getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
	//getChildView("Group Name")->setEnabled(FALSE);
	getChildView("Description:")->setEnabled(FALSE);
	ed = getChild<LLLineEditor>("Object Description");
	ed->setEnabled(FALSE);
	ed->setValue(LLStringUtil::null);
	ed->setLabel(LLStringUtil::null);

	getChildView("Permissions:")->setEnabled(FALSE);
		
	getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
	getChildView("checkbox share with group")->setEnabled(FALSE);
	getChildView("button deed")->setEnabled(FALSE);

	getChildView("text anyone can")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
	getChildView("checkbox allow everyone move")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
	getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox allow export")->setValue(FALSE);
	getChildView("checkbox allow export")->setEnabled(FALSE);
 
	//Next owner can:
	getChildView("Next owner can:")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
	getChildView("checkbox next owner can modify")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
	getChildView("checkbox next owner can copy")->setEnabled(FALSE);
	getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
	getChildView("checkbox next owner can transfer")->setEnabled(FALSE);

	//checkbox for sale
	getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE);
	getChildView("checkbox for sale")->setEnabled(FALSE);

	//checkbox include in search
	getChild<LLUICtrl>("search_check")->setValue(FALSE);
	getChildView("search_check")->setEnabled(FALSE);

		
	LLRadioGroup*	RadioSaleType = getChild<LLRadioGroup>("sale type");
	if(RadioSaleType)
	{
		RadioSaleType->setSelectedIndex(-1);
		RadioSaleType->setEnabled(FALSE);
	}
		
	getChildView("Cost")->setEnabled(FALSE);
	getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
	getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
	getChildView("Edit Cost")->setEnabled(FALSE);
		
	getChildView("label click action")->setEnabled(FALSE);
	LLComboBox*	combo_click_action = getChild<LLComboBox>("clickaction");
	if (combo_click_action)
	{
		combo_click_action->setEnabled(FALSE);
		combo_click_action->clear();
	}
	getChildView("B:")->setVisible(								FALSE);
	//getChildView("O:")->setVisible(								FALSE);
	getChildView("G:")->setVisible(								FALSE);
	getChildView("E:")->setVisible(								FALSE);
	getChildView("N:")->setVisible(								FALSE);
	getChildView("F:")->setVisible(								FALSE);
}
开发者ID:SimFederal,项目名称:SingularityViewer,代码行数:100,代码来源:llpanelpermissions.cpp


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