本文整理汇总了C++中LLRadioGroup类的典型用法代码示例。如果您正苦于以下问题:C++ LLRadioGroup类的具体用法?C++ LLRadioGroup怎么用?C++ LLRadioGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLRadioGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickButton
// static
void LLRadioGroup::onClickButton(LLUICtrl* ui_ctrl, void* userdata)
{
// llinfos << "LLRadioGroup::onClickButton" << llendl;
LLRadioCtrl* clickedRadio = (LLRadioCtrl*) ui_ctrl;
LLRadioGroup* self = (LLRadioGroup*) userdata;
S32 counter = 0;
for (button_list_t::iterator iter = self->mRadioButtons.begin();
iter != self->mRadioButtons.end(); ++iter)
{
LLRadioCtrl* radio = *iter;
if (radio == clickedRadio)
{
// llinfos << "clicked button " << counter << llendl;
self->setSelectedIndex(counter);
self->setControlValue(counter);
// BUG: Calls click callback even if button didn't actually change
self->onCommit();
return;
}
counter++;
}
llwarns << "LLRadioGroup::onClickButton - clicked button that isn't a child" << llendl;
}
示例2: refresh
void ImpPrefsFonts::refresh()
{
LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts");
if (fonts)
{
fonts->setValue( gSavedSettings.getString("FontChoice") );
}
}
示例3: onSocksAuthChanged
// static
void LLPanelNetwork::onSocksAuthChanged(LLUICtrl* ctrl, void* data)
{
LLRadioGroup* radio = static_cast<LLRadioGroup*>(ctrl);
LLPanelNetwork* self = static_cast<LLPanelNetwork*>(data);
sSocksSettingsChanged = true;
std::string selection = radio->getValue().asString();
updateProxyEnabled(self, true, selection);
}
示例4: apply
void ImpPrefsFonts::apply()
{
LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts");
if (fonts)
{
std::string font_choice = fonts->getValue().asString();
if (font_choice != gSavedSettings.getString("FontChoice") &&
!font_choice.empty())
{
gSavedSettings.setString("FontChoice", font_choice);
LLNotifications::instance().add("ChangeFont");
refresh();
}
}
}
示例5: setAllSaleInfo
void LLPanelPermissions::setAllSaleInfo()
{
llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl;
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT;
LLStringUtil::format_map_t argsCurrency;
argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale");
// Set the sale type if the object(s) are for sale.
if(checkPurchase && checkPurchase->get())
{
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
if(RadioSaleType)
{
switch(RadioSaleType->getSelectedIndex())
{
case 0:
sale_type = LLSaleInfo::FS_ORIGINAL;
break;
case 1:
sale_type = LLSaleInfo::FS_COPY;
break;
case 2:
sale_type = LLSaleInfo::FS_CONTENTS;
break;
default:
sale_type = LLSaleInfo::FS_COPY;
break;
}
}
}
S32 price = -1;
LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost");
if (editPrice)
{
// Don't extract the price if it's labeled as MIXED or is empty.
const std::string& editPriceString = editPrice->getText();
if (editPriceString != getString("Cost Mixed", argsCurrency) &&
!editPriceString.empty())
{
price = atoi(editPriceString.c_str());
}
else
{
price = DEFAULT_PRICE;
}
}
// If somehow an invalid price, turn the sale off.
if (price < 0)
sale_type = LLSaleInfo::FS_NOT;
// Force the sale price of not-for-sale items to DEFAULT_PRICE.
if (sale_type == LLSaleInfo::FS_NOT)
{
price = DEFAULT_PRICE;
}
// Pack up the sale info and send the update.
LLSaleInfo sale_info(sale_type, price);
LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info);
// If turned off for-sale, make sure click-action buy is turned
// off as well
if (sale_type == LLSaleInfo::FS_NOT)
{
U8 click_action = 0;
LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
if (click_action == CLICK_ACTION_BUY)
{
LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH);
}
}
}
示例6: sale_info
void LLFloaterProperties::updateSaleInfo()
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)findItem();
if(!item) return;
LLSaleInfo sale_info(item->getSaleInfo());
if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE))
{
getChild<LLUICtrl>("CheckPurchase")->setValue(LLSD((BOOL)FALSE));
}
if((BOOL)getChild<LLUICtrl>("CheckPurchase")->getValue())
{
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if(RadioSaleType)
{
switch (RadioSaleType->getSelectedIndex())
{
case 0:
sale_type = LLSaleInfo::FS_ORIGINAL;
break;
case 1:
sale_type = LLSaleInfo::FS_COPY;
break;
case 2:
sale_type = LLSaleInfo::FS_CONTENTS;
break;
default:
sale_type = LLSaleInfo::FS_COPY;
break;
}
}
if (sale_type == LLSaleInfo::FS_COPY
&& !gAgent.allowOperation(PERM_COPY, item->getPermissions(),
GP_OBJECT_SET_SALE))
{
sale_type = LLSaleInfo::FS_ORIGINAL;
}
S32 price = -1;
price = getChild<LLUICtrl>("Edit Cost")->getValue().asInteger();;
// Invalid data - turn off the sale
if (price < 0)
{
sale_type = LLSaleInfo::FS_NOT;
price = 0;
}
sale_info.setSaleType(sale_type);
sale_info.setSalePrice(price);
}
else
{
sale_info.setSaleType(LLSaleInfo::FS_NOT);
}
if(sale_info != item->getSaleInfo()
&& item->isFinished())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
// Force an update on the sale price at rez
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = new_item->getFlags();
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
new_item->setFlags(flags);
}
new_item->setSaleInfo(sale_info);
if(mObjectID.isNull())
{
// This is in the agent's inventory.
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
else
{
// This is in an object's contents.
LLViewerObject* object = gObjectList.findObject(mObjectID);
if(object)
{
object->updateInventory(
new_item,
TASK_INVENTORY_ITEM_KEY,
false);
}
}
}
else
{
// need to make sure we don't just follow the click
refresh();
}
//.........这里部分代码省略.........
示例7: getChildView
//.........这里部分代码省略.........
{
getChildView("CheckShareWithGroup")->setEnabled(FALSE);
getChildView("CheckEveryoneCopy")->setEnabled(FALSE);
}
// Set values.
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE;
BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE;
if (is_group_copy && is_group_modify && is_group_move)
{
getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else
{
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(TRUE);
ctl->set(TRUE);
}
}
getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY)));
///////////////
// SALE INFO //
///////////////
const LLSaleInfo& sale_info = item->getSaleInfo();
BOOL is_for_sale = sale_info.isForSale();
// Check for ability to change values.
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
{
getChildView("SaleLabel")->setEnabled(is_complete);
getChildView("CheckPurchase")->setEnabled(is_complete);
getChildView("NextOwnerLabel")->setEnabled(TRUE);
getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale);
getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
}
else
{
getChildView("SaleLabel")->setEnabled(FALSE);
getChildView("CheckPurchase")->setEnabled(FALSE);
getChildView("NextOwnerLabel")->setEnabled(FALSE);
getChildView("CheckNextOwnerModify")->setEnabled(FALSE);
getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
getChildView("RadioSaleType")->setEnabled(FALSE);
getChildView("TextPrice")->setEnabled(FALSE);
getChildView("Edit Cost")->setEnabled(FALSE);
}
// Set values.
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
getChildView("combobox sale copy")->setEnabled(is_for_sale);
getChildView("Edit Cost")->setEnabled(is_for_sale);
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if (is_for_sale)
{
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
}
else
{
radioSaleType->setSelectedIndex(-1);
getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
}
}
示例8: childSetValue
void LLPrefsAscentSysImpl::refresh()
{
//General -----------------------------------------------------------------------------
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
childSetValue("center_after_teleport_check", mResetCameraAfterTP);
childSetValue("offset_teleport_check", mOffsetTPByUserHeight);
childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld);
childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono);
childSetValue("always_rez_in_group_check", mAlwaysRezInGroup);
//Disable Teleport Progress
//Disable Logout progress
//always show Build
childSetValue("always_fly_check", mAlwaysShowFly);
//Disable camera minimum distance
//Chat --------------------------------------------------------------------------------
childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat);
childSetValue("play_typing_sound_check", mPlayTypingSound);
childSetValue("hide_typing_check", mHideTypingNotification);
childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs);
childSetValue("allow_mu_pose_check", mEnableMUPose);
childSetValue("close_ooc_check", mEnableOOCAutoClose);
LLRadioGroup* radioLinkOptions = getChild<LLRadioGroup>("objects_link");
radioLinkOptions->selectNthItem(mLinksForChattingObjects);
//childSetValue("objects_link", mLinksForChattingObjects);
std::string format = gSavedSettings.getString("ShortTimeFormat");
if (format.find("%p") == -1)
{
mTimeFormat = 0;
}
else
{
mTimeFormat = 1;
}
format = gSavedSettings.getString("ShortDateFormat");
if (format.find("%m/%d/%") != -1)
{
mDateFormat = 2;
}
else if (format.find("%d/%m/%") != -1)
{
mDateFormat = 1;
}
else
{
mDateFormat = 0;
}
// time format combobox
LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
if (combo)
{
combo->setCurrentByIndex(mTimeFormat);
}
// date format combobox
combo = getChild<LLComboBox>("date_format_combobox");
if (combo)
{
combo->setCurrentByIndex(mDateFormat);
}
childSetValue("seconds_in_chat_and_ims_check", mEnableOOCAutoClose);
//Save Performance --------------------------------------------------------------------
childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin);
childSetValue("enable_wind", mEnableLLWind);
childSetValue("enable_clouds", mEnableClouds);
childSetValue("speed_rez_check", mSpeedRez);
if (mSpeedRez)
{
childEnable("speed_rez_interval");
childEnable("speed_rez_seconds");
}
else
{
childDisable("speed_rez_interval");
childDisable("speed_rez_seconds");
}
//Command Line ------------------------------------------------------------------------
//Privacy -----------------------------------------------------------------------------
childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects);
childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam);
childSetValue("private_look_at_check", mPrivateLookAt);
childSetValue("show_look_at_check", mShowLookAt);
childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp);
}
示例9: llassert
//.........这里部分代码省略.........
{
childSetEnabled("CheckShareWithGroup",FALSE);
childSetEnabled("CheckEveryoneCopy",FALSE);
}
// Set values.
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE;
BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE;
if (is_group_copy && is_group_modify && is_group_move)
{
childSetValue("CheckShareWithGroup",LLSD((BOOL)TRUE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
childSetValue("CheckShareWithGroup",LLSD((BOOL)FALSE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else
{
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(TRUE);
ctl->set(TRUE);
}
}
childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
///////////////
// SALE INFO //
///////////////
const LLSaleInfo& sale_info = item->getSaleInfo();
BOOL is_for_sale = sale_info.isForSale();
// Check for ability to change values.
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
{
childSetEnabled("SaleLabel",is_complete);
childSetEnabled("CheckPurchase",is_complete);
childSetEnabled("NextOwnerLabel",TRUE);
childSetEnabled("CheckNextOwnerModify",(base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions);
childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
childSetEnabled("RadioSaleType",is_complete && is_for_sale);
childSetEnabled("TextPrice",is_complete && is_for_sale);
childSetEnabled("Edit Cost",is_complete && is_for_sale);
}
else
{
childSetEnabled("SaleLabel",FALSE);
childSetEnabled("CheckPurchase",FALSE);
childSetEnabled("NextOwnerLabel",FALSE);
childSetEnabled("CheckNextOwnerModify",FALSE);
childSetEnabled("CheckNextOwnerCopy",FALSE);
childSetEnabled("CheckNextOwnerTransfer",FALSE);
childSetEnabled("RadioSaleType",FALSE);
childSetEnabled("TextPrice",FALSE);
childSetEnabled("Edit Cost",FALSE);
}
// Set values.
childSetValue("CheckPurchase", is_for_sale);
childSetEnabled("combobox sale copy", is_for_sale);
childSetEnabled("Edit Cost", is_for_sale);
childSetValue("CheckNextOwnerModify",LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
childSetValue("CheckNextOwnerCopy",LLSD(BOOL(next_owner_mask & PERM_COPY)));
childSetValue("CheckNextOwnerTransfer",LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if (is_for_sale)
{
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
childSetText("Edit Cost",llformat("%d",numerical_price));
}
else
{
radioSaleType->setSelectedIndex(-1);
childSetText("Edit Cost",llformat("%d",0));
}
}
示例10: childSetText
//.........这里部分代码省略.........
}
else
{
childSetEnabled("CheckShareWithGroup",FALSE);
childSetEnabled("CheckEveryoneCopy",FALSE);
}
// Set values.
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE;
BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE;
if (is_group_copy && is_group_modify && is_group_move)
{
childSetValue("CheckShareWithGroup",LLSD((BOOL)TRUE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
childSetValue("CheckShareWithGroup",LLSD((BOOL)FALSE));
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(FALSE);
}
}
else
{
LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
if(ctl)
{
ctl->setTentative(TRUE);
ctl->set(TRUE);
}
}
childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
///////////////
// SALE INFO //
///////////////
const LLSaleInfo& sale_info = item->getSaleInfo();
BOOL is_for_sale = sale_info.isForSale();
// Check for ability to change values.
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
{
childSetEnabled("SaleLabel",is_complete);
childSetEnabled("CheckPurchase",is_complete);
childSetEnabled("NextOwnerLabel",TRUE);
childSetEnabled("CheckNextOwnerModify",base_mask & PERM_MODIFY);
childSetEnabled("CheckNextOwnerCopy",base_mask & PERM_COPY);
childSetEnabled("CheckNextOwnerTransfer",next_owner_mask & PERM_COPY);
childSetEnabled("RadioSaleType",is_complete && is_for_sale);
childSetEnabled("TextPrice",is_complete && is_for_sale);
childSetEnabled("EditPrice",is_complete && is_for_sale);
}
else
{
childSetEnabled("SaleLabel",FALSE);
childSetEnabled("CheckPurchase",FALSE);
childSetEnabled("NextOwnerLabel",FALSE);
childSetEnabled("CheckNextOwnerModify",FALSE);
childSetEnabled("CheckNextOwnerCopy",FALSE);
childSetEnabled("CheckNextOwnerTransfer",FALSE);
childSetEnabled("RadioSaleType",FALSE);
childSetEnabled("TextPrice",FALSE);
childSetEnabled("EditPrice",FALSE);
}
// Set values.
childSetValue("CheckPurchase", is_for_sale);
childSetValue("CheckNextOwnerModify",LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
childSetValue("CheckNextOwnerCopy",LLSD(BOOL(next_owner_mask & PERM_COPY)));
childSetValue("CheckNextOwnerTransfer",LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if (is_for_sale)
{
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
childSetText("EditPrice",llformat("%d",numerical_price));
}
else
{
radioSaleType->setSelectedIndex(-1);
childSetText("EditPrice",llformat("%d",0));
}
}
示例11: childSetValue
void LLPrefsAscentSysImpl::refresh()
{
//General -----------------------------------------------------------------------------
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
childSetValue("center_after_teleport_check", mResetCameraAfterTP);
childSetEnabled("center_after_teleport_check", mDoubleClickTeleport);
childSetValue("offset_teleport_check", mOffsetTPByUserHeight);
childSetEnabled("offset_teleport_check", mDoubleClickTeleport);
childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld);
childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono);
childSetValue("always_rez_in_group_check", mAlwaysRezInGroup);
//Disable Teleport Progress
//Disable Logout progress
//always show Build
childSetValue("always_fly_check", mAlwaysShowFly);
//Disable camera minimum distance
childSetValue("power_user_check", mPowerUser);
childSetValue("power_user_confirm_check", mPowerUser);
childSetValue("system_folder_check", mUseSystemFolder);
childSetValue("temp_in_system_check", mUploadToSystem);
childSetEnabled("temp_in_system_check", mUseSystemFolder);
//Chat --------------------------------------------------------------------------------
childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat);
childSetValue("play_typing_sound_check", mPlayTypingSound);
childSetValue("hide_typing_check", mHideTypingNotification);
childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs);
childSetValue("allow_mu_pose_check", mEnableMUPose);
childSetValue("close_ooc_check", mEnableOOCAutoClose);
LLRadioGroup* radioLinkOptions = getChild<LLRadioGroup>("objects_link");
radioLinkOptions->selectNthItem(mLinksForChattingObjects);
//childSetValue("objects_link", mLinksForChattingObjects);
std::string format = gSavedSettings.getString("ShortTimeFormat");
if (format.find("%p") == -1)
{
mTimeFormat = 0;
}
else
{
mTimeFormat = 1;
}
format = gSavedSettings.getString("ShortDateFormat");
if (format.find("%m/%d/%") != -1)
{
mDateFormat = 2;
}
else if (format.find("%d/%m/%") != -1)
{
mDateFormat = 1;
}
else
{
mDateFormat = 0;
}
// time format combobox
LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
if (combo)
{
combo->setCurrentByIndex(mTimeFormat);
}
// date format combobox
combo = getChild<LLComboBox>("date_format_combobox");
if (combo)
{
combo->setCurrentByIndex(mDateFormat);
}
childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs);
LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") );
LLWStringUtil::replaceChar(auto_response, '^', '\n');
LLWStringUtil::replaceChar(auto_response, '%', ' ');
childSetText("im_response", wstring_to_utf8str(auto_response));
childSetValue("AscentInstantMessageResponseFriends", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends"));
childSetValue("AscentInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted"));
childSetValue("AscentInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone"));
childSetValue("AscentInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded"));
childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming"));
childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat" ));
childSetValue("AscentInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem"));
//Save Performance --------------------------------------------------------------------
childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin);
childSetValue("enable_wind", mEnableLLWind);
childSetValue("enable_clouds", mEnableClouds);
childSetValue("enable_classic_clouds", mEnableClassicClouds);
gLLWindEnabled = mEnableLLWind;
childSetValue("speed_rez_check", mSpeedRez);
childSetEnabled("speed_rez_interval", mSpeedRez);
childSetEnabled("speed_rez_seconds", mSpeedRez);
//Command Line ------------------------------------------------------------------------
//Privacy -----------------------------------------------------------------------------
childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects);
childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam);
childSetValue("private_look_at_check", mPrivateLookAt);
//.........这里部分代码省略.........
示例12: getString
//.........这里部分代码省略.........
getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( FALSE);
}
else
{
getChild<LLUICtrl>("checkbox next owner can modify")->setValue(TRUE);
getChild<LLUICtrl>("checkbox next owner can modify")->setTentative( TRUE);
}
// Copy == next owner cannot copy
if (next_owner_mask_on & PERM_COPY)
{
getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( !can_copy);
}
else if (next_owner_mask_off & PERM_COPY)
{
getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( FALSE);
}
else
{
getChild<LLUICtrl>("checkbox next owner can copy")->setValue(TRUE);
getChild<LLUICtrl>("checkbox next owner can copy")->setTentative( TRUE);
}
// Transfer == next owner cannot transfer
if (next_owner_mask_on & PERM_TRANSFER)
{
getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( !can_transfer);
}
else if (next_owner_mask_off & PERM_TRANSFER)
{
getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( FALSE);
}
else
{
getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(TRUE);
getChild<LLUICtrl>("checkbox next owner can transfer")->setTentative( TRUE);
}
}
// reflect sale information
LLSaleInfo sale_info;
BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
LLSaleInfo::EForSale sale_type = sale_info.getSaleType();
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
if(RadioSaleType)
{
if (valid_sale_info)
{
RadioSaleType->setSelectedIndex((S32)sale_type - 1);
RadioSaleType->setTentative(FALSE); // unfortunately this doesn't do anything at the moment.
}
else
{
// default option is sell copy, determined to be safest
RadioSaleType->setSelectedIndex((S32)LLSaleInfo::FS_COPY - 1);
RadioSaleType->setTentative(TRUE); // unfortunately this doesn't do anything at the moment.
}
}
getChild<LLUICtrl>("checkbox for sale")->setValue((num_for_sale != 0));
// HACK: There are some old objects in world that are set for sale,
// but are no-transfer. We need to let users turn for-sale off, but only
// if for-sale is set.
bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY);
if (cannot_actually_sell)
{
if (num_for_sale && has_change_sale_ability)
{
getChildView("checkbox for sale")->setEnabled(true);
}
}
// Check search status of objects
const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
bool include_in_search;
const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search);
getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume);
getChild<LLUICtrl>("search_check")->setValue(include_in_search);
getChild<LLUICtrl>("search_check")->setTentative( !all_include_in_search);
// Click action (touch, sit, buy)
U8 click_action = 0;
if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action))
{
LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction");
if(combo_click_action)
{
combo_click_action->setCurrentByIndex((S32)click_action);
}
}
getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
}
示例13: getChildView
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);
}
示例14: getString
void LLPanelPermissions::refresh()
{
LLStringUtil::format_map_t argsCurrency;
argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
LLButton* BtnDeedToGroup = getChild<LLButton>("button deed");
if(BtnDeedToGroup)
{
std::string deedText;
if (gSavedSettings.getWarning("DeedObject"))
{
deedText = getString("text deed continued");
}
else
{
deedText = getString("text deed");
}
BtnDeedToGroup->setLabelSelected(deedText);
BtnDeedToGroup->setLabelUnselected(deedText);
}
BOOL root_selected = TRUE;
LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
if(!nodep || 0 == object_count)
{
nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode();
object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
root_selected = FALSE;
}
//BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment();
//attachment_selected = false;
LLViewerObject* objectp = NULL;
if(nodep) objectp = nodep->getObject();
if(!nodep || !objectp)// || attachment_selected)
{
// ...nothing selected
childSetEnabled("perm_modify",false);
childSetText("perm_modify",LLStringUtil::null);
childSetEnabled("Creator:",false);
childSetText("Creator Name",LLStringUtil::null);
childSetEnabled("Creator Name",false);
childSetEnabled("button creator profile",false);
childSetEnabled("Owner:",false);
childSetText("Owner Name",LLStringUtil::null);
childSetEnabled("Owner Name",false);
childSetEnabled("button owner profile",false);
childSetEnabled("Last Owner:",false);
childSetText("Last Owner Name",LLStringUtil::null);
childSetEnabled("Last Owner Name",false);
childSetEnabled("button last owner profile",false);
childSetEnabled("Group:",false);
childSetText("Group Name",LLStringUtil::null);
childSetEnabled("Group Name",false);
childSetEnabled("button set group",false);
childSetText("Object Name",LLStringUtil::null);
childSetEnabled("Object Name",false);
childSetEnabled("Name:",false);
childSetText("Group Name",LLStringUtil::null);
childSetEnabled("Group Name",false);
childSetEnabled("Description:",false);
childSetText("Object Description",LLStringUtil::null);
childSetEnabled("Object Description",false);
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)
{
//.........这里部分代码省略.........
示例15: 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();
}