/*virtual*/ void LLPanelProfileView::onOpen(const LLSD& key) { LLUUID id; if(key.has("id")) { id = key["id"]; } if(id.notNull() && getAvatarId() != id) { setAvatarId(id); getChild<LLUICtrl>("agent_id")->setValue(id); // S21 // clear name fields, which might have old data getChild<LLUICtrl>("user_name")->setValue( LLSD() ); getChild<LLUICtrl>("user_slid")->setValue( LLSD() ); } // Update the avatar name. LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2)); updateOnlineStatus(); LLPanelProfile::onOpen(key); }
void LLPanelPickInfo::onOpen(const LLSD& key) { LLUUID avatar_id = key["avatar_id"]; if(avatar_id.isNull()) { return; } if(getAvatarId().notNull()) { LLAvatarPropertiesProcessor::getInstance()->removeObserver( getAvatarId(), this); } setAvatarId(avatar_id); resetData(); resetControls(); setPickId(key["pick_id"]); setPickName(key["pick_name"]); setPickDesc(key["pick_desc"]); setSnapshotId(key["snapshot_id"]); LLAvatarPropertiesProcessor::getInstance()->addObserver( getAvatarId(), this); LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest( getAvatarId(), getPickId()); }
LLPanelMyProfileEdit::LLPanelMyProfileEdit() : LLPanelMyProfile() { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_edit_profile.xml"); setAvatarId(gAgent.getID()); }
LLPanelMyProfileEdit::LLPanelMyProfileEdit() : LLPanelMyProfile() { buildFromFile( "panel_edit_profile.xml"); setAvatarId(gAgent.getID()); LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this)); }
GameStorage::GameStorage(QObject *parent) : QObject(parent) { srand(time(0)); QSettings settings; this->m_uniqueId = settings.value("uniqueId", rand()).toInt(); settings.setValue("uniqueId", uniqueId()); setProfileName(settings.value("profileName", QString("Player %1").arg(uniqueId())).toString()); setAvatarId(settings.value("avatarId", QString("gomoku.jpg")).toString()); }
LLPanelAvatarTag::LLPanelAvatarTag(const LLUUID& key, const std::string im_time) : LLPanel() , mAvatarId(LLUUID::null) // , mFadeTimer() { buildFromFile( "panel_avatar_tag.xml"); setLeftButtonClickCallback(boost::bind(&LLPanelAvatarTag::onClick, this)); setAvatarId(key); setTime(im_time); }
void LLPanelPickEdit::onOpen(const LLSD& key) { LLUUID pick_id = key["pick_id"]; mNeedData = true; // creating new Pick if(pick_id.isNull()) { mNewPick = true; setAvatarId(gAgent.getID()); resetData(); resetControls(); setPosGlobal(gAgent.getPositionGlobal()); LLUUID parcel_id = LLUUID::null, snapshot_id = LLUUID::null; std::string pick_name, pick_desc, region_name; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if(parcel) { parcel_id = parcel->getID(); pick_name = parcel->getName(); pick_desc = parcel->getDesc(); snapshot_id = parcel->getSnapshotID(); } LLViewerRegion* region = gAgent.getRegion(); if(region) { region_name = region->getName(); } setParcelID(parcel_id); childSetValue("pick_name", pick_name.empty() ? region_name : pick_name); childSetValue("pick_desc", pick_desc); setSnapshotId(snapshot_id); setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal())); enableSaveButton(true); } // editing existing pick else { mNewPick = false; LLPanelPickInfo::onOpen(key); enableSaveButton(false); } resetDirty(); }
void LLPanelClassifiedInfo::onOpen(const LLSD& key) { LLUUID avatar_id = key["classified_creator_id"]; if(avatar_id.isNull()) { return; } if(getAvatarId().notNull()) { LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); } setAvatarId(avatar_id); resetData(); resetControls(); scrollToTop(); setClassifiedId(key["classified_id"]); setClassifiedName(key["classified_name"]); setDescription(key["classified_desc"]); setSnapshotId(key["classified_snapshot_id"]); setFromSearch(key["from_search"]); LL_INFOS() << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << LL_ENDL; LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough); // While we're at it let's get the stats from the new table if that // capability exists. std::string url = gAgent.getRegion()->getCapability("SearchStatRequest"); if (!url.empty()) { LL_INFOS() << "Classified stat request via capability" << LL_ENDL; LLSD body; body["classified_id"] = getClassifiedId(); LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(getClassifiedId())); } // Update classified click stats. // *TODO: Should we do this when opening not from search? sendClickMessage("profile"); setInfoLoaded(false); }
void LLPanelProfileTab::onOpen(const LLSD& key) { // Don't reset panel if we are opening it for same avatar. if(getAvatarId() != key.asUUID()) { resetControls(); resetData(); scrollToTop(); } // Update data even if we are viewing same avatar profile as some data might been changed. setAvatarId(key.asUUID()); updateData(); updateButtons(); }
void LLPanelClassifiedEdit::fillIn(const LLSD& key) { setAvatarId(gAgent.getID()); if(key.isUndefined()) { setPosGlobal(gAgent.getPositionGlobal()); LLUUID snapshot_id = LLUUID::null; std::string desc; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if(parcel) { desc = parcel->getDesc(); snapshot_id = parcel->getSnapshotID(); } std::string region_name = LLTrans::getString("ClassifiedUpdateAfterPublish"); LLViewerRegion* region = gAgent.getRegion(); if (region) { region_name = region->getName(); } getChild<LLUICtrl>("classified_name")->setValue(makeClassifiedName()); getChild<LLUICtrl>("classified_desc")->setValue(desc); setSnapshotId(snapshot_id); setClassifiedLocation(createLocationText(getLocationNotice(), region_name, getPosGlobal())); // server will set valid parcel id setParcelId(LLUUID::null); } else { setClassifiedId(key["classified_id"]); setClassifiedName(key["name"]); setDescription(key["desc"]); setSnapshotId(key["snapshot_id"]); setCategory((U32)key["category"].asInteger()); setContentType((U32)key["content_type"].asInteger()); setClassifiedLocation(key["location_text"]); getChild<LLUICtrl>("auto_renew")->setValue(key["auto_renew"]); getChild<LLUICtrl>("price_for_listing")->setValue(key["price_for_listing"].asInteger()); } }
/*virtual*/ void LLPanelProfileView::onOpen(const LLSD& key) { LLUUID id; if(key.has("id")) { id = key["id"]; } if(id.notNull() && getAvatarId() != id) { setAvatarId(id); } // Update the avatar name. gCacheName->get(getAvatarId(), FALSE, boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4)); updateOnlineStatus(); LLPanelProfile::onOpen(key); }
LLPanelMe::LLPanelMe(void) : LLPanelProfile() , mEditPanel(NULL) { setAvatarId(gAgent.getID()); }
LLPanelMe::LLPanelMe(void) : LLPanelProfile() { setAvatarId(gAgent.getID()); }