示例#1
0
int ThingTypeTreeView::selectedType()
{
	wxDataViewItem item = GetSelection();
	if (item.IsOk())
		return typeNumber(item);
	else
		return -1;
}
示例#2
0
void ThingTypeTreeView::showType(int type)
{
	// Go through item groups
	for (unsigned a = 0; a < groups.size(); a++)
	{
		// Go through group items
		for (int b = 0; b < GetChildCount(groups[a].item); b++)
		{
			wxDataViewItem item = GetNthChild(groups[a].item, b);

			// Select+show if match
			if (typeNumber(item) == type)
			{
				Select(item);
				EnsureVisible(item);
				return;
			}
		}
	}
}
示例#3
0
std::string OplsAtomTyper::typeString(const chemkit::Atom *atom) const
{
    return QString::number(typeNumber(atom)).toStdString();
}
示例#4
0
std::string OplsAtomTyper::typeString(const chemkit::Atom *atom) const
{
    return boost::lexical_cast<std::string>(typeNumber(atom));
}