void LLObjectBackup::updateImportNumbers() { std::stringstream sstr; LLUICtrl* ctrl = getChild<LLUICtrl>("name_label"); if (mRetexture) { sstr << " Textures uploads remaining : " << mTexturesList.size() << "\n"; ctrl->setValue(LLSD("Text") = sstr.str()); } else { sstr << " Textures uploads N/A \n"; ctrl->setValue(LLSD("Text") = sstr.str()); } sstr << " Objects " << mCurObject << "/" << mObjects << "\n"; ctrl->setValue(LLSD("Text") = sstr.str()); sstr << " Rez "<< mRezCount << "/" << mPrims; ctrl->setValue(LLSD("Text") = sstr.str()); sstr << " Build " << mCurPrim << "/" << mPrims; ctrl->setValue(LLSD("Text") = sstr.str()); }
// static bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type) { LLUICtrl* ctrl = handle.get(); if (ctrl) { if (type == "value") { ctrl->setValue(newvalue); return true; } else if (type == "enabled") { ctrl->setEnabled(newvalue.asBoolean()); return true; } else if(type =="disabled") { ctrl->setEnabled(!newvalue.asBoolean()); return true; } else if (type == "visible") { ctrl->setVisible(newvalue.asBoolean()); return true; } else if (type == "invisible") { ctrl->setVisible(!newvalue.asBoolean()); return true; } } return false; }
void LLPanel::childSetValue(const std::string& id, LLSD value) { LLUICtrl* child = findChild<LLUICtrl>(id); if (child) { child->setValue(value); } }
void LLObjectBackup::updateExportNumbers() { std::stringstream sstr; LLUICtrl* ctrl = getChild<LLUICtrl>("name_label"); sstr << "Export Progress \n"; sstr << "Remaining Textures " << mTexturesList.size() << "\n"; ctrl->setValue(LLSD("Text") = sstr.str()); }
BOOL LLFloaterAutoReplaceSettings::postBuild(void) { // get copies of the current settings that we will operate on mEnabled = gSavedSettings.getBOOL("AutoReplace"); LL_DEBUGS("AutoReplace") << ( mEnabled ? "enabled" : "disabled") << LL_ENDL; mSettings = LLAutoReplace::getInstance()->getSettings(); // global checkbox for whether or not autoreplace is active LLUICtrl* enabledCheckbox = getChild<LLUICtrl>("autoreplace_enable"); enabledCheckbox->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onAutoReplaceToggled, this)); enabledCheckbox->setValue(LLSD(mEnabled)); // top row list creation and deletion getChild<LLUICtrl>("autoreplace_import_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onImportList,this)); getChild<LLUICtrl>("autoreplace_export_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onExportList,this)); getChild<LLUICtrl>("autoreplace_new_list")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onNewList,this)); getChild<LLUICtrl>("autoreplace_delete_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteList,this)); // the list of keyword->replacement lists mListNames = getChild<LLScrollListCtrl>("autoreplace_list_name"); mListNames->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectList, this)); mListNames->setCommitOnSelectionChange(true); // list ordering getChild<LLUICtrl>("autoreplace_list_up")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onListUp,this)); getChild<LLUICtrl>("autoreplace_list_down")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onListDown,this)); // keyword->replacement entry add / delete getChild<LLUICtrl>("autoreplace_add_entry")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onAddEntry,this)); getChild<LLUICtrl>("autoreplace_delete_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteEntry,this)); // entry edits mKeyword = getChild<LLLineEditor>("autoreplace_keyword"); mReplacement = getChild<LLLineEditor>("autoreplace_replacement"); getChild<LLUICtrl>("autoreplace_save_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveEntry, this)); // dialog termination ( Save Changes / Cancel ) getChild<LLUICtrl>("autoreplace_save_changes")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveChanges, this)); getChild<LLUICtrl>("autoreplace_cancel")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::close, this, false)); // the list of keyword->replacement pairs mReplacementsList = getChild<LLScrollListCtrl>("autoreplace_list_replacements"); mReplacementsList->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectEntry, this)); mReplacementsList->setCommitOnSelectionChange(true); center(); mSelectedListName.clear(); updateListNames(); updateListNamesControls(); updateReplacementsList(); return true; }
void LLMakeOutfitDialog::refresh() { bool fUseOutfits = getUseOutfits(); for (S32 idxType = 0; idxType < LLWearableType::WT_COUNT; idxType++) { LLWearableType::EType wtType = (LLWearableType::EType)idxType; if (LLAssetType::AT_BODYPART != LLWearableType::getAssetType(wtType)) continue; LLUICtrl* pCheckCtrl = getChild<LLUICtrl>(std::string("checkbox_") + LLWearableType::getTypeLabel(wtType)); if (!pCheckCtrl) continue; pCheckCtrl->setEnabled(!fUseOutfits); if (fUseOutfits) pCheckCtrl->setValue(true); } childSetEnabled("checkbox_use_links", !fUseOutfits); }