void LLPanelMainInventory::updateItemcountText() { // *TODO: Calling setlocale() on each frame may be inefficient. LLLocale locale(LLStringUtil::getLocale()); std::string item_count_string; LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); LLStringUtil::format_map_t string_args; string_args["[ITEM_COUNT]"] = item_count_string; string_args["[FILTER]"] = getFilterText(); std::string text = ""; if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()) { text = getString("ItemcountFetching", string_args); } else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched()) { text = getString("ItemcountCompleted", string_args); } else { text = getString("ItemcountUnknown"); } childSetText("ItemcountText",text); }
void LLPanelMainInventory::updateItemcountText() { LLLocale locale(LLLocale::USER_LOCALE); std::string item_count_string; LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); LLStringUtil::format_map_t string_args; string_args["[ITEM_COUNT]"] = item_count_string; string_args["[FILTER]"] = getFilterText(); std::string text = ""; if (LLInventoryModel::backgroundFetchActive()) { text = getString("ItemcountFetching", string_args); } else if (LLInventoryModel::isEverythingFetched()) { text = getString("ItemcountCompleted", string_args); } else { text = getString("ItemcountUnknown"); } childSetText("ItemcountText",text); }
void KNMusicCategoryDetailModel::setCategoryIndex(const QModelIndex &index) { if(index.row()==0) { m_nameFilter.setPattern("^$"); } else { m_nameFilter.setPattern("^" + QRegExp::escape(getFilterText(index)) + "$"); } setFilterRegExp(m_nameFilter); emit requireSongCountChange(rowCount()); }
wxString SbOverviewTable::GetValue(int row, int col) { if (row >= getNumRows()) return _("???"); SimpleOverviewRow *tableRow = getRowAt(row); if (tableRow == 0) return _("???"); switch (col) { case COL_PROGRAM: return (getProgramText(tableRow)); case COL_USER: return (getUserText(tableRow)); default: return (getFilterText(col, tableRow)); } }
void WorkspacePresenter::filterWorkspaces() { auto view = lockView(); view->filterWorkspaces(view->getFilterText()); }