예제 #1
0
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);
}
예제 #3
0
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());
}
예제 #4
0
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));
	}
}
예제 #5
0
void WorkspacePresenter::filterWorkspaces() {
  auto view = lockView();
  view->filterWorkspaces(view->getFilterText());
}