void LLPanelProfile::onTabSelected(const LLSD& param) { std::string tab_name = param.asString(); if (NULL != getTabContainer()[tab_name]) { getTabContainer()[tab_name]->onOpen(getAvatarId()); } }
BOOL LLPanelMe::postBuild() { LLPanelProfile::postBuild(); getTabContainer()[PANEL_PROFILE]->childSetAction("edit_profile_btn", boost::bind(&LLPanelMe::onEditProfileClicked, this), this); getTabContainer()[PANEL_PROFILE]->childSetAction("edit_appearance_btn", boost::bind(&LLPanelMe::onEditAppearanceClicked, this), this); return TRUE; }
BOOL LLPanelProfile::postBuild() { mTabCtrl = getChild<LLTabContainer>("tabs"); getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2)); LLPanelPicks* panel_picks = getChild<LLPanelPicks>(PANEL_PICKS); panel_picks->setProfilePanel(this); getTabContainer()[PANEL_PICKS] = panel_picks; getTabContainer()[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE); return TRUE; }
BOOL LLPanelProfileView::postBuild() { LLPanelProfile::postBuild(); getTabContainer()[PANEL_NOTES] = getChild<LLPanelAvatarNotes>(PANEL_NOTES); //*TODO remove this, according to style guide we don't use status combobox getTabContainer()[PANEL_PROFILE]->childSetVisible("online_me_status_text", FALSE); getTabContainer()[PANEL_PROFILE]->childSetVisible("status_combo", FALSE); mStatusText = getChild<LLTextBox>("status"); mStatusText->setVisible(false); childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL); return TRUE; }
BOOL LLPanelProfile::postBuild() { LLPanelPicks* panel_picks = findChild<LLPanelPicks>(PANEL_PICKS); panel_picks->setProfilePanel(this); getTabContainer()[PANEL_PICKS] = panel_picks; return TRUE; }
void LLPanelProfileView::onBackBtnClick() { // Set dummy value to make picks panel dirty, // This will make Picks reload on next open. getTabContainer()[PANEL_PICKS]->setValue(LLSD()); LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent()); if(parent) { parent->openPreviousPanel(); } }
void LLPanelProfile::onOpen(const LLSD& key) { // open the desired panel if (key.has("open_tab_name")) { getTabContainer()[PANEL_PICKS]->onClosePanel(); // onOpen from selected panel will be called from onTabSelected callback getTabCtrl()->selectTabByName(key["open_tab_name"]); } else { getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId()); } // support commands to open further pieces of UI if (key.has("show_tab_panel")) { std::string panel = key["show_tab_panel"].asString(); if (panel == "create_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewClassified(); } } else if (panel == "classified_details") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedInfo(params); } } } }
void LLPanelProfile::onOpen(const LLSD& key) { getTabContainer()[PANEL_PICKS]->onOpen(getAvatarId()); // support commands to open further pieces of UI if (key.has("show_tab_panel")) { std::string panel = key["show_tab_panel"].asString(); if (panel == "create_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewClassified(); } } else if (panel == "classified_details") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedInfo(params); } } else if (panel == "edit_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedEdit(params); } } else if (panel == "create_pick") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewPick(); } } else if (panel == "edit_pick") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openPickEdit(params); } } } }